Commit Graph

50 Commits

Author SHA1 Message Date
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
73d627554a Remove Frame.h/cpp to Group.h/cpp
It's a better name.
Files only for now. Contents will come in a followup.
2022-06-21 08:51:52 +01:00
Sergio Martins
f8b1745c68 Forward QCloseEvent to the MDI widgets too
Fixes case where docked MDI widgets were not able to block a close

(cherry-picked from commit 61cca1e5ec)
2022-06-19 00:56:42 +01:00
Sergio Martins
d5e46dff31 MDI: Fixed closing dock widget in MDI would close main window
We only close the window when the window is a FloatingWindow and
it's the last frame

(cherry picked from commit 86419fd979)
2022-06-18 23:37:02 +01:00
Sergio Martins
60c6ffaabb Rename MDIArea class to MDIArea_qtwidgets
To match the filename now
2022-06-18 18:15:19 +01:00
Sergio Martins
408fe315ed Rename MDIArea.h to views/MDIArea_qtwidgets.h
As done for all other views. This one was missing
2022-06-18 17:51:19 +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
01b2bbc11c Rename "persistent widget" to "persistent view" 2022-06-15 19:27:04 +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
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
6aed1508af tests: Don't run tst_qtwidgets if only qtquick tests were specified 2022-06-11 12:38:57 +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
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
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
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
ad7f5f5970 tests: Remove some manual creation of QQuickView
It's abstracted by the platform now
2022-05-27 12:11:43 +01:00
Sergio Martins
03f1a6930c Added Platform::createMainWindow()
Called by tests and layout linter to create a main window.

Simplifies creation of the main window, we can now remove one of the ctors.
Before we supported both the controller creating the view and vice-versa,
while this is convenient it's complex to support, due to order or initializations.

Now, you a create a view, and it creates the controller behind the scenes.
MainWindow is special in this sense, as it's created by the end user, it's
not something internal we want in the ViewFactory.
2022-05-27 10:36:54 +01:00
Sergio Martins
07fc7d0437 tests: Move waitForDeleted() into Platform
So each platform can implement their own.
Meaning old Testing.cpp can be deleted too.
2022-05-20 16:41:59 +01:00
Sergio Martins
cc1f75b1b3 tests: Move our message filter into Platform_qt
So it can be reused by other tests
2022-05-20 16:29:14 +01:00
Sergio Martins
65c1b53ea0 tests: Some include cleanup 2022-05-18 04:48:31 +01:00
Sergio Martins
cc8ee097a3 Remove last usage of QWidgetOrQuick type 2022-05-16 23:04:29 +01:00
Sergio Martins
a10187ed5d tests: Port away further from "QWidgetOrQuick" 2022-05-16 20:01:08 +01:00
Sergio Martins
97baed0ef9 Rename layoutWidget variable/method name to layout
It's a controller, so don't suffix it with Widget/View
2022-05-15 21:12:01 +01:00
Sergio Martins
383e4f8abd tests: Use tests_createView() instead of MyWidget2
Decouples tests from Qt a bit more
2022-05-15 12:20:30 +01:00
Sergio Martins
f719697852 Remove DockWidget::setWidget(QWidget) 2022-05-14 09:38:55 +01:00
Sergio Martins
9f7c4cb217 Removed the DockWidgetBase typedef
That existed only to ease porting
2022-05-10 22:53:16 +01:00
Sergio Martins
985224f24b tests: Run tst_view on offscreen by default
Moved the QPA offscreen defaulting to Platform_qt
2022-05-08 19:38:52 +01:00
Sergio Martins
3fabf34bee Renamed View::windowHandle() to View::window()
windowHandle() is missnamed in Qt because QWidget::window() was already
taken in Qt4. But we can make it better here.
2022-05-01 23:09:18 +01:00
Sergio Martins
721d344533 tests: Delete platform when test finishes 2022-04-29 15:47:54 +01:00
Sergio Martins
9dc53f9755 tests: Create the QApplication in Platform ctor
Other frontends won't use QApplication, and QtQuick might even use
just QGuiApplication eventually
2022-04-29 15:36:16 +01:00
Sergio Martins
099a9018df Make it easier for tests to init the platform
Only a single static method is needed now, instead of 2.
2022-04-29 14:34:32 +01:00
Sergio Martins
3d1b450cbb Remove View::minimumSizeHint()
It's a QWidget specific concept, so move it to the qtwidgets
frontendcode. QtQuick won't need it.
2022-04-29 00:27:07 +01:00
Sergio Martins
3bb0c6a8d2 Move MDIArea to qtwidgets/ as it was never ported to QtQuick
Can be ported if needed
2022-04-25 20:16:25 +01:00
Sergio Martins
0f61ef63a2 Split DropArea and MDILayout into View/Controller 2022-04-25 18:50:41 +01:00
Sergio Martins
daa6afd14c Move DropArea into controllers/
In preparation to split it into View/Controller.
This is just the move, no code changed yet.
Next will be the namespace change.
2022-04-23 11:46:11 +01:00
Sergio Martins
28754ec260 Fold DropAreaWithCentralFrame into DropArea
This separation was never useful
2022-04-23 00:17:20 +01:00
Sergio Martins
33073c75ee tests: Remove the last usage of asQWidget() from tests/
Now only a few remaining in src/
2022-04-19 19:26:34 +01:00
Sergio Martins
80beeb7ffb tests: Remove last 2 usages of asQWidget from tst_qtwidgets.cpp
That method will be removed from View soon
2022-04-19 19:17:48 +01:00
Sergio Martins
d2b5bedfa1 tests: Remove another usage of deprecated asQWidget() 2022-04-19 19:14:58 +01:00
Sergio Martins
d5cec9f5de tests: Move QtWidget specific tests to tst_qtwidgets.cpp
Let's have less ifdefs
2022-04-19 19:07:57 +01:00