Commit Graph

5 Commits (ff35e5bfc58fd07128cdff451bfb319b2a40090a)

Author SHA1 Message Date
Peter Hutterer 6e21db0c9a Revert "Store the SVGs in the runtime directory"
Actually, not a good idea since we can't rely on Tuhi to store the drawings
forever.

This reverts commit 5470a7afd23c44d55ee14d32ddf081a8e0eab251.
2019-07-16 15:31:46 +10:00
Peter Hutterer 651d9d87e4 Store the SVGs in the runtime directory
No need to pile these into the data directory.
2019-07-16 15:31:43 +10:00
Peter Hutterer 2f3094d3db Allow for orientation changes for the device
This is saved for posterity in the new settings file, so we need a new Config
object (singleton is enough here).

For now, whenever the orientation changes, we just wipe our UI and re-generate
all SVG files. Much easier than messing with proper SVG rotation given that a
device should only ever change between rotations once.
2019-07-16 15:31:36 +10:00
Peter Hutterer d6a2e01acb svg: drop the non-pressure handling
No point in keeping this, let's always use the pressure and where it's not
sufficient just change the algorithm.
2019-07-16 15:29:14 +10:00
Peter Hutterer d03493f7ff Add a GUI for Tuhi
This is a quickly hacked-together versions with some bits in detail, others
just sketched in. Credit goes to Piper where much of the basic structure has
been taken from, and tuhi-kete where the DBus bindings were taken from.

Current functionality allows to register a new device and save drawings from
an existing device. Missing is the bit where we can download drawings from a
newly registered device. Several buttons are present but not hooked up yet,
several UI pieces are unpolished.

This UI is designed to work with one device only right now. If you have two
devices, you'll have to manually remove them from Tuhi and add one or the
other through this tool.

The UI is minimal. If you start it and Tuhi doesn't have a device yet, it will
immediately go into search mode and start registering the device. If you have
a device, it'll just display the data.

The data Tuhi exports is downloaded immediately and converted to SVG files,
stored in $XDG_DATA_HOME/tuhigui/<timestamp>.svg. Downloading a file through
the GUI merely copies that file into the target path. No support for rotation
at this point, but could and should be added (there's a button already!)
2019-07-11 11:05:39 +10:00