Sergio Martins
08a1c4e6df
qtquick: Implement focus policy
...
fixes tst_dockWidgetGetsFocusWhenDocked
2020-11-18 12:35:46 +00:00
Sergio Martins
f4e33c1409
tests: Port the remaining tests to QtQuick
...
Tests now build with QtQuick too.
2020-11-17 15:26:14 +00:00
Sergio Martins
978f9d3a5e
tests: Port another test to QtQuick
...
29 to go
2020-11-06 23:52:48 +00:00
Sergio Martins
f4d9a96ddb
Added Config::Flag_KeepAboveIfNotUtilityWindow
...
Which sets Qt::WindowStaysOnTopHint for floating windows.
Usually unneeded, as floating windows are Qt::Tool with a transient
parent, but in case you're using Flag_DontUseUtilityFloatingWindows
then you might want (or not) to keep them above.
2020-11-05 12:11:48 +00:00
Sergio Martins
ddad0feaf3
tests: Additional 5 tests build for QtQuick now
...
37 to go
2020-11-02 20:04:14 +00:00
Sergio Martins
b84e0f3605
tests: More tests are now building with QtQuick
...
56 to go
2020-10-29 18:11:24 +00:00
Sergio Martins
7738585d01
tests: Enabled another batch of tests for QtQuick
...
83 of 175 are now building with QtQuick
2020-10-22 20:54:39 +01:00
Sergio Martins
f70722934c
qtquick: Port more tests
2020-10-19 20:47:09 +01:00
Sergio Martins
6f89d94eef
qtquick: Emit Frame::layoutInvalidated() when needed
...
When min/max size changes it needs to be emitted, so layout
notices
2020-10-19 20:06:29 +01:00
Sergio Martins
3a494d706a
qtquick: Implement missing QWidgetAdapter::floatingWindow()
2020-10-19 19:05:10 +01:00
Sergio Martins
97416607e5
qtquick: Allow to set min-sizes on items
2020-10-18 23:27:10 +01:00
Sergio Martins
e5f46ead3b
qtquick: Fix build
2020-10-16 17:08:36 +01:00
Sergio Martins
1f0b208922
qtquick: Enable tst_resizeWindow too
2020-10-10 12:15:18 +01:00
Sergio Martins
c175451284
qtquick: Fix user geometry not being honoured
...
QtQuick doesn't set Qt::WA_Moved, which we expect. Set this attribute
in the wrappers then.
Fixes the unit-test too.
2020-10-10 11:46:24 +01:00
Sergio Martins
9a88cf3a72
tests: Enable tst_honourUserGeometry for QtQuick
...
It's failing. Will fix.
2020-10-10 11:36:16 +01:00
Sergio Martins
63279c187e
quick: Fix QtQuick not reacting to parent change events
...
- We were calling event() directly, which skiped event filters.
- The handler was calling parent(), but the setParent() call is done
later. So first call setParentItem()
2020-10-09 19:09:45 +01:00
Sergio Martins
689ba7da8f
quick: Make dealing with window flags more stable
...
There's only one place where we need to set the flags, it's when
creating the FloatingWindowQuick. So no need to complex machinery
which is bug propne
2020-10-04 11:12:35 +01:00
Sergio Martins
2ea0d54e6c
quick: Fix floating windows not having the correct window flags
...
Add a unit-test too.
2020-10-03 23:30:13 +01:00
Sergio Martins
d4b3bf9de6
quick: Added support for showMinimized()
2020-10-03 18:11:33 +01:00
Sergio Martins
2b234f313c
quick: Remove some QWidget specific code from MainWindowBase
2020-10-03 18:10:23 +01:00
Sergio Martins
f0ac455ec1
Allow the window being dragged to be transparent
2020-08-23 17:44:57 +01:00
Sergio Martins
2c917dcd7c
qml: Show 4 proper indicators when dragging in a floating window
...
They don't do much yet, but at least appear.
2020-08-11 01:35:28 +01:00
Sergio Martins
0b4c017f22
qml: Add subs regarding focus
2020-08-08 17:34:06 +01:00
Sergio Martins
10026ba191
Add FocusScope behaviour to TitleBar
...
Github issue #56 is not a KDDW bug, it's how Qt works. QtWidgets don't
have focus scope. But let's workaround and handroll our own FocusScope.
Now the title bar can be colored differently if the dock widget it controls
contains any focused children.
This just implements half of the story. You have to focus a child
for the title bar to change color. Clicking the title bar directly
isn't done yet. Needs to be figured out. What do we focus when clicking it?
TitleBars usually don't care about keyboard focus. Probably we
just use the user's widget as a focus proxy.
2020-08-08 12:33:23 +01:00
Sergio Martins
051f8ab3a6
qml: Implement widgetForWindow
2020-08-06 23:17:28 +01:00
Sergio Martins
78dcb0f7f3
qml: Abstract some methods that QQuickItem doesn't have
...
geometry(), isMinimized(), etc.
2020-08-06 23:10:08 +01:00
Sergio Martins
c7afbf0803
qml: make qtTopLevelUnderCursor_impl() receive QWindow
...
QWindow works for both QtWidgets and QtQuick
2020-08-06 18:30:53 +01:00
Sergio Martins
769d34d746
qml: implement childAt
...
Added a namespace-level parentWidget() helper, so it works for
both widgets and quick
2020-08-06 17:51:49 +01:00
Sergio Martins
48433a05fb
qml: Fix stray windows not being deleted
2020-08-04 14:13:42 +01:00
Sergio Martins
3e3df799e6
qml: Deliver the close event
2020-08-04 13:53:31 +01:00
Sergio Martins
912f2de1ee
qml: Fix close
2020-08-04 13:16:49 +01:00
Sergio Martins
52626b1874
qml: Add support for the MainWindow
...
Not really a MainWindow in the sense of toolbars and all.
For qml it's just the drop area, acepting drops
2020-08-03 20:05:36 +01:00
Sergio Martins
4fd28f9577
qml: Implement more QtQuick API
2020-08-02 22:10:54 +01:00
Sergio Martins
31f391294c
qml: Implement a few "Implement me"s in the QtQuick glue
2020-08-02 20:05:02 +01:00
Sergio Martins
e4f6893324
qml: Fix warnings about dereferencing null types
2020-08-02 17:43:44 +01:00
Sergio Martins
197a0abb7e
qml: Wire up some events for DockWidget
...
Some events like QEvent::Show, Hide and Close are for QWidget only,
so we have to synthetize them, as KDDW expects them
2020-08-02 12:15:26 +01:00
Sergio Martins
7c77c9597e
qml: less debug noise
2020-07-31 20:37:28 +01:00
Sergio Martins
44da2dca65
qml: Implement dragging via title bar
...
needs to redirect the events from the mouse area to the
C++ draggable
2020-07-30 22:34:36 +01:00
Sergio Martins
8736d2cdb6
qml: Implement QWidgetAdapter::close() and window()
...
Clicking the title bar's close button now works
2020-07-29 23:58:46 +01:00
Sergio Martins
f8f596ad30
qml: Layout the drop area and title bar inside the FloatingWindow
...
We could just control geometry of the c++ title bar and geometry,
but then the user wouldn't be able to style it, and users rather
style things in QML than subclassing FloatingWindow and writing C++.
So instance some .qml files to represent the drop area and floating
window, so user can muck with.
Hierarchy looks like this now:
-QQuickWindow
--FloatingWindowQuick (C++ QQuickItem)
---FloatingWindow.qml
----TitleBar.qml (reads state from TitleBar c++)
----DropArea.qml
-----DropArea (C++ QQuickItem)
------Frame
etc
2020-07-29 23:28:05 +01:00
Sergio Martins
cbe6e47233
qml: Make the windows bigger for now
2020-07-28 22:27:15 +01:00
Sergio Martins
dc3a598594
qml: Fix no QEvent::ParentChange being sent
...
QWidget::setParent() does this but QQuickWidget doesn't, so do
it manually.
2020-07-28 22:25:43 +01:00
Sergio Martins
6738bb0ae1
qml: Implement QWidgetAdapter::parentWidget()
...
Frame gets access to its DropArea now
2020-07-28 22:25:09 +01:00
Sergio Martins
6104fdf2e0
qml: Implemented QWidgetAdapter::setFlag
...
FloatingWindow is frameless now.
2020-07-28 21:28:15 +01:00
Sergio Martins
f42f3804a1
qml: Add a default size for items
...
Otherwise it's 0x0
2020-07-28 21:17:28 +01:00
Sergio Martins
36e6613f6a
Fix build
2020-07-27 10:46:59 +01:00
Sergio Martins
0090799f7f
qml: Add missing API in QWidgetAdapter_quick_p.h
2020-07-27 10:44:02 +01:00
Sergio Martins
0659f1e52b
qml: Add missing API to the QtQuick wrapper
...
related to size hints and such
2020-07-26 21:00:22 +01:00
Sergio Martins
e9131897e4
qml: Remove QWidget'isms from DockWidgetBase
2020-07-26 16:16:06 +01:00
Sergio Martins
77307a1664
qml: Add more API to match the QWidget counter part
...
Namely isMaximized, showNormal and showMaximized
2020-07-26 16:01:13 +01:00