Commit Graph

721 Commits

Author SHA1 Message Date
Sergio Martins
de40629094 Remove duplicate signal "currentDockWidgetChanged"
Because they were not equivalent, one was emitted in situations
where the other wasn't. Use a single signal to avoid that.
2022-07-17 19:30:28 +01:00
Sergio Martins
3cfc4c484f tests: test that Group::currentIndex is correct 2022-07-17 18:52:18 +01:00
Sergio Martins
b1605cc58b Rename Group::tabWidget() to Group::stack()
Matches its class name now
2022-07-07 11:37:47 +01:00
Sergio Martins
934ba440b3 Rename itemForWidget to itemForView
itemForObject is removed as it's not used
2022-06-28 18:56:13 +01:00
Sergio Martins
0e6f38381b Rename hostWidget to hostView 2022-06-27 21:41:48 +01:00
Sergio Martins
cad7cb1c8f Remove View::parent() and Item::host()
Those deal in QObject, which is being phased out
2022-06-27 21:40:05 +01:00
Sergio Martins
07524ad00c Replace Qt::WindowState with KDDockWidget::WindowState 2022-06-26 20:45:28 +01:00
Sergio Martins
113cdbafe9 Trying to stabilize a test 2022-06-25 18:05:20 +01:00
Sergio Martins
c9fede2aab Remove the FloatingWindow window state overrides
Nothing is inheriting from controller now. Those methods are already
virtual in view, so just remove them from the controller
2022-06-25 17:41:03 +01:00
Sergio Martins
ae5cf1d723 More renaming of "frame" to "group" 2022-06-23 16:01:43 +01:00
Sergio Martins
bc767cefac Rename asFrameController to asGroupController 2022-06-21 17:32:38 +01:00
Sergio Martins
0aec6dfdb1 Rename more frame variables to group 2022-06-21 17:31:28 +01:00
Sergio Martins
9469273c7a Rename "frame" variables to "group" 2022-06-21 17:12:11 +01:00
Sergio Martins
fe7a8d450c Rename Frame class to Group 2022-06-21 16:34:20 +01:00
Sergio Martins
08518e02e0 various - fix some misspellings
(cherry-picked from commit f3da0f0547)
2022-06-19 13:00:06 +01:00
Sergio Martins
30f43d7579 Fix MainWindow not propagating close events to docked widgets
Nested FloatingWindows already supported it, so make it consistent.

Personal take: In a non-docking world, users can override their
main window close event and prevent a close, to save a document
or such. However, in a docking world, the main window developer
won't know which widgets are docked, so forwarding needs to happen,
as some might have documents to save.

(cherry-picked from commit 7db9938b85)
2022-06-19 00:46:49 +01:00
Sergio Martins
c30a266c01 Don't try to restore to previous position if there isn't any
(cherry-picked from commit 524dff9105)
2022-06-19 00:14:33 +01:00
Sergio Martins
66b91c1de3 Make redocking floating windows with tabs possible
TitleBar::isFloating() was returning false, while it should
have returned true.

Fixed by making isFloating() simpler and dumb. isFloating() should
only say if it belongs to a floating window or not. It shouldn't
contain any logic about whether button should be visible or not.

There's already logic elsewhere that will hide the float button
in case there's nesting.

Fixes issue #96 and #44

