Sergio Martins
4734f06046
builds
2020-04-02 19:43:36 +01:00
Sergio Martins
5b91021745
LayoutSaver: insert the DockWidget ptr into the cash
2020-03-01 15:03:07 +00:00
Sergio Martins
dedda6cb14
LayoutSaver: Also store the affinity in the JSON
2020-03-01 14:13:02 +00:00
Sergio Martins
ce6fd20efd
LayoutSaver: Also restore position percentage
...
Fixes anchors going to weird places when the window is resized.
Calculated percentage was wrong because layout hadn't been deserialized
yet.
2020-02-26 23:31:59 +00:00
Sergio Martins
af5bb4a3e4
Also store the percentage position in the json
...
just for checking that the restore is sane, even though
that property is calculated at runtime
2020-02-26 22:45:40 +00:00
Sergio Martins
564a7091e1
LayoutSaver: Fix off-by-ones case with relative-restoring
...
If the window didn't change size nothing should happen
2020-02-25 20:00:46 +00:00
Sergio Martins
ca211f2494
LayoutSaver: Add an option to restore in relative sizes
...
and not touching the main window geometry.
The option is not exposed yet, there's a layouting bug to fix first.
2020-02-25 19:06:43 +00:00
Sergio Martins
435e61288e
LayoutSaver: Remove the QDataStream serializer
...
Keep only the deserializer, for now, so we can convert old layouts
to json.
2020-02-24 15:22:44 +00:00
Sergio Martins
5b0eb93cda
LayoutSaver: Add a json to/from methods
...
Still not being used by public api though.
2020-02-24 14:45:06 +00:00
Sergio Martins
69ada1bdad
LayoutSaver: Add to/from variant map methods
...
To make it easy to use json instead of QDataStream
2020-02-23 22:55:30 +00:00
Sergio Martins
950ef943b7
LayoutSaver: Save the top-levels screen number
...
So we can be smarter when restoring layouts with different screen
setups
2020-02-20 18:39:06 +00:00
Sergio Martins
b0525ed1f1
LayoutSaver: Save the list of screens and their properties
...
So we can be smarter when restoring on different screen setups
2020-02-20 17:50:28 +00:00
Sergio Martins
e7661cca91
LayoutSaver: serialize/deserialize the screenSize and layoutSize too
2020-02-20 15:41:00 +00:00
Sergio Martins
efdd8f9f81
LayoutSaver: Also store the screen and layout size
...
So when restoring we can restore relative to that
2020-02-20 14:14:06 +00:00
Sergio Martins
6338e6b03e
Fix my Werror clang build
2020-01-29 15:17:01 +00:00
Allen Winter
df692686e7
various - update copyright year
2020-01-07 11:36:56 -05:00
Sergio Martins
c80a16d2c1
Also use the intermediate representation when serializing
2019-09-21 15:15:44 +01:00
Sergio Martins
65c9693a62
Restoring now reads from the intermediate representation
...
Only the intermediate representation is filled in from the stream
now. TODO: GUI->intermediate.
2019-09-20 17:24:22 +01:00
Sergio Martins
778402896d
Fix build on Windows
2019-09-11 11:22:02 +01:00
Sergio Martins
cde4bd9bbd
LayoutSaver: Add more validation
2019-09-10 19:19:22 +01:00
Sergio Martins
5a3727deae
LayoutSaver: Also validate anchors upper bound
2019-09-10 19:03:49 +01:00
Sergio Martins
d38221f52c
minor rename
2019-09-10 18:53:43 +01:00
Sergio Martins
a348274bc4
Add LayoutSaver::Layout::isValid()
2019-09-10 18:52:33 +01:00
Sergio Martins
21afb04555
Use LayoutSaver::DockWidget by pointer
...
As we're changing it's shared and we're changing its members.
This way the members changes everywhere, as there's only 1 instance
of each dock widget
2019-09-10 17:21:09 +01:00
Sergio Martins
b2c9acc2f5
Fix a serialization mistkae
...
now matches how it was before
2019-09-10 16:52:09 +01:00
Sergio Martins
5448c9655e
Introduce an intermediate serialization format for save/restore
...
QDataStream is opaque and is not good for validation.
With this intermediate format we'll be able to:
- manipulate stuff
- validate that the saved layout is correct, before restoring it
- decide about some restore heuristics which would have been impossible
because before we needed to restore as we read the stream, now we can
look at the state before restoring it
LayoutSaver isn't using the new format yet, but the LayoutSaver::Layout
is already useful to debug some bogus saved states
2019-09-10 16:24:14 +01:00