Sergio Martins
25dd149475
Add Widget::mapToGlobal()
2020-06-13 19:09:44 +01:00
Sergio Martins
e6b67101fa
Make the example customize TitleBarWidget instead of TitleBar
...
TitleBar will cease to depend on QWidget
2020-06-11 21:26:33 +01:00
Sergio Martins
16c32cea4b
Added Widget::update() and mapFromGlobal
2020-06-11 19:33:20 +01:00
Sergio Martins
9f44eb3154
Add Widget::topLevel()
...
Equivalent to QWidget::window()
2020-06-11 18:18:11 +01:00
Sergio Martins
c7b6a1a654
wip
2020-06-11 18:10:01 +01:00
Sergio Martins
6bbcb8f8f2
Rename LayoutSaver::MultiSplitterLayout to LayoutSaver::MultiSplitter
2020-06-11 17:00:54 +01:00
Sergio Martins
163b194398
Fix clang build, mostly shadowing warnings
2020-06-11 17:00:54 +01:00
Sergio Martins
86e58dd8a7
Merge MultiSplitterLayout into MultiSplitter
...
No need to have two. It's a leftover from the old layouting engine
2020-06-11 16:34:28 +01:00
Sergio Martins
e54ef787ed
Some include cleanup
2020-06-11 11:03:12 +01:00
Sergio Martins
d5957a0dc5
Double-clicking on separator now respects max-size
2020-06-10 23:32:04 +01:00
Sergio Martins
bb79bd12a7
Fix bug in availableToGrowOnSide() and add unit-test
2020-06-10 20:31:03 +01:00
Sergio Martins
47795d0751
min/max pos for separator can honour max-size now
2020-06-10 19:52:20 +01:00
Sergio Martins
e234ad65ab
Add ItemContainer::availableToGrowOnSide_recursive()
2020-06-10 19:24:34 +01:00
Sergio Martins
1c3dd93ee3
More renaming, as we add more functions that honour max-size
2020-06-10 19:02:07 +01:00
Sergio Martins
ccf161e139
Add ItemContainer::availableToGrowOnSide()
2020-06-10 18:58:38 +01:00
Sergio Martins
9636054ccc
Rename Item::availableOnSide() to availableToSqueezeOnSide()
2020-06-10 18:55:54 +01:00
Sergio Martins
6e77dce573
Add Item::neighboursMaxLengthFor()
2020-06-10 18:54:34 +01:00
Sergio Martins
a442419db2
Honour max-size constraints when resizing the window
...
items won't resize past their max-size when resizing the window now
2020-06-10 14:10:41 +01:00
Sergio Martins
479e1acece
tests: guest widget can get a max-size now too
2020-06-10 11:42:50 +01:00
Sergio Martins
a7878122ac
Only use QT_DISABLE_DEPRECATED_BEFORE in developer-mode
...
Many projects just add kddw as a sub-folder and might have
QT_DISABLE_DEPRECATED_BEFORE with a different value, then you get
lots of warnings
2020-06-09 12:40:37 +01:00
Sergio Martins
fa32054085
Merge pull request #48 from KDAB/fix-warning
...
Fix -Wextra-semi
2020-06-08 21:20:26 +01:00
Colin Ogilvie
f3de1ad63d
Fix -Wextra-semi
2020-06-08 19:36:18 +01:00
Sergio Martins
8baac15d24
Fix floating window position when dragging with constraints
...
When the detach starts we might make the window smaller so it
respects the max-size constraint. The quirk was that in that
case the window was no longer under the mouse cursor, so looked
weird while dragging, although it worked
2020-06-08 18:19:46 +01:00
Sergio Martins
4cf1159019
Two more places that should use setSuggestedGeometry()
...
Now dragging by the tab bar also respects the max-size
2020-06-08 17:40:17 +01:00
Sergio Martins
ee065795b9
Fix Frame max size accounting for the waste twice
...
Frame::biggestDockWidgetMaxSize() should return only the max size
of the dock widget, and not mix with sizes of the container frame
2020-06-07 23:12:47 +01:00
Sergio Martins
7f9d160658
Also honour QSizePolicy::Maximum
...
It's yet another way to say you want a max size
2020-06-07 20:14:50 +01:00
Sergio Martins
daa220d513
tests: let the widget receive a size hint
2020-06-07 20:01:37 +01:00
Sergio Martins
d5797a3aea
Honour QSizePolicy::Fixed too
...
Some widgets, for example QPushButton, instead of having an explicit max size,
they communicate the need for a max size through their size policy
2020-06-07 19:53:06 +01:00
Sergio Martins
ab8545e2c2
Bound the item max size just in case
2020-06-06 20:27:36 +01:00
Sergio Martins
5fc16954f5
Fix max-size only working in one orientation
...
ItemContainer::maxSizeHint() algo was wrong.
Add unit-test too.
2020-06-06 20:11:09 +01:00
Sergio Martins
6610e48cb3
Fix qDebug for child items going out of scope before the parents
...
Made the child debug lines appear before
2020-06-06 18:12:44 +01:00
Sergio Martins
dabfeeaf3b
Honour max-size when floating a window
2020-06-05 15:35:55 +01:00
Sergio Martins
9601f57050
example: Don't show the dock widgets immediately
...
It's not needed, as they are going to be added to the layout.
Saves us from flicker and also the temporary floating position
being saved
2020-06-05 13:43:35 +01:00
Sergio Martins
7c442dce85
Fix another place that should use setSuggestedGeometry
2020-06-04 21:47:47 +01:00
Sergio Martins
07ea3ff1a6
cleanup: Replace some qobject_casts with a function
2020-06-04 21:37:01 +01:00
Sergio Martins
874fd7d69f
Don't set the FloatingWindow geometry directly
...
Let's have an indirection, so FloatingWindow can do some adjustments
and use a smaller rect incase of max-size.
Since we don't want to enforce max-size, just when showing the window.
2020-06-04 21:21:11 +01:00
Sergio Martins
69a737e286
FloatingWindow: Remove cruft
2020-06-04 21:16:22 +01:00
Sergio Martins
ddc49c9358
Don't warn when restoring and there's no last pos info
...
We now restore floating windows to their previous position too
when toggling float. If there's no last info it's fine
2020-06-04 18:21:52 +01:00
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