Commit Graph

1069 Commits

Author SHA1 Message Date
Sergio Martins
502f2e7d4b TitleBar: Add a title property, so we can see it under Gammaray 2019-07-03 16:00:32 +01:00
Sergio Martins
a311d44d67 Fix build 2019-07-03 15:25:40 +01:00
Sergio Martins
b9ae1b74c2 Don't include moc in the cpp file
Breaks with weird build systems
2019-07-03 15:22:03 +01:00
Sergio Martins
ca8a72d304 DragController: Work with MFC windows too
A MFC window with an embedded QMainWindow doesn't appear in
topLevelWindows(), so we need an extra check.
2019-07-03 15:13:27 +01:00
Sergio Martins
9fc631a589 Add logging related to top-levels 2019-07-03 14:12:32 +01:00
Sergio Martins
c1b7dcbc57 Just assert here 2019-07-03 12:59:01 +01:00
Sergio Martins
c2fd238377 Expose Button
Allows to remove the moc include which isn't working on weird
build systems
2019-07-03 12:58:16 +01:00
Sergio Martins
94ed5d49ef Rename static variable 2019-07-03 12:57:53 +01:00
Sergio Martins
d0598ab3c9 Fix non-developer-mode build 2019-07-03 11:54:27 +01:00
Sergio Martins
5341e7353e add unit-test for using an embedded MainWindow 2019-07-02 15:57:55 +01:00
Sergio Martins
daf18e9153 Protect against re-entrancy 2019-07-02 15:15:54 +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
31283f00a3 Delete the spliter widget too
not only the layout
2019-07-01 22:54:01 +01:00
Sergio Martins
f8b414fc57 Delete FloatingWindow if the MultiSplitter was destroyed
It's destroyed when MultiSplitterLayout::addMultiSplitter() is called
2019-07-01 22:52:07 +01:00
Sergio Martins
ec0c4e09ce Accept a nullptr item here 2019-07-01 13:39:45 +01:00
Sergio Martins
346b7a0346 Add MultiSplitter::dockWidgets() 2019-07-01 13:36:45 +01:00
Sergio Martins
6eacce8562 Add some getters for the frame list 2019-06-30 16:07:58 +01:00
Sergio Martins
d59dcfbf8d debug++ 2019-06-30 16:07:04 +01:00
Sergio Martins
786eb5298f Fix some includes 2019-06-30 16:04:39 +01:00
Sergio Martins
9ac5c4fb9a docs++ 2019-06-30 13:15:59 +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
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