Sergio Martins
283d2a80c7
Add Item::maxSizeChanged signal and improve setter
2020-05-20 14:25:42 +01:00
Sergio Martins
215e8cfd24
example: Cleanup some options a bit
2020-05-20 14:25:23 +01:00
Sergio Martins
235018bfae
example: Set the max-size before docking
2020-05-20 10:05:11 +01:00
Sergio Martins
dc87c05f04
example: Add an option to text max-sizes
...
Support not done yet, but useful for testing
2020-05-19 23:22:39 +01:00
Sergio Martins
4a17b04310
Item::dumpDebug: Also print the max-size, if any
2020-05-19 22:48:14 +01:00
Sergio Martins
6001e655fd
Fix crash when moving separator
...
We weren't recurring up the tree to find the next separator
2020-05-19 14:46:30 +01:00
Sergio Martins
af22e3e12d
Fix tst_raise on XCB
2020-05-19 13:44:01 +01:00
Sergio Martins
0d3ae48fed
Refuse to save invalid layouts
...
Now layout saver won't save if the root ItemContainer::checkSanity()
is false
2020-05-19 13:15:31 +01:00
Sergio Martins
9e198917f0
Try to recover from loading an invalid layout
2020-05-19 12:35:33 +01:00
Laurent Montel
d2531d48d3
Make it compile against qt < 5.10 QRandomGenerator was created in qt5.10
2020-05-19 11:20:28 +02:00
Sergio Martins
dc0dab6a83
DebugWindow: Add button to show all dock widgets
2020-05-19 10:05:41 +01:00
Laurent Montel
8b81cd12f8
Compile without deprecated method (qrand is deprecated. Replaced by QRandomGenerator)
2020-05-19 11:03:38 +02:00
Sergio Martins
044c590b92
Fix ambiguous enum on Windows
...
Can happen when using an amalgamation, due to the "using namespace"
clauses
2020-05-18 22:00:52 +01:00
Sergio Martins
6c2a29968a
Fix include
2020-05-18 21:51:26 +01:00
Sergio Martins
90fe9be6f6
DebugViewer: Fix crash at shutdown
2020-05-18 18:54:13 +01:00
Sergio Martins
2350f847d7
Item: Dump screen information too
2020-05-18 13:46:06 +01:00
Sergio Martins
8f7df69fa1
Add unit-test for previous commit
2020-05-18 11:48:18 +01:00
Sergio Martins
b687224801
Fix separators not moving when having invisible items
...
typo...
2020-05-18 11:40:33 +01:00
Sergio Martins
209005478e
only build multisplitter test if in developer mode
2020-05-18 09:28:15 +01:00
Sergio Martins
af25af1259
Add MainWindow::layoutEqually()
...
Distributes the space equally between all dock widgets
2020-05-18 00:05:50 +01:00
Sergio Martins
8b0be3b2ba
Add ItemContainer::layoutEqually()
...
Distributes all the space equally through the container.
Still respects min/max
2020-05-17 23:44:45 +01:00
Sergio Martins
43fafa1f33
Fix -Wextra-semi
2020-05-17 22:32:08 +01:00
Sergio Martins
ea56d20959
Fix clazy warnings about unused trivial variables
2020-05-17 19:15:59 +01:00
Sergio Martins
8477fdc7e1
Fix detachments
2020-05-17 19:14:50 +01:00
Sergio Martins
d613d25ef5
Add missing emit keyword
2020-05-17 19:12:09 +01:00
Sergio Martins
c5d9b38fc2
Disable copy of polymorphic types
2020-05-17 19:11:45 +01:00
Sergio Martins
36061fc6dc
Fix detach of temporary
2020-05-17 19:08:07 +01:00
Sergio Martins
2b6b6e2ba5
Disable copy for LayoutSaver, it has a dtor, but no copy-ctor
2020-05-17 19:07:26 +01:00
Sergio Martins
adedcfd6db
Use fully qualified types in signals
2020-05-17 19:06:24 +01:00
Sergio Martins
a9e02ccd41
example: Don't leak the dock widgets on shutdown
2020-05-17 18:02:03 +01:00
Sergio Martins
4647814aae
Fix tests with Qt 5.9
...
QTabWidget is a bit flaky and changes min width at unexpected times.
Which is fine but we can't compare against the expected min size
since it changes. So just check sanity of the restored layout
2020-05-17 17:12:31 +01:00
Sergio Martins
5b1b029b80
Fix Item::calculateSqueezes() squeezing too much
...
Fixes tst_28NestedWidgets:28 with Qt 5.9
2020-05-17 16:28:36 +01:00
Sergio Martins
6fe998d9df
Add build* to .gitignore
2020-05-17 15:04:53 +01:00
Sergio Martins
131b43a833
Item: Ignore item changing min size when it's not visible
...
Fixes tst_crash2 with Qt 5.9. Added a proper test too.
2020-05-17 15:03:54 +01:00
Sergio Martins
a87ab40aad
Implement support for double-clicking a separator
...
Will resize the left and right widget, so they have the same size
2020-05-16 20:18:32 +01:00
Sergio Martins
2fb66c681b
Item: Register the location enum for pretty debugging
2020-05-16 19:45:08 +01:00
Sergio Martins
0bd2f8f23a
tests: Add sanity checks for the tested rects
...
Catches the situtions fixed in the two previous commits.
2020-05-16 19:44:35 +01:00
Sergio Martins
0f796da901
Fix suggestedDropRect() not returning in global coords
2020-05-16 19:44:06 +01:00
Sergio Martins
cc5578f8f4
Fix inserting items in the list when there's hidden items
2020-05-16 19:43:18 +01:00
Sergio Martins
f89aa59371
Implement an exact Item::suggestedDropRect()
...
It will create a temporary, invisible layout, insert a copy of the item,
and see where it landed.
2020-05-16 18:20:48 +01:00
Sergio Martins
3f242a8b59
tests: Test Item::suggestedDropRect() more
2020-05-16 12:37:23 +01:00
Sergio Martins
c4b94f0f21
tests: pain a background in the host and guest widgets
...
For easier visual debugging
2020-05-16 12:36:44 +01:00
Sergio Martins
582ce6ef31
Item: Add pathFromRoot() and itemFromPath()
...
An easy way to identify an item within a layout.
2020-05-16 12:35:39 +01:00
Sergio Martins
10b47a8f9c
Item: Allow to have items that don't have an host QWidget
...
So we can create dummy ones, for usage in suggestDropRect()
2020-05-16 12:34:31 +01:00
Sergio Martins
d2716cf1c5
Item: Improve assert, don't dereference nullptr
2020-05-16 12:33:09 +01:00
Sergio Martins
2984b62ca0
Item: Fix warning about setSize() having an empty size
...
When doing setLength() make sure that the other dimension isn't 0,
as the item the user is trying to insert could have had an empty
size to begin with
2020-05-16 12:32:00 +01:00
Sergio Martins
1f6c49d5ba
Fix 5.15 build
2020-05-14 22:39:17 +01:00
Sergio Martins
d0b36cf932
add ctest to tst_multisplitter too
...
moved up otherwise the multisplitter one was being generated in
a different folder
2020-05-14 22:29:19 +01:00
Sergio Martins
d1d1c983f1
Remove "using namespace Layouting" out of the layouting lib
...
Fixes windows build due to ambiguous symbols
2020-05-14 22:02:27 +01:00
Sergio Martins
c5d880c124
Fix build on Windows
...
Location being ambiguous
2020-05-14 21:21:55 +01:00