Sergio Martins
3059965bbe
Remove unused variable
2019-07-03 22:33:44 +01:00
Sergio Martins
d29eaee49a
Remove unused variable
2019-07-03 22:32:15 +01:00
Sergio Martins
d5a05c4f38
Tests++
2019-07-03 22:29:53 +01:00
Sergio Martins
185d7edeb8
Fix build due to unused function
2019-07-03 19:08:56 +01:00
Sergio Martins
9c4a729a09
Remove unused variable
2019-07-03 19:05:17 +01:00
Sergio Martins
332860b763
tests++
2019-07-03 18:58:39 +01:00
Sergio Martins
d76e2380b3
Fix unit-test on Windows
...
We were resizing the window to a smaller size than it supports.
2019-07-03 18:06:24 +01:00
Sergio Martins
a311d44d67
Fix build
2019-07-03 15:25:40 +01:00
Sergio Martins
5341e7353e
add unit-test for using an embedded MainWindow
2019-07-02 15:57:55 +01:00
Sergio Martins
d4fba8e0f8
Fix cases where docked dock widgets wouldn't have the right placeholder
...
Previously dock widgets only cared about placeholders to mainwindow and
ignored FloatingWindow placeholders, but a placeholders can be transfered
from FloatingWindow to mainwindow, becoming interesting, and shouldn't
be ignored anymore
2019-07-02 14:31:44 +01:00
Sergio Martins
728322b965
Remove old placeholders before reattaching an item to a different location
...
As the item will get a new placeholder, so the old one is useless
and can even make the calculations harder
2019-07-02 09:50:40 +01:00
Sergio Martins
efe8389512
Add missing logging rule
2019-06-29 19:00:55 +01:00
Sergio Martins
2ebe772040
Fix placeholder support when the layout is empty
...
Didn't see it before as I was using MainWindow with a persistent
central frame. when there's no item there's no separator do adjust,
as the top,bottom,left,right are actually the window border.
2019-06-29 14:41:35 +01:00
Sergio Martins
064e0ecf77
Never close the MainWindow when closing a Frame.
...
We only close FloatingWindow
2019-06-28 20:02:26 +01:00
Sergio Martins
32e0af2f53
Ignore a warning when running under offscreen qpa
2019-06-28 19:09:50 +01:00
Sergio Martins
3bba8acddb
Introduce DockWidget::setCurrentTab() and isCurrentTab()
2019-06-28 14:23:03 +01:00
Sergio Martins
c18e21fffa
tst_placeholderCount: Do proper cleanup at the end
...
So the next test doesn't start with open windows.
Fixes the unit-tests
2019-06-26 14:07:59 +01:00
Sergio Martins
b7b8c7688e
Fix unneeded placeholder not being destroyed
2019-06-26 13:49:49 +01:00
Sergio Martins
6a44ccc2f3
tests: Add a reproducible bug
2019-06-26 10:11:25 +01:00
Sergio Martins
bb6862bdd4
unbreak tests
...
Forgot to use the default value when added the optional argument
2019-06-25 23:13:32 +01:00
Sergio Martins
576da0f530
tests: Ensure tst_addAndReadd doesn't leave garbage behind
2019-06-25 20:01:45 +01:00
Sergio Martins
6436d17495
Add function availableLengthForOrientation
2019-06-25 19:59:51 +01:00
Sergio Martins
7a6e9df2ed
Add support for placeholders
...
So dock widgets remember their previous position so can be restored.
TODO: Support playing with dock widget visibility
2019-06-25 19:38:50 +01:00
Sergio Martins
2093d02ac5
Split the Anchor class in Anchor and SeparatorWidget
...
This way state is separated from the widget code, and a lot less
comples.
Anchor is now just a QObject, to be renamed to Separator.
Now the state drives the widget, before it was confusing, where
m_position was set when receiving move events.
2019-06-23 23:52:27 +01:00
Sergio Martins
f7941f75c1
Make itemForWidget() receive Frame* and rename it to itemForFrame()
...
So we can catch bugs at compile time
2019-06-23 17:22:56 +01:00
Sergio Martins
eca39d0164
relativeTo is now a Frame* instead of QWidget*
...
As we only pass Frame*. This allows us to catch bugs at compile time.
2019-06-22 20:33:57 +01:00
Sergio Martins
1a36652ced
Fix unit-tests
...
Borken after Item started accepting only Frame*
2019-06-22 20:22:02 +01:00
Sergio Martins
6a549db7fa
Rename Item::widget() to Item::frame()
...
Since it returns a Frame, not only a QWidge
2019-06-22 19:06:58 +01:00
Sergio Martins
812ce6c29d
tests: Silence some -Wweak-vtables warnings
2019-06-22 19:06:12 +01:00
Sergio Martins
96cb4b8b07
Rename MultiSplitter to MultiSplitterLayout
...
As it's no longer a QWidget
2019-06-22 00:13:05 +01:00
Sergio Martins
0d367994c7
separate MultiSplitter into MultiSplitter and MultiSplitterWidget
...
This factors out the layouting code into a non-QWidget class, so
it can be reused
2019-06-21 23:56:25 +01:00
Sergio Martins
e1ba281254
Silence some clazy warnings in the tests and examples
2019-06-21 13:05:28 +01:00
Sergio Martins
cb0bc99285
cmake: Add -Werror -Wall -Wextra to gcc/clang
...
At least if DEVELOPER_MODE is enabled
2019-06-20 16:04:34 +01:00
Sergio Martins
77b2ed927d
tests: Try to fix build on macOS
2019-06-20 15:55:02 +01:00
Sergio Martins
3fc57d0223
Add a LayoutMemory class, memory in the sense that it remembers
...
Needed for restoring widgets to their positions when made visible
again
2019-06-20 12:57:27 +01:00
Sergio Martins
e99772fa4f
Hide the frame whenever DockWidget::setVisible(false) is called
2019-06-19 17:03:21 +01:00
Sergio Martins
566370eb32
readability: Renamed Frame::widgetCount() to Frame::dockWidgetCount()
...
dpcs++
2019-06-19 14:44:07 +01:00
Sergio Martins
41d75dd494
tests++
2019-06-19 12:58:05 +01:00
Sergio Martins
17ddc03b3f
Fix DockWidget::isTabbed() when it's in the central frame
...
The central frame always shows tabs
2019-06-19 11:24:13 +01:00
Sergio Martins
d047702e29
tests: Test redocking the frame before redocking the middle dock
...
The middle dock still finds its home.
2019-06-19 10:48:08 +01:00
Sergio Martins
cdcef34497
DockWidget::setFloating(false) now restores to the correct tab
2019-06-19 10:37:18 +01:00
Sergio Martins
ca4421e963
DockWidget::setFloating(false) now restores to previous tab
...
TODO: Restore to areas (non-tabbed). Will require a bigger refactoring.
2019-06-18 23:29:18 +01:00
Sergio Martins
0410963a3c
Fix calling DockWidget::setFloating(true)
...
The used titlebar wasn't the right one.
2019-06-18 22:02:59 +01:00
Sergio Martins
aa7ae24b8b
DockWidget: Rework setFloating/isFloating a bit
...
- setFloating() now works if the widget was tabbed.
- isFloating() changes the definition of floating a bit:
If a widget is tabbed into another one then it's docked, not tabbed.
To be floating it has to have it's own window and that window not have
any other dock widgets, which excludes side-by-side and tabbed stuff, even if it's
in a floating group (FloatingWindow)
2019-06-18 21:23:51 +01:00
Sergio Martins
e8bf44d238
tests: Add a minimal tst_isTabbed()
2019-06-18 18:29:27 +01:00
Sergio Martins
55d0968d96
tests: Print the warning category
2019-06-17 18:24:14 +01:00
Allen Winter
7241bf6794
various - move Author to its own line
2019-04-24 13:02:32 -04:00
Allen Winter
1574986a1b
various - update copyright year
...
also run dos2unix on a few files with CRLFs
2019-04-24 11:13:38 -04:00
Sergio Martins
87f2325c71
Fix copyrights
2019-04-24 15:27:04 +01:00
Sergio Martins
e43b673858
Initial commit
2019-04-24 14:49:01 +01:00