(cherry-picked from commit 0099a19a82)
2022-06-19 00:09:21 +01:00
Sergio Martins
8be6183543 Include cleanup
Removed unneeded controllers/ includes from headers
2022-06-18 09:15:30 +01:00
Sergio Martins
26ba2199cb Moved 2 more DockWidget enums to KDDockWidget.h
So users don't have to include controllers/DockWidget.h
2022-06-18 08:16:16 +01:00
Sergio Martins
a609f2233b Move DockWidgetOption enum to KDDockWidget.h
controllers/DockWidget.h is not something users will include directly
2022-06-18 00:27:58 +01:00
Sergio Martins
755bc6ac14 cmake: Don't add src/ to include path
Fully qualify includes instead
2022-06-14 16:57:22 +01:00
Sergio Martins
a4d337e891 Fully qualify header paths when including controllers
so this still works when private headers are installed
2022-06-13 23:24:43 +01:00
Sergio Martins
55620a5d10 TODO cleanup
Removed stale TODOs and promoted some to TODOm2 , as they should
be tackled next
2022-06-12 16:07:29 +01:00
Sergio Martins
ab2b481a80 cmake: QtQuick frontend no longer needs to link against QtWidgets 2022-06-12 14:43:17 +01:00
Sergio Martins
fb844bc989 Don't use QAction directly
In prepartion for qtquick frontend not needing QtWidgets
2022-06-11 18:48:37 +01:00
Sergio Martins
1acbf48786 Don't depend directly on QSizePolicy, as that's QtWidgets
Introduce our own enum. Soon our qtquick frontend won't link
against QtWidgets
2022-06-11 18:22:38 +01:00
Sergio Martins
e120f6f318 tests: Fix windows tests regarding frame pos vs client pos confusion
It's also more readable now.
Might break on linux though, will need to investigate further if that's
the case. In many cases it's just a timing issue, as some platforms are
"more async" than others to add frame
2022-06-11 16:17:10 +01:00
Sergio Martins
1070cbce87 tests: Remove unneeded test skipping on Qt < 5.15
Minimum is 5.15 nowadays
2022-06-10 23:12:10 +01:00
Sergio Martins
cfd90b6779 tests: Enable tests for QtQuick as they pass now 2022-06-10 19:25:37 +01:00
Sergio Martins
8e85e46ee9 tests: Make the view min size be the same as it was in 1.x 2022-06-08 19:02:01 +01:00
Sergio Martins
31992dcb83 tests: Fix tst_honourGeometryOfHiddenWindow on XCB
The suggested height should be smaller than the floating window
min-size.
2022-06-06 23:35:31 +01:00
Sergio Martins
0929fb1c75 qtquick: Fix showing qtquick window not setting the root item visible 2022-06-06 15:43:53 +01:00
Sergio Martins
5faf36700b Use qGuiApp instead of qApp
As QtQuick applications might not have QApplication.
2022-06-06 13:24:38 +01:00
Sergio Martins
7e3a82ed3e qtquick: Fix setting of transient parent window
We need to go through Window, not through View.
This even makes things cleaner, as parentView() shouldn't go across
window boundaries. That's the case for QtWidgets but it's not consistent
with QtQuick. Our View abstraction has saner rules
2022-06-05 14:12:22 +01:00
Sergio Martins
ce88a00b4b tests: Don't enable these qtquick tests yet
Was commited by mistake
2022-06-05 01:14:32 +01:00
Sergio Martins
ec4e22b5ae qtquick: Move the ClassicIndicator Q_PROPERTIES to the view
as that's what will be exposed to QtQuick
2022-06-05 00:54:30 +01:00
Sergio Martins
0f8823664c qtquick: Remove old references to FrameQuick 2022-06-04 20:24:12 +01:00
Sergio Martins
84561a9d67 tests: Remove unused color argument from createDockWidget() 2022-06-04 20:03:43 +01:00
Sergio Martins
affd1d12ae tests: Move the last qtwidgets only test to tst_qtwidgets.cpp
tst_docks.cpp is now completely rid of the widget ifdefs
2022-05-31 15:14:16 +01:00
Sergio Martins
300bd89728 tests: Port a bunch of KDDOCKWIDGETS_QTWIDGETS defines
These already existed in version 1.0, so just use the proper
guard. They won't be made generic at this point
2022-05-31 15:09:36 +01:00
Sergio Martins
61fb31b62a tests: Move a qtquick only test to tst_qtquick 2022-05-31 15:05:27 +01:00
Sergio Martins
6289e92e54 qtquick: Fix resizing root view
And uncommented the qtquick test for this, which now passes.
Moved the test to its own qtquick tests file.
2022-05-31 14:06:36 +01:00
Sergio Martins
94afae2729 windows: Reviewed and ported a bunch of Q_OS_WIN_OLD usages
Those are fine. Will tackle the difficult ones next.
2022-05-30 22:04:35 +01:00
Sergio Martins
d8e703275f windows: Replace Q_OS_WIN with Q_OS_WIN_TODO so we can start porting
Now it builds. This way I can port each Q_OS_WIN one by one and make
sure everything still builds, without risking breaking Linux/macOS.
2022-05-30 21:55:49 +01:00
Sergio Martins
c619c72094 tests: Introduce an env var to allow to run a subset of tests
by frontend
2022-05-30 18:57:59 +01:00
Sergio Martins
230317551b Move installMessageHandler() to Platform.h
It's not Qt specific, as other frontends might want to install
their own handler
2022-05-30 18:31:14 +01:00
Waqar Ahmed
39c058cd29 Fix messageHandler installation for Qt backends 2022-05-30 20:28:44 +05:00
Sergio Martins
2421e607a9 Users now instantiate DockWidget view instead of controller
The controllers are private and not intentend for the public.
2022-05-30 11:45:43 +01:00
Sergio Martins
eff711b9ca Port MainWindowMDI to the new architecture
Has a qtquick implementation now.
2022-05-29 21:57:08 +01:00