Commit Graph

108 Commits

Author SHA1 Message Date
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
1b0bae7780 Don't include Window.h in DockRegistry.h
As the latter is installed while the former is not.
Window.h depends on KDBindings so would rather not require it publically.
2022-06-18 13:06:29 +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
fb844bc989 Don't use QAction directly
In prepartion for qtquick frontend not needing QtWidgets
2022-06-11 18:48:37 +01:00
Sergio Martins
3c13f51017 tests: Also resize the view, not only the window when creating main window
Both are needed. This is how it worked in v1
2022-06-07 00:24:38 +01:00
Sergio Martins
a5ecfbdd91 tests: Fix createMainWindow having different behavior between frontends 2022-06-06 23:03: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
84561a9d67 tests: Remove unused color argument from createDockWidget() 2022-06-04 20:03:43 +01:00
Sergio Martins
f1f722f1ce Replace TODOv2 tags with TODOm2 and TODOm3 tags
Not all todos are required for milestone m2
2022-06-04 19:53:25 +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
20c41fa3b1 qtquick: Implement Platform_qtquick::tests_createNonClosableView() 2022-05-29 19:54:37 +01:00
Sergio Martins
5fdbc12524 Add some asserts 2022-05-27 12:53:22 +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
bb4f5a5037 Mass renaming of last usages of FrameworkWidgetFactory 2022-05-19 08:12:29 +01:00
Sergio Martins
cc8ee097a3 Remove last usage of QWidgetOrQuick type 2022-05-16 23:04:29 +01:00
Sergio Martins
1bacb31949 tests: Use generic view instead of QWidget NonClosableWidget 2022-05-16 22:55:46 +01:00
Sergio Martins
8372ffc0d7 tests: Remove all instances of QPushButton from tst_docks
Now uses generic alternatives that will work with other frontends too
2022-05-16 21:29:46 +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
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
fff3adf967 Rename View::window() to View::rootView()
window() was an artifact of Qt4 times, when QWindow didn't exist yet.
2022-05-01 22:52:00 +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
a6cbfbf065 Rename tests_sendEvent() to sendEvent()
Non-test code will also need it
2022-04-19 19:32:56 +01:00
Sergio Martins
a3d1990857 tests: Port more tests away from asQWidget() 2022-04-14 18:05:23 +01:00
Sergio Martins
924b32b3c5 tests: Port some QWindow based utils to Window::Ptr
So it doesn't depend on Qt
2022-04-13 23:49:29 +01:00
Sergio Martins
31db3d9562 Port away from QTest::qWaitForWindowActive, it's Qt specific
Simpliy moved it to Platform_qt
2022-04-11 11:37:31 +01:00
Sergio Martins
d6fd54cec4 Por all usages of QWindop/windowHandle to KDDockWidgets::Window
Removes a lot of asQWidget() code and is also prepared for non-Qt
views.
2022-04-09 19:21:56 +01:00
Sergio Martins
558bd42447 tests: Remove more QWidget dependencies 2022-04-07 00:49:36 +01:00
Sergio Martins
e593233b8f Renamed views_qtwidgets/ into qtwidgets/views/
As there will be some files that are specific to QtWidgets and
but aren't views
2022-04-03 23:51:02 +01:00
Sergio Martins
81e5d14e4f Cleanup DropArea and base classes re receiving QWidget
They receive View now
2022-04-03 23:19:53 +01:00
Sergio Martins
d5700d94e6 MainWindow controller now receives View parent instead of QWidget 2022-04-03 21:23:03 +01:00
Sergio Martins
15601fc3c9 Split MainWindow into view/controller 2022-03-30 11:51:31 +01:00
Sergio Martins
f2957e35d5 Moved MainWindow into Controllers namespace
All renamings and movings are done, next step is to make the controller
a proper controller, and same for the view.
2022-03-25 11:30:40 +00:00
Sergio Martins
8656108e81 Renamed MainWindowBase to MainWindow
As done for other controllers
2022-03-25 10:47:20 +00:00
Sergio Martins
63b5109113 Rename Views::MainWindow to Views::MainWindow_qtwidgets
As done for other views
2022-03-25 10:41:46 +00:00
Sergio Martins
264b08a731 Move MainWindow view into Views namespace 2022-03-25 10:40:16 +00:00
Sergio Martins
27007184aa Rename MainWindow.h to MainWindow_qtwidgets.h
Just like the other views.
2022-03-25 10:27:25 +00:00
Sergio Martins
7e2f448ae1 Moved MainWindowBase/MainWindow into controllers/view folder
This is just the move, not ported yet
2022-03-25 10:21:07 +00:00
Sergio Martins
c6d95c42a8 Split most widgets into a Controller and a View
Controllers don't have any GUI and don't depend on the frontend
technology.

Views are implemented in a specific GUI tech (QtWidgets, QtQuick, etc).

For now only QtWidgets work. There's still a lot to decouple.

This will make it easier to introduce non-Qt backends.
2022-03-24 16:05:37 +00:00
Allen Winter
93e60a743e update copyright year 2022-01-20 08:05:26 -05:00
Sergio Martins
4448891315 tests: Increase timeout when trying to active dock widgets
When running with ASAN everything is slower.
Added a warning to tests fail sooner if this happens.
2021-07-15 20:50:58 +01:00