Commit Graph

4316 Commits

Author SHA1 Message Date
Sergio Martins
199ad09185 Fix shadowing warning 2022-06-29 10:53:46 +01:00
Sergio Martins
f3532e6ea0 Re-add windowForHandle to fix the windows build 2022-06-29 09:36:19 +01:00
Sergio Martins
cba3f77906 Revert "Remove Window::setProperty/property"
This reverts commit ff9a7fba69.

It's still being used by windows code paths
2022-06-29 09:35:12 +01:00
Sergio Martins
91e2df3ead Fix QtTest being included without a dev-mode guard 2022-06-29 10:19:57 +01:00
Sergio Martins
fd4431246c Remove the "groupViewInMDIResize" property from DockRegistry
Moved it into the QmlHelpers, as it's QtQuick specific.
Allows to remove a asQObject() call.
2022-06-28 21:40:12 +01:00
Sergio Martins
2f12cd8f3d Replace a QPointer with a ViewGuard
Removes another usage of asQObject
2022-06-28 20:47:57 +01:00
Sergio Martins
3ef91d8b7f Minor rename: m_draggableWidget -> m_draggableView 2022-06-28 20:36:55 +01:00
Sergio Martins
558eef792f Don't connect to QObject::destroyed directly
Connect to View::beingDestroyed instead.
Decouples more from QObject and allows to remove some asQbject()
calls
2022-06-28 20:33:02 +01:00
Sergio Martins
269e062609 Don't connect to QObject::objectNameChanged
Connect to the view's signal instead.
Decouples a bit more from QObject
2022-06-28 20:22:58 +01:00
Sergio Martins
2eb72114d7 Share View::setObjectName() implementation between qtwidgets/qtquick 2022-06-28 20:12:07 +01:00
Sergio Martins
a0d5c25c29 Remove 2 unneeded usages of QObject stuff 2022-06-28 19:23:43 +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
aff9806ab1 Port away from using event filter in DockWidget.cpp
Platform now abstract the emittion of window activation/deactivation
2022-06-28 18:36:10 +01:00
Sergio Martins
0cd515679f Don't handle ParentChange event directly, use the signal instead
This removes some duplicated code and decouples from QObject a bit
more
2022-06-28 17:24:03 +01:00
Sergio Martins
5a657785d7 Remove event filter from Item
In preparation for non-QObject views
2022-06-28 13:43:43 +01:00
Sergio Martins
39274d3e6b Fix crash 2022-06-28 13:35:31 +01:00
Sergio Martins
d92691bc5c Add a View::parentChanged() signal
Will help removing event filters from non-Qt code
2022-06-28 13:19:23 +01:00
Sergio Martins
83a2620015 Remove View_qtwidgets::asQWidget 2022-06-27 23:54:18 +01:00
Sergio Martins
3dd455bfb7 Port some code away from View::asQObject()
Use View_qt::asObject() instead
2022-06-27 23:37:27 +01:00
Sergio Martins
5389bcc825 Add View_qt as a base class for View_qtwidgets and View_qtquick
So it can contain the "asObject()" method, which we're removing
from View.h
2022-06-27 22:53:42 +01:00
Sergio Martins
49ccecbadd Remove some unneeded asQObject calls 2022-06-27 22:41:37 +01:00
Sergio Martins
64619d85e9 tst_qtwidgets: Remove some usages of asQObject() 2022-06-27 22:00:49 +01:00
Sergio Martins
1e5cbed254 View: Group virtual methods together 2022-06-27 21:55:44 +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
696ce887a8 docs: Add documentaiton about how to create a new frontend
Will be updating it as we go.
2022-06-26 22:33:46 +01:00
Sergio Martins
0a496aca76 tests: Add more tests for Window 2022-06-26 22:27:06 +01:00
Sergio Martins
68403c866b Fix Windows build 2022-06-26 21:14:13 +01:00
Sergio Martins
5669e07252 docs++ 2022-06-26 20:58:29 +01:00
Sergio Martins
07524ad00c Replace Qt::WindowState with KDDockWidget::WindowState 2022-06-26 20:45:28 +01:00
Sergio Martins
2f261b6b70 Add KDDockWidgets_p.h to hold private enums 2022-06-26 20:14:41 +01:00
Sergio Martins
ff9a7fba69 Remove Window::setProperty/property
Mostly unused and much easier to use a member variable.
2022-06-26 20:08:21 +01:00
Sergio Martins
d43c68bef4 Add a test for Window::handle 2022-06-26 20:01:56 +01:00
Sergio Martins
5dbf3590f8 Minor API cleanups 2022-06-26 20:00:07 +01:00
Sergio Martins
6ff0a5d759 Window documentation and make some functions not virtual 2022-06-26 19:42:06 +01:00
Sergio Martins
2ee9debb66 dummy: Add needed virtual implementations to Window_dummy.cpp 2022-06-26 19:14:16 +01:00
Sergio Martins
9aab0af1dc qtquick: Fix View::setVisible(false) always showing the window
Adds some tests for Window too.
2022-06-26 01:23:26 +01:00
Sergio Martins
820161ba29 tests: Added Platform::createDefaultViewFactory test 2022-06-26 00:37:10 +01:00
Sergio Martins
0024ed54c8 tests: Add tst_platform 2022-06-25 23:34:30 +01:00
Sergio Martins
f08efcdab7 Add missing pure virtual implementation to dummy frontend 2022-06-25 23:07:36 +01:00
Sergio Martins
3b8e3b6c6b Add a dummy frontend
Goal will be that people can copy it to start a new frontend
2022-06-25 20:34:49 +01:00
Sergio Martins
c1f6d64ac3 Remove a TODO and add some docs 2022-06-25 19:00:12 +01:00
Sergio Martins
a74d2aae7a tests: Add initial test for Window 2022-06-25 18:52:36 +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
f640d8852b Fix maximize button not being updated
Moved logic into controller
2022-06-25 16:29:41 +01:00
Sergio Martins
8f10d86cad Fix minimize button not being updated 2022-06-25 16:14:36 +01:00
Sergio Martins
02ef55f9f1 Fix auto-hide button not being updated
Moved logic from view into controller.
2022-06-25 13:50:17 +01:00
Sergio Martins
6cd6408bef cmake: Install v1.x compatible headers for QtWidgets
It's nicer to include DockWidget.h than views/DockWidget_qtwidget.h.
QtQuick won't need pretty headers as the recommended way is to use from QML
directly, not C++
2022-06-25 13:13:00 +01:00
Sergio Martins
7ec71d65be Merge branch 'master' into 2.0 2022-06-25 12:54:32 +01:00