Commit Graph

944 Commits

Author SHA1 Message Date
Sergio Martins
260fd1db7c debug++ 2019-06-28 18:44:21 +01:00
Sergio Martins
b3f7f82602 Expose Item::geometry() as property, for debugging 2019-06-28 17:24:11 +01:00
Sergio Martins
e048cc0455 Add more properties for Gammaray 2019-06-28 16:59:25 +01:00
Sergio Martins
3bba8acddb Introduce DockWidget::setCurrentTab() and isCurrentTab() 2019-06-28 14:23:03 +01:00
Sergio Martins
b7c8eba101 Remove unneeded method 2019-06-28 13:42:28 +01:00
Sergio Martins
69d74bdd2c Minor debug improvement 2019-06-28 13:42:28 +01:00
Sergio Martins
7645a22cd0 Fix flaky resizing on some platforms
Use ev->globalPos() instead of ev->pos() as recommended by Qt docs
2019-06-28 13:12:52 +01:00
Sergio Martins
00f56e2339 Minor renaming 2019-06-27 19:42:50 +01:00
Sergio Martins
e34e53165d docs++ 2019-06-27 19:37:32 +01:00
Sergio Martins
2600a099c8 Restore to placeholder when setting visible to true 2019-06-26 18:03:30 +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
9d77fbfed1 Add MultiSplitterLayout::placeholderCount() 2019-06-26 11:39:22 +01:00
Sergio Martins
8e0633e951 itemAt() should ignore placeholder items 2019-06-26 11:38:05 +01:00
Sergio Martins
caae965f8d Minor coding style 2019-06-26 11:37:56 +01:00
Sergio Martins
2927bf62a9 Fix unit-tests crash
If the parent is in QObject dtor then qobject_cast will fail
2019-06-26 11:25:38 +01:00
Sergio Martins
d47a4a3bda We don't accept null parents here 2019-06-26 11:19:52 +01:00
Sergio Martins
1635c9c7dd docs++ 2019-06-26 11:13:15 +01:00
Sergio Martins
c5f582bc76 Make MultiSplitterLayout::parentWidget() return MultiSplitterWidget
As it's the only thing it can return
2019-06-26 11:12:19 +01:00
Sergio Martins
6a44ccc2f3 tests: Add a reproducible bug 2019-06-26 10:11:25 +01:00
Sergio Martins
d3185e4975 Improve the TitleBar float button
Now it redocks to previous place
2019-06-25 23:14:38 +01:00
Sergio Martins
3be3c2775b Support restoring placeholders when the bottom/right anchor moves 2019-06-25 23:14:12 +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
53b1805f95 Add TitleBar::isFloating() and Frame::isFloating() 2019-06-25 20:18:35 +01:00
Sergio Martins
1700b72240 Rename Draggable::isFloating() to Draggable::isFloatingWindow()
Because it's what it does
2019-06-25 20:18:01 +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
2a322005d0 Fix typos pointed out by krazy 2019-06-25 19:44:43 +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
0c9b27e213 Fix crashes pointed out by valgrind
The anchors were deleted by consume()
2019-06-24 18:16:50 +01:00
Sergio Martins
2f86d312f1 Fix crash when dereferencing Anchor after it was deleted 2019-06-24 18:08:16 +01:00
Sergio Martins
5dc6cec25e Fix some off-by-ones leading to top anchor having -1 position 2019-06-24 17:39:40 +01:00
Sergio Martins
ada118c66d Remove assert which is fine 2019-06-24 16:29:47 +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
a5ea350c5a Fix crash
The assert is too agressive, as the case is fine
2019-06-23 20:55:21 +01:00
Sergio Martins
64ed3a9ddf Remove duplicated logging category 2019-06-23 20:38:04 +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
1e5db1ad4b Anchors: Assert that position is positive 2019-06-23 16:55:54 +01:00
Sergio Martins
5e218d843c Some renaming and const 2019-06-23 16:39:05 +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
3fe5eee9a9 Item: Deal in terms of Frame instead of QWidget
To catch errors at compile-time where we might be inserting
non Frames
2019-06-22 18:55:26 +01:00
Sergio Martins
9e5280c151 debug++ 2019-06-22 12:27:43 +01:00
Sergio Martins
5949fa8940 Remove unused Anchors enumerator 2019-06-22 10:41:15 +01:00
Sergio Martins
9632a906ab Remove unused class, this won't cover all the uses cases 2019-06-22 10:31:57 +01:00
Sergio Martins
3e884e800e Silence debug 2019-06-22 10:17:32 +01:00
Sergio Martins
dddf5f026a Remove unneeded qDebug 2019-06-22 01:11:52 +01:00
Sergio Martins
e8a81ba433 Rename some m_multiSplitter to m_layout 2019-06-22 00:30:49 +01:00