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
Sergio Martins
e616dad5b1
Fix detecting z-order of floating candidates for drop
2019-09-09 17:23:02 +01:00
Sergio Martins
607abc62ef
Convert a file to linux line endings
2019-09-09 17:12:05 +01:00
Allen Winter
29c41cade3
various - minor spelling, include guard fixes
...
also clean duplicate includes
Change-Id: I3fdd02fd1d07e7061003dd5fbed9e04b7b9ca928
Reviewed-on: https://codereview.kdab.com/70210
Reviewed-by: Sérgio Martins <sergio@kdab.com >
2019-09-09 17:10:36 +01:00
Sergio Martins
681d7283f4
Add a QtQuick TitleBar
2019-09-08 20:16:32 +01:00
Sergio Martins
f2e3c6d8b6
Implement minimum size for QtQuick
2019-09-07 16:39:29 +01:00
Sergio Martins
4d2944280b
Implement onResize for QtQuick
2019-09-07 16:33:21 +01:00
Sergio Martins
abbc79f0e0
Progress with the QtQuick port
2019-09-07 16:20:22 +01:00
Sergio Martins
3b041c3145
quick: Fix the base class of MainWindowBase
...
Should only inherit from QMainWidget in QtWidget mode.
2019-09-04 15:55:04 +01:00
Sergio Martins
9f84760541
quick: Don't build DebugWindow, that's widget specific
2019-09-04 15:54:21 +01:00
Sergio Martins
cad7486907
Introduce MainWindowBase
...
MainWindow is widgets only. MainWindowBase will be used by QtQuick too.
2019-09-04 15:31:55 +01:00
Sergio Martins
729a154d48
Remove unused include
2019-09-04 13:54:07 +01:00
Sergio Martins
02d5a4f334
quick: Fix linker errors in TitleBarQuick
2019-09-04 13:51:29 +01:00
Sergio Martins
48c0ea2a4d
Add a cpp file for DropAreaWithCentralFrame
2019-09-04 13:48:39 +01:00
Sergio Martins
cde35f584e
quick: Add a dummy Layout so it compiles with QtQuick
2019-09-04 13:43:07 +01:00
Sergio Martins
c1272c577c
Update .gitignore
2019-09-04 13:41:41 +01:00
Sergio Martins
20f8d9eed5
Remove some uneeded includes"
2019-09-04 13:39:27 +01:00
Sergio Martins
5aab3251ca
Make static separators have 0 thickness instead of 1
...
The static separators are the left,right,bottom,top ones. Since
they don't move, they don't need to be visible nor occupy space.
They only exist to make the algorithms easier
2019-09-02 11:37:05 +01:00
Sergio Martins
76640d16b3
Fix support static separators with 0 thickness
2019-09-02 11:26:57 +01:00
Sergio Martins
9f7969bfc3
Tests now pass with static anchor thickness > 2
...
Still need to fix with =0
2019-09-02 11:07:58 +01:00
Sergio Martins
8cb34e4d65
tests: Fix tst_rectForDrop() with variable static anchor thickness
2019-09-02 10:56:48 +01:00
Sergio Martins
5caca65843
Fix test that didn't support static anchor thickness != 1
2019-09-02 10:52:03 +01:00
Sergio Martins
1bf2cef26f
Allow static anchor thickness equal to 0 in the Config
2019-09-01 19:29:26 +01:00
Sergio Martins
7797599b5d
Fix unit-tests when separator thickness is even
2019-09-01 19:04:37 +01:00
Sergio Martins
30135acbd0
tests: Remove hardcoded anchor thicknesses
2019-09-01 15:03:04 +01:00
Sergio Martins
a16bc70329
Improve warning
2019-08-28 18:10:06 +01:00
Sergio Martins
46a5a580bc
Add LayoutSaver::restoredDockWidgets()
...
Implemented as a property it's better that the LayoutSaver
doesn't carry state about this. Then we would need to remove dock
widgets from the list if they are deleted. Also not a important
enough feature to be on the DockWidget public interface.
2019-08-28 17:56:18 +01:00
Sergio Martins
f0078c3649
Fix dragging window by title bar when using document mode
...
When using document mode the click goes to the tab bar, not the
tab widget
2019-08-28 17:05:45 +01:00
Sergio Martins
7a9191c039
Reset the current drop location after dropping
...
Instead of relying it to be reset by other means or luck
2019-08-28 14:57:53 +01:00
Sergio Martins
59cdadf386
Add DockWidgetBase::titleBar()
2019-08-24 22:55:06 +01:00
Sergio Martins
3dd9d48f57
Add more stubs for QtQuick
2019-08-24 21:28:00 +01:00
Sergio Martins
d7d47be5ac
Add a stub for the QtQuick counterpart of Frame: FrameQuick
2019-08-22 23:42:49 +01:00
Sergio Martins
6b12a00f2d
Fix QtQuick build
2019-08-22 23:25:14 +01:00
Sergio Martins
9a1eaf8c65
Improve README
2019-08-21 16:42:30 +01:00
Allen Winter
84b61510e2
README.md - add more info
...
Change-Id: I80841b46c22b2a6856a799e5eec79181f818ec80
Reviewed-on: https://codereview.kdab.com/69959
Reviewed-by: Sérgio Martins <sergio@kdab.com >
2019-08-21 16:35:49 +01:00
Sergio Martins
a4b148c310
Allow IndicatorWindow y to not be bounded by KDE task bar
...
For some reason Qt::Tool windows can't be placed with a y too big if it would
go under the task bar.
By using Qt::BypassWindowManagerHint we can.
2019-08-21 12:14:14 +01:00
Sergio Martins
ba773ec0fd
Improve a warning, print the actual missing frame
...
the item will be null due to not being found
2019-08-21 11:18:01 +01:00
Sergio Martins
7bf9d8cbec
Don't change the Item min size if it's a placeholder
...
When its in process of being restored frame can be non-null
but m_isPlaceholder is still true
2019-08-21 10:56:44 +01:00
Sergio Martins
0ccc4bcb2e
Add debug
2019-08-20 18:35:06 +01:00
Sergio Martins
4282e7b596
Add debug
2019-08-20 18:30:08 +01:00
Sergio Martins
9e9ca66382
Call ensureAnchorsBounded() directly in setSize()
...
No need for it to be scattered in random places.
Also, don't warn in Anchor::setPosition() if we're in the middle
of a resize, ensureAnchorsBounded() will be called soon.
2019-08-20 18:19:20 +01:00
Sergio Martins
1726f323fc
When updating the layout's min size also update its size immediately
...
So we don't rely on a round trip to the widget which then responds
with a resize, which is async sometimes.
Also, now it's self contained and doesn't depend on the widget's
stack
2019-08-20 17:58:28 +01:00
Sergio Martins
ecf1b61f22
Respond immediatley to min size changes
...
instead of waiting for LayoutRequests from the main window
which can be async.
2019-08-20 17:48:55 +01:00
Sergio Martins
f74fa9977d
Add a sanity check
2019-08-20 16:33:13 +01:00
Sergio Martins
3d16347f80
Remove unneeded dumpDebug
2019-08-20 16:28:59 +01:00
Sergio Martins
d960c27b00
Remove unneeded ;
2019-08-20 15:25:48 +01:00
Sergio Martins
6ec23d433b
Add more sanity checks
2019-08-19 23:32:28 +01:00