Sergio Martins
d4ba1f3c8c
Don't keep stale static anchors around
2019-07-23 12:07:27 +01:00
Sergio Martins
1c93e74b6a
Use addItems_internal() when adding the item
...
It installs an event filter
2019-07-23 11:55:54 +01:00
Sergio Martins
43f3030979
pass Anchor by pointer so it's normalized
2019-07-23 11:51:36 +01:00
Sergio Martins
b6889b5c54
No need to assign to m_anchors
...
Anchor CTOR does that
2019-07-23 11:49:28 +01:00
Sergio Martins
ab24161657
Remove unneeded Frame::id()
2019-07-23 11:42:52 +01:00
Sergio Martins
0e1b473db7
Also restore item's anchors
2019-07-23 11:35:00 +01:00
Sergio Martins
b14f66ee13
Check for invalid groups in checkSanity()
2019-07-23 11:23:36 +01:00
Sergio Martins
52c1cd510e
Fix typos
2019-07-22 23:19:54 +01:00
Sergio Martins
574b9fbfa3
Set frame visible when restoring it
2019-07-22 23:05:53 +01:00
Sergio Martins
6c5ad286f3
Disconnect earlier, so we don't crash when deleting directly
2019-07-22 21:51:27 +01:00
Sergio Martins
3ef09fde11
Move code to where it's used
2019-07-22 19:46:30 +01:00
Sergio Martins
8cca303e1b
Delete Frame immediately instead of deleteLater when possible
...
Otherwise a LayoutSaver::saveLayout() will count with those frames
that aren't deleted yet and are keeping Items alive.
Also easier for tests, not so many waitForDeleted() needed
2019-07-22 18:40:01 +01:00
Sergio Martins
7b202fee5a
Hide dock widgets before clearing layout
...
So that dock widgets are unparented before clearing the layout
Fixes a regression introduced recently. Tests pass now
2019-07-22 17:50:42 +01:00
Sergio Martins
7e02d2d953
Fix tests broken due to non-unique MainWindow/DockWidget names
2019-07-22 17:50:22 +01:00
Sergio Martins
947969438d
LayoutSaver: Make the deserializer match the serializer
...
They must be simmetric
2019-07-22 17:32:24 +01:00
Sergio Martins
c253962f87
Make DockRegistry::nestedWindows() not return the ones being deleted
2019-07-22 17:31:49 +01:00
Sergio Martins
bc93f924fc
Disable the Animated Indicators for now
...
They don't work yet
2019-07-22 11:18:43 +01:00
Sergio Martins
9cad96b8ef
Add needed friend declaration
2019-07-22 11:10:17 +01:00
Sergio Martins
14a393dfb3
Remove dead code from LayoutSaver
2019-07-22 10:50:29 +01:00
Sergio Martins
1cecc30c54
Also save/restore window geometry and visibility
...
also restore the FloatingWindow
2019-07-22 10:44:11 +01:00
Sergio Martins
ddb772d54f
Fix clazy build
2019-07-22 09:34:15 +01:00
Sergio Martins
05532b892c
Fix build
2019-07-21 23:43:42 +01:00
Sergio Martins
4acced799c
Ensure all floating DockWidgets morphed into a FloatingWindow before saving
...
Makes it easier, since it's less one case to handle
2019-07-21 23:42:22 +01:00
Sergio Martins
228870df68
Serialize FloatingWindow
2019-07-21 23:42:08 +01:00
Sergio Martins
f1d5fd4b67
Before restoring a layout, clear old placeholders too
2019-07-21 23:28:06 +01:00
Sergio Martins
5274c8a9fd
Rename method
2019-07-21 23:27:58 +01:00
Sergio Martins
38d97ef00b
Comment out dead code
...
Just there for reference, but will be removed soon
2019-07-21 23:27:30 +01:00
Sergio Martins
35bb63946a
Add serializers for Item, Frame and DockWidget
2019-07-21 23:15:19 +01:00
Sergio Martins
ed2bd24f46
Fix crash while restoring empty layout
2019-07-21 20:29:42 +01:00
Sergio Martins
dfc53795b7
Start implementing global save/restore
...
The difference is that now ach class will encapsulate serialization/deserialization
of its own properties, and we'll get rid of the *State classes
2019-07-21 19:08:35 +01:00
Sergio Martins
a410224a1d
DockRegistry now warns about MainWindows missing a name too
2019-07-21 18:45:25 +01:00
Sergio Martins
f8560c18ca
Comment out LauoutSaver public api for now
...
Still working on it
2019-07-21 18:25:30 +01:00
Sergio Martins
c684942ece
Add a serializer for Anchor class
...
Will be used for restoring layout
2019-07-21 00:15:41 +01:00
Sergio Martins
b8307a4299
cmake adjustments suggested by jcelerier
2019-07-20 22:50:21 +01:00
Sergio Martins
2b5ce7a197
Merge pull request #12 from KDAB/cmake_cleanup
...
Clean up cmake files
2019-07-20 22:46:16 +01:00
Sergio Martins
bb1a933137
Transform floating dock widgets into FloatingWindow
...
instead of waiting for the user to drag a window over it.
This makes it have better z-order, as the FloatingWindow is parented.
2019-07-20 22:15:24 +01:00
Sergio Martins
d98e5dd966
Wayland debug++
2019-07-20 19:05:01 +01:00
Sergio Martins
de716cc359
Use opaque icons when there's no translucency support
...
Also corners are not round.
2019-07-20 19:03:40 +01:00
Sergio Martins
4ac8103a84
Remove some code duplication
2019-07-20 18:41:03 +01:00
Sergio Martins
f81296a839
Add a fallback mouse grabber for wayland
...
Wayland doesn't support mouse grabbing.
Commented out for now, as wayland has other problems, such as
QWidget::move() not working
2019-07-20 18:37:55 +01:00
Sergio Martins
d71acc7312
Add some debug code to test changing window position on Wayland
2019-07-20 18:21:17 +01:00
Sergio Martins
fbcd41937a
Add an event filter for debugging mouse
2019-07-20 17:35:24 +01:00
Sergio Martins
fd5b2ad2f1
Use AA_UseHighDpiPixmaps in the example
...
it's a best practice
2019-07-20 17:25:25 +01:00
Sergio Martins
108cd96afe
Save floating geometry before hidding
...
So it shows at the correct position when shown
2019-07-20 17:19:20 +01:00
Sergio Martins
9e1807116d
Don't crash if DockWidget doesn't have a widget
2019-07-20 17:19:20 +01:00
Sergio Martins
5d36a95a67
Merge pull request #9 from jcelerier/master
...
Add a visual example in the README
2019-07-20 15:33:34 +01:00
Mike Krus
1824eb6892
Clean up cmake files
...
Use modern syntax in most places.
2019-07-19 22:45:22 +01:00
Sergio Martins
8427cd7f5f
tests: Don't spam so many qpa warnings
...
We don't care about these warnings so don't print them
2019-07-19 18:16:47 +01:00
Jean-Michaël Celerier
2416da808e
Add a visual example in the README
2019-07-19 18:22:17 +02:00
Sergio Martins
06c32a23fb
Set a parent to FloatingWindow
...
Solves some weird z-order issues on Linux.
Also, makes the windows always visible when the main window is visible.
Not sure what to do when there's two MainWindows though, just parent to the
first one for now
2019-07-19 15:55:04 +01:00