replace bespoke xkb geometry parser with xkb

Authored by sitter on Nov 7 2019, 1:17 PM.



the bespoke parser was a horrendous drain on the build time of
plasma-desktop due to recursive templates.
it's been replaced with a new standalone binary that previews any
model/layout/variant/options combination as requested and a qtquick UI
which simplifies the actual rendering substantially.

the new code is better in that it:

  • builds in a fraction of the time with a fraction of the power use
  • renders complex models (such as the tm2020 or the kinesis) correctly
  • because it entirely relies on xkb to figure out keysyms belonging to a given key, it's layout representation is not only substantially more complete it also correctly obeys options like eurosign:2
  • renders numlock and the like (not that this is in fact very useful ^^)
  • is following the system palette for coloring
  • the paint code should be easier to graps and more robust because xkb provides completely consistent geometry and layout data meaning we can model this verbatim in qtquick and then scale the entire keyboard to a useful size
  • this is now a standalone application so potential input method KCMs can opt to use it (e.g. fcitx)

BUG: 362946

Test Plan

preview all the layouts and all the models

Diff Detail

R119 Plasma Desktop
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
sitter created this revision.Nov 7 2019, 1:17 PM
Restricted Application added a project: Plasma. · View Herald TranscriptNov 7 2019, 1:17 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
sitter requested review of this revision.Nov 7 2019, 1:17 PM
sitter updated this revision to Diff 69437.Nov 8 2019, 1:05 PM

install bin, drop ki18n as link target (not used at this time)

ngraham edited the summary of this revision. (Show Details)Nov 8 2019, 1:21 PM
sitter updated this revision to Diff 69441.Nov 8 2019, 1:30 PM

fix tooltip scaling to show keys at 2.5 times their original size

ngraham added a subscriber: ngraham.Nov 8 2019, 2:41 PM

Oh so much faster now.

GB_2 awarded a token.Nov 9 2019, 12:30 PM
sitter updated this revision to Diff 69747.Nov 14 2019, 2:09 PM
  • document why section overlays aren't modelled
  • doodad qml item creation is now type based rather than duck typed
  • logo doodads are now supported as a compositie of shape doodads and labels
  • outline doodads now behave correctly in that they only render an outline without fill (at least I think that's how they are meant to work)
  • todo--
sitter updated this revision to Diff 69752.Nov 14 2019, 3:41 PM
  • bump preview size a bit
  • update documentation
  • resolve outstanding todos

Is the FooBar class for testing? I don't see it used anywhere. (and would guess soofrom the name)

sitter updated this revision to Diff 69799.Nov 15 2019, 11:36 AM
  • remove all color mapping tech, it's pointless since the code now uses the system palette
  • remove garbage foobar class
  • remove unnecessary main.moc include
  • create two global SystemPalettes instead of in individual items
This revision was not accepted when it landed; it landed in state Needs Review.Nov 29 2019, 7:53 AM
This revision was automatically updated to reflect the committed changes.