Commit Graph

944 Commits

Author SHA1 Message Date
Sergio Martins
ef78c032d5 Also don't dereference after the warning 2019-09-24 16:44:02 +01:00
Sergio Martins
1c81fa9202 Move qDebug down so we don't dereference a null pointer
We don't usually get this warning, but got it now on Windows.
2019-09-24 16:37:48 +01:00
Sergio Martins
25f0d67309 Offscreen platform shouldn't use windows specific paths
It should use the same paths regardless of OS.
Fixes a unit-test that was broke as the tests didn't detect the
window under it. I guess due to using windows api and not having
a valid HWND.
2019-09-24 16:24:52 +01:00
Sergio Martins
8adecaf256 Merge pull request #13 from KDAB/feature/cmakepackage
Make KDDockWidgets installable, find_packageable and useable from ext…
2019-09-23 19:46:17 +01:00
Sergio Martins
68a536bb67 Minor renaming, deserialize() no matches serialized() 2019-09-21 16:18:19 +01:00
Sergio Martins
f9e1a54317 Remove unneeded forward declare 2019-09-21 15:18:07 +01: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
Jean-Michaël Celerier
f6909b0fa5 Make KDDockWidgets installable, find_packageable and useable from external projects 2019-09-19 11:35:54 +02:00
Sergio Martins
1ecc42433b Don't update size constraints while adding an item
It's run at the end
2019-09-18 17:49:58 +01:00
Allen Winter
f75aa4da26 README - add more info
Change-Id: I72ae2a1c49052fbf92d05212c1d0a94aa5dae5f1
Reviewed-on: https://codereview.kdab.com/70211
Reviewed-by: Sérgio Martins <sergio@kdab.com>
2019-09-13 10:22:18 +01:00
Olivier JG
d749f166c5 Add operators for Config::Flags 2019-09-12 18:09:38 +01:00
Sergio Martins
f3eb032eff Move the Flag_TabsAlwaysVisible logic into Frame.cpp
So it works with custom framework factories too
2019-09-12 18:06:06 +01:00
Sergio Martins
8df3eddd9b Fix crash when trying to drag a single tab
and the tab was in a floating window and we were using "TabsAlwaysVisible"
2019-09-12 17:22:29 +01:00
Sergio Martins
254dde64c7 Tests++ 2019-09-12 15:58:17 +01:00
Sergio Martins
9ef006bce4 tests++ 2019-09-12 15:50:11 +01:00
Sergio Martins
7abe7fffa2 Introduce Flag_AlwaysShowTabs
Makes the tab bar always show tabs
2019-09-12 15:21:24 +01:00
Sergio Martins
005bcbf279 Don't drag the window when dragging inner tab bars
When there's a floating window with several nested dock widgets
when dragging via the tab bar we should detach, not move the window
2019-09-12 15:11:02 +01:00
Sergio Martins
496cd9529c Don't always create a FloatingWindow when dragging via tab widget
If we're already in a FloatingWindow then there's no detachment to
happen, we just drag the window instead.

This fixes the drag not being smooth and stopping sometimes.
2019-09-12 14:13:59 +01:00
Sergio Martins
778402896d Fix build on Windows 2019-09-11 11:22:02 +01:00
Sergio Martins
370780cf22 Don't run the sanity checks during a restore
During a restore the layout is in an intermediate state, so we're
not suppose to do such tight checks.
2019-09-10 19:41:39 +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
4261e831d6 Fix build 2019-09-10 18:55:14 +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
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