Sergio Martins
dab0694dbc
Introduce Anchor::findNearestAnchorWithItems()
...
As a cleaner alternative than abusing AnchorGroup::turnIntoPlaceholder()
as the item was already a placeholder
2019-07-10 19:11:10 +01:00
Sergio Martins
90502ae5c7
When adding widgets relative to placeholders don't forget to set following
2019-07-10 18:24:33 +01:00
Sergio Martins
91704fd486
Uncomment a few tests that are passing
2019-07-10 16:39:30 +01:00
Sergio Martins
ba0da2aab1
debug++
2019-07-10 16:27:09 +01:00
Sergio Martins
3f73a99a71
Update followers whenever the followee anchor is deleted
2019-07-10 16:10:30 +01:00
Sergio Martins
eb29f1318d
Minor rename
2019-07-10 15:57:18 +01:00
Sergio Martins
6134ccfd3c
Add MultiSplitterLayout::anchorsFollowing
2019-07-10 15:55:55 +01:00
Sergio Martins
fa23d954b1
Add a failing unit-test
2019-07-10 15:34:13 +01:00
Sergio Martins
839500b84d
Fix detecting window when the top-level is embedded in MFC
...
Although topLevel is a topLevel to Qt, it's actually inside
another Windows window.
2019-07-10 15:33:07 +01:00
Sergio Martins
2cbf758f6b
Don't include MainWindow.moc in .cpp
...
some build systems don't support it
2019-07-10 12:58:24 +01:00
Sergio Martins
bad105f0a2
Dont' accept using AddingOption_StartHidden for any layouted dock widgets
2019-07-10 12:31:10 +01:00
Sergio Martins
b8d5fefbf1
Allow to add a dock widget directly as a placeholder
...
So it's not visible at startup if not needed
2019-07-10 12:24:36 +01:00
Sergio Martins
9052d93794
Fix adding a widget to a layout that already contains it
...
It should work, since we can be moving a widget to another
location
2019-07-10 11:20:20 +01:00
Sergio Martins
2c989ad5e8
Validate the parameters before creating the Frame
...
otherwise we're left with a dummy frame
2019-07-09 22:43:55 +01:00
Sergio Martins
3fc32fc4aa
Warn when adding a widget and the widget is the same as the relativeTo
2019-07-09 22:22:28 +01:00
Sergio Martins
c682a6966e
Add tests for several stealing scenarios
2019-07-09 21:33:49 +01:00
Sergio Martins
fceb7078ab
Make no side-effects if the tab widget already contains the widget
2019-07-09 21:15:23 +01:00
Sergio Martins
5af0482a7e
WIP: Allow to add a dock widget directly hidden
...
So it's not shown
2019-07-09 19:35:01 +01:00
Sergio Martins
97d7bd903b
Refactor to make less complex
2019-07-09 19:16:45 +01:00
Sergio Martins
7c1dca8a83
Remove unused variable
2019-07-09 19:11:57 +01:00
Sergio Martins
4518bf4462
Refactor more code, so it can be shared
2019-07-09 19:10:23 +01:00
Sergio Martins
c012af78d5
Minor: Move to place where it's used
...
probably we can refactor the whole block
2019-07-09 18:45:27 +01:00
Sergio Martins
60041870c3
Debug++
2019-07-09 18:40:18 +01:00
Sergio Martins
e2e234cb38
Debug++
2019-07-09 18:26:01 +01:00
Sergio Martins
2adae6b375
Debug++
2019-07-09 18:11:02 +01:00
Sergio Martins
525b279eb1
Warn when adding duplicate items to TabWidget
2019-07-09 17:50:05 +01:00
Sergio Martins
30df8d3553
Print the Frame address
2019-07-09 17:30:39 +01:00
Sergio Martins
09d8c721e5
Minor refactor to allow code reuse
2019-07-09 17:22:17 +01:00
Sergio Martins
0ad960d99f
only print the address at this point
2019-07-09 11:45:25 +01:00
Sergio Martins
fe40640711
Debug++
2019-07-09 11:38:51 +01:00
Sergio Martins
289945e3ad
Debug++
2019-07-09 11:30:55 +01:00
Sergio Martins
989af1bdb2
Debug++
2019-07-09 11:27:27 +01:00
Sergio Martins
fc3fdba6fc
Use qEnvironmentVariableIntValue instead
...
So 0 means off
2019-07-09 11:08:28 +01:00
Sergio Martins
66995c1ff9
Warn when there's dock widgets with duplicate name
2019-07-09 11:01:55 +01:00
Sergio Martins
30feb6c221
Fix unit-tests when the debug window is visible
...
the unit-tests make sure that no window survives after each test
2019-07-09 10:54:43 +01:00
Sergio Martins
2bb43a9b71
Don't consider invisible windows as drop targets
...
Fixes hidden dock widgets suddently appearing.
2019-07-09 10:06:59 +01:00
Sergio Martins
4818b22575
Fix typo
2019-07-09 09:56:18 +01:00
Sergio Martins
6d5f08fb8a
Add a debug window, for when GammaRay can't be used
2019-07-09 09:19:53 +01:00
Sergio Martins
8163e7ada4
Don't include .moc in ClassicIndicators.cpp
...
Some build systems don't support it
2019-07-08 18:25:45 +01:00
Sergio Martins
de104ad36e
Merge branch 'master' of github.com:KDAB/KDDockWidgets
2019-07-08 18:21:37 +01:00
Sergio Martins
11f6fc53f9
Fix resize propagation when dragging separators
...
Never call setPosition() directly in an Anchor that's following
another, instead do it in its folowee
2019-07-08 18:09:57 +01:00
Sergio Martins
a8d0f35d2d
Don't use WidgetResizeHandler for non-top level DockWidgets
...
This conflicted with the SeparatorWidget mouse handling, which
made the Separator not respond some times
2019-07-08 16:34:06 +01:00
Sergio Martins
86ea51eb79
Add some asserts
2019-07-08 16:06:53 +01:00
Sergio Martins
feed814d7c
Fix crash
2019-07-08 15:49:00 +01:00
Sergio Martins
efea35a948
Add a failing test
2019-07-08 15:41:04 +01:00
Sergio Martins
1ac2a52ba6
Fix redistributing space after a window resize when there's placeholders
...
It was using the anchor->minPosition() of anchors that only had placeholders
on Side1, which is bogus. Instead, we should use the last valid minPosition
2019-07-08 15:03:14 +01:00
Sergio Martins
6f9910ffa9
Remove Item::anchorAtDirection()
...
It was confusing, and we have anchorAtSide() already
2019-07-08 13:33:00 +01:00
Sergio Martins
3ec6008d45
Rename for readability
2019-07-08 13:22:10 +01:00
Sergio Martins
2661162d3a
Minor re-entrancy guard
...
Not sure if needed, but I'll sleep better
2019-07-08 13:11:03 +01:00
Sergio Martins
1324427453
Fix size calculations when restoring a placeholder
2019-07-08 12:20:17 +01:00