Commit Graph

79 Commits

Author SHA1 Message Date
Sergio Martins
b6460c11f7 Add EventFilterInterface::onMouseEvent()
Some event consumers don't want to overload N methods and just
overload one instead
2022-07-04 22:06:30 +01:00
Sergio Martins
9283a55364 Fix Platform only sending mouse press event
Was ignoring other mouse event types
2022-07-03 22:26:15 +01:00
Sergio Martins
35c1517709 Handle double click event in EventFilterInterface too 2022-07-03 22:21:57 +01:00
Sergio Martins
84da42c262 Add Platform_qt::isLeftMouseButtonPressed() 2022-07-03 21:44:42 +01:00
Sergio Martins
1bcd425849 Add Platform::displayType() 2022-07-03 21:36:32 +01:00
Sergio Martins
aafa9526f6 Add Platform::organizationName()
So we don't use QCoreApplication::organizationName() directly
2022-07-03 20:56:48 +01:00
Sergio Martins
16565fcd46 Add Platform::setMouseCursor()
So we don't depend directly on qGuiApp
2022-07-03 20:04:53 +01:00
Sergio Martins
f288d953fc Add Platform::applicationName()
so controllers don't access qGuiApp directly
2022-07-03 19:55:26 +01:00
Sergio Martins
c63290e6d3 Port WidgetResizeHandler away from Qt event filter 2022-07-02 21:27:11 +01:00
Sergio Martins
0963967939 Add mouse move and release events to EventFilterInterface 2022-07-02 20:15:13 +01:00
Sergio Martins
ba71ad7407 View_qt: Deliver events to any subscribed event filters
Next we'll por some Qt event filters to View's event filter abstraction
2022-07-02 13:43:38 +01:00
Sergio Martins
edb2538220 Port DockRegistry away from Qt event filters
Uses our filter abstraction now
2022-07-02 12:50:52 +01:00
Sergio Martins
5639b5632a tests: Construct QCoreApplication earlier
The global event filter wasn't being set as it didn't have
a qGuiApp at that point
2022-07-02 12:48:16 +01:00
Sergio Martins
c72fdf3586 Add EventFilterInterface and port DockRegistry to it
Some classes wont have any Qt in it, so they need another way
to install global event filters. Added API to Platform.h for this
purpose. Implemented as regular event filter in Platform_qt.
2022-07-01 15:28:15 +01:00
Sergio Martins
a690477b73 Move isProcessingAppQuitEvent from DockRegistry to Platform
As different platforms will do this differently
2022-07-01 11:31:40 +01:00
Sergio Martins
199ad09185 Fix shadowing warning 2022-06-29 10:53:46 +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
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
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
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
07524ad00c Replace Qt::WindowState with KDDockWidget::WindowState 2022-06-26 20:45:28 +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
6ff0a5d759 Window documentation and make some functions not virtual 2022-06-26 19:42:06 +01:00
Sergio Martins
82b3aba854 Remove ViewWrapper*h from public API 2022-06-24 17:20:09 +01:00
Sergio Martins
0a9506cd21 Probably fix Qt namespaced build 2022-06-24 17:00:01 +01:00
Sergio Martins
10c918b93c Use View instead of ViewWrapper in the api
The latter will be an implementation detail soon
2022-06-24 00:10:50 +01:00
Sergio Martins
729624ab04 EGLFS: Don't raise the main window when docking
EGLFS doesn't honour that the floating windows should be
on top and will make the floating windows go behind.

It's also unneeded to raise it on eglfs, since it's fullscreen.

(cherry-picked from commit d06c6e8f11)
2022-06-19 14:37:52 +01:00
Sergio Martins
c0d1bd3f92 tests|qtquick|Windows: Stabilize a test
The warning is benign and unrelated to anything kddw is doing

(cherry-picked from commit 1f638d2c7a)
2022-06-19 12:16:46 +01:00
Sergio Martins
d7b57d460f cmake: Don't install Window*h and Item_p.h
They are unneeded, and expose kdbindings
2022-06-18 11:46:46 +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
3ab3076263 Fix some low hanging TODOs 2022-06-13 02:37:03 +01:00
Sergio Martins
0031f1bcfd Release build now builds 2022-06-11 15:24:19 +01:00
Sergio Martins
02a8da4fb8 tests: Remove whitelisted warning
It doesn't happen anymore
2022-06-11 14:10:00 +01:00
Sergio Martins
29fd6f4a40 qtquick: Fix binding loops
This also restores behaviour with v1.x regarding setParent
2022-06-11 14:03:41 +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
9c881ec53e Normalize how we set top level window geometry
Prefer Window API, since for QtQuick the root view isn't so tighly
coupled with the QWindow as in QWidgets world. Hide the difference in
Window_qtwidgets.cpp, which now prefers the QWidget API whenever possible,
as that's better tested than using QWindow direclty.
2022-06-06 11:17:42 +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
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
bc6417c923 Added Window::framePosition() 2022-05-31 11:33:08 +01:00
Sergio Martins
f9df3c5872 windows: Port system move support 2022-05-30 23:42:41 +01:00
Sergio Martins
827008a96a windows: Port some code from QWindow to Window
Removed the respectives Q_OS_WIN_TODO as they compile now
2022-05-30 22:54:20 +01:00
Sergio Martins
83cc6f1b0c Add Window min/max size getter 2022-05-30 22:27:58 +01:00
Sergio Martins
7a21857ea7 Added Window::property() 2022-05-30 22:05:43 +01:00