Sergio Martins
2b3c3b75bf
Fix build with older cmake
...
Error was:
"install TARGETS given target "kddockwidgets_multisplitter" which does not
exist in this directory."
Fixes : #47
2020-06-04 15:29:34 +01:00
Sergio Martins
296889cace
Move TabWidget usage to FrameWidget
...
Frame is abstract and doesn't care about such implementation details.
QQuick will role out their own QTabWidget equivalent. No need to
abstract tab widget too, it's overkill.
2020-06-04 09:57:59 +01:00
Sergio Martins
4ebe8ed631
harden Frame's pure virtuals
...
Too many paths to control, so protect against calling the pure
virtuals in ctor/dtor
2020-06-03 22:31:03 +01:00
Sergio Martins
ecfa43f801
Decouple TabWidget from Frame
...
TabWidget is now an implementation detail of FrameWidget.
QQuick will roll their own stuff with similar api, but no need to
abstract QTabWidget and QTabBar
2020-06-03 22:18:44 +01:00
Sergio Martins
f5f39a37a1
Decouple DockWidget from TabWidget
...
TabWidget will be an implementation detail of FrameWidget, and not
shared by QtQuick
2020-06-03 21:38:47 +01:00
Sergio Martins
0a75d89848
Add Frame::detachTab()
...
The tab widget will be an implementation detail of FrameWidget and
not accessed by anyone
2020-06-03 21:18:38 +01:00
Sergio Martins
e418725c13
Don't create Frame directly, but FrameWidget, depending on the factory
2020-06-03 21:18:13 +01:00
Sergio Martins
180fb96ecc
quick: Implement separator support
...
you can now drag separators in the QML example
2020-06-01 22:22:33 +01:00
Sergio Martins
83af55a592
quick: Refactor QQuickItem creation
...
So it can be reused
2020-06-01 20:58:02 +01:00
Sergio Martins
fe6d80ae89
vscode: Add Qt source mapping
2020-06-01 18:13:54 +01:00
Sergio Martins
103a0e514a
quick: Use the original kddw indicators instead of yellow rectangles
...
looks nicer
2020-06-01 15:25:34 +01:00
Sergio Martins
7cc302c977
Rename Config.h to MultiSplitterConfig.h
...
So it doesn't clash with KDDW's Config.h
2020-06-01 15:14:34 +01:00
Sergio Martins
c2d51bddc8
quick: Some style improvements to the example
2020-06-01 14:53:18 +01:00
Sergio Martins
443f80cdab
qtquick: Improve the multisplitter example
...
you can now drop relative to
2020-06-01 13:42:47 +01:00
Sergio Martins
9af3740d86
fix memory leak
2020-06-01 12:28:35 +01:00
Sergio Martins
567b61c9ec
Allow separator to have pos=0
...
Can happen if widget has min-size 0
2020-06-01 12:16:35 +01:00
Sergio Martins
df8511b3dc
Add an example of how to use the multisplitter with QtQuick
2020-06-01 12:16:00 +01:00
Sergio Martins
1dad16bb63
vscode: Build kddockwidgets in developer mode
2020-05-31 23:01:33 +01:00
Sergio Martins
4e88b3742d
Honour max-size when docking
...
Layout will choose a suitable size for the dock widget when
addDockWidget() is called
2020-05-29 09:53:51 +01:00
Sergio Martins
a086713bb6
Implement FrameWidget::maxSizeHint()
2020-05-29 08:11:42 +01:00
Sergio Martins
0c0a232e07
Add vscode launch file for the example
2020-05-28 23:47:48 +01:00
Sergio Martins
a66e750f7d
Add Frame::biggestDockWidgetMaxSize()
2020-05-28 23:47:03 +01:00
Sergio Martins
3697814141
Add Frame::dockWidgetsMinSize()
...
Like Frame::minSize() but smaller due to the tab widget overhead
2020-05-28 20:51:06 +01:00
Sergio Martins
d8af06a7ee
Rename Item::maxSize to Item::maxSizeHint
...
It will more of an hint than really enforced in all cases
2020-05-28 20:20:24 +01:00
Sergio Martins
6797d291b6
Propagate max-size from the guest widget to DockWidget
...
Next step is propagating from DockWidget->Frame
2020-05-28 18:40:55 +01:00
Sergio Martins
798c808790
example: Set the max-size on the guest widget not on the dock
...
the size constraint will propagate up
2020-05-28 17:48:10 +01:00
Sergio Martins
4e3197388e
Add a failing TestDocks::tst_maxSizePropagates
2020-05-28 17:47:57 +01:00
Sergio Martins
6cd5254779
Add a .vscode directory
...
Has some presets for debugging launching and configuring intellisense
via cmake
2020-05-26 22:07:22 +01:00
Sergio Martins
f770e768b8
example: Add option to load a layout from file
2020-05-26 21:53:58 +01:00
Sergio Martins
d07f715ed7
updateTitleBarVisibility after deserializing
...
Fixes floating window having two title bars
2020-05-26 21:53:51 +01:00
Sergio Martins
87c7a8ad65
Add unit-test for the previous commit
2020-05-26 20:17:37 +01:00
Sergio Martins
05f93a98f0
LayoutSaver: Only close dock widgets that would be restored
...
It can happen that the JSON layout knew about less dock widgets
than there are, as there can be new ones now
2020-05-26 19:49:02 +01:00
Sergio Martins
bab10c8d65
Add overloads to DockRegistry::clear()
...
So we can specify what to close
2020-05-26 19:13:34 +01:00
Sergio Martins
5e3a305a7c
Add some useful DockRegistry overloads
2020-05-26 18:58:04 +01:00
Sergio Martins
c9fa637ae7
Add some helper methods to LayoutSaver::Layout
...
To retrieve the list of main windows and dock widgets present
in the loaded layout
2020-05-26 18:29:30 +01:00
Sergio Martins
79064b539a
Another amalgamation fix
2020-05-26 16:16:31 +01:00
Sergio Martins
aa7107bde2
Silence some warnings on Windows
2020-05-26 16:13:56 +01:00
Sergio Martins
704e6d0182
Fix the amalgamation build a bit
...
As Config is already in another namespace
2020-05-26 16:12:25 +01:00
Sergio Martins
7634438f6c
Add unit-test to previous commit
2020-05-25 23:30:31 +01:00
Sergio Martins
314cd6649d
Item: also emit numVisibleItemsChanged when inserting a container
...
Since it can have items inside too
2020-05-25 23:27:13 +01:00
Sergio Martins
e08a7a6725
Fix tst_lastFloatingPositionIsRestored when there's a frame
...
Otherwise only passes on offscreen qpa which has no frame
2020-05-25 22:19:05 +01:00
Sergio Martins
45d5d7b519
update .gitignore
2020-05-25 21:47:03 +01:00
Sergio Martins
63c90875aa
example: Add example of docking main window into main window
2020-05-25 21:45:21 +01:00
Sergio Martins
ee4ad02722
Fix FloatingWindow::hasSingleFrame()
...
Use m_dropArea->numFrames() which happens first, otherwise there
can be a moment where the frames() aren't updated yet
2020-05-25 21:43:01 +01:00
Sergio Martins
cd1f52a4bb
When looking for drop target honour affinity
2020-05-25 21:29:29 +01:00
Sergio Martins
66a0959ac0
Honour main windows being nested in Frame::floatingWindow()
...
In such case the Frame is inside the nested main window, not floating.
2020-05-25 20:52:15 +01:00
Sergio Martins
39d70c8186
Fix crash due to recurency in DragController
...
A drop could cause the events to be processed and trigger
another mouse move
Fixes : #19
2020-05-25 20:48:18 +01:00
Sergio Martins
d541a41536
Minor refactoring, factor some code into a function
2020-05-25 20:40:02 +01:00
Sergio Martins
9761759fee
Fix Floating window returning frames from nested main windows
...
Which we want to support now too
2020-05-25 20:27:08 +01:00
Sergio Martins
d4d83111ff
Added DockWidgetBase::isMainWindow()
2020-05-25 20:25:33 +01:00