Sergio Martins
0be61b0a1b
qtquick: Don't delete dock widgets in frame view dtor
...
views shouldn't delete controllers
2022-06-06 13:44: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
995df8e3e8
qtquick: Remove qFatal in TabBar_qtquick::tabsAreMovable
...
It wasn't implemented in v 1.x either.
2022-06-06 11:29:14 +01:00
Sergio Martins
14189dc601
Make LayoutSaver deserializeWindowGeometry deal in Window instead of View
2022-06-06 11:23:07 +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
581451c342
Remove old ViewWrapper::asDropArea()
...
It's unneeded, and it wasn't implemented for QtQuick
2022-06-06 10:28:44 +01:00
Sergio Martins
eb198736b8
qtquick: Fixed drag indicators not working on main window
...
ViewWrapper::asDropArea() was dummy. Will remove it.
2022-06-06 10:23:48 +01:00
Sergio Martins
e8f390f2ad
tests|qtquick: Don't create lots of spurious QQuickView
...
Most of the times we just want to create a dock widget which
will be parented immediately, we don't need the window.
2022-06-06 10:13:19 +01:00
Sergio Martins
2beb4982b0
qtquick: Make Window_qtquick::rootView() behave like in v 1.x
...
The MainWindow might not be the QQuickView's root item, but
version 1.x would still return that. So preserve that, since it's
what tests expect.
We can improve after having tests passing.
2022-06-06 09:42:06 +01:00
Sergio Martins
46159d88bd
Add Window::containsView()
2022-06-06 09:25:45 +01:00
Sergio Martins
fbff1ed4a7
qtquick: Fix min size being violated in FloatingWindow ctor
...
Only set the suggested geometry after we added the frame.
This is the behaviour in 1.x too.
2022-06-06 09:24:38 +01:00
Sergio Martins
6bd87113b4
Simplify some code, add a View::transientWindow() shortcut
2022-06-05 14:19:08 +01:00
Sergio Martins
7e3a82ed3e
qtquick: Fix setting of transient parent window
...
We need to go through Window, not through View.
This even makes things cleaner, as parentView() shouldn't go across
window boundaries. That's the case for QtWidgets but it's not consistent
with QtQuick. Our View abstraction has saner rules
2022-06-05 14:12:22 +01:00
Sergio Martins
f9efe2755e
Fix LayoutSaver not restoring geometry correctly
...
"normalGeometry" was repeated twice due to typo
2022-06-05 13:31:08 +01:00
Sergio Martins
a88beb7574
qtquick: Implement missing methods for classic indicators
2022-06-05 12:53:22 +01:00
Sergio Martins
792aaf76da
Normalize handling of close event for Frame and FloatingWindow too
...
Fixes windows not closing correctly for QtQuick
2022-06-05 12:47:53 +01:00
Sergio Martins
f11a6a6a8c
Honour View::closeRequested signal
...
This noramalizes how both qtwidgets and qtquick were handling it.
Fixes tests related to close events in qtquick
2022-06-05 03:23:19 +01:00
Sergio Martins
6d926ee6e4
qtquick: Remove two more unneeded signals
2022-06-05 02:39:52 +01:00
Sergio Martins
666d4be478
qtquick: Fix wrong signal being emitted
...
It's the controller signal that is connected
2022-06-05 02:30:45 +01:00
Sergio Martins
ce88a00b4b
tests: Don't enable these qtquick tests yet
...
Was commited by mistake
2022-06-05 01:14:32 +01:00
Sergio Martins
075a9d30f0
qtquick: Make Layout::floatingWindow()
...
The layout might be parented to other intermediate stuff.
2022-06-05 01:12:18 +01:00
Sergio Martins
ec4e22b5ae
qtquick: Move the ClassicIndicator Q_PROPERTIES to the view
...
as that's what will be exposed to QtQuick
2022-06-05 00:54:30 +01:00
Sergio Martins
56ca80e8fc
qtquick: Fix crash when dereferencing incomplete stack controler
...
The stack controller CTOR was still in the stack (pun intended), then
dereferenced by tabbar. Instead, call Stack_qtquick::init() to intitialize
the the TabBar. At this point the Stack controller is already usable.
2022-06-04 21:30:43 +01:00
Sergio Martins
ec144472ce
Remove unneeded QWidget reference
2022-06-04 21:23:49 +01:00
Sergio Martins
991ced33f6
Rename createTabWidget() to createStack()
...
as done with the other classes already
2022-06-04 21:21:22 +01:00
Sergio Martins
78357b53a4
move some todos to milestone 3
2022-06-04 20:55:42 +01:00
Sergio Martins
16529c6704
qtquick: Port code that emitted frameGeometryChanged()
...
It's a public signal used by client code
2022-06-04 20:52:49 +01:00
Sergio Martins
1ead71442f
qtquick: Remove old rubber band code, this has been ported already
2022-06-04 20:41:57 +01:00
Sergio Martins
a3f2e8ec9a
qtquick: Rename tabBarObj to tabBarViewObj
...
Makes it clear it's a view
2022-06-04 20:39:41 +01:00
Sergio Martins
a2b5f40ed1
qtquick: Implement Stack_qtquick::tabBarObj()
2022-06-04 20:38:40 +01:00
Sergio Martins
d63a9db5a2
Port wayland commented out code
2022-06-04 20:30:20 +01:00
Sergio Martins
03a17c3a9d
Fix TODO about renaming variable
2022-06-04 20:26:35 +01:00
Sergio Martins
0f8823664c
qtquick: Remove old references to FrameQuick
2022-06-04 20:24:12 +01:00
Sergio Martins
cdaa03a413
qtquick: Fix Frame_qtquick::updateConstriants() not being called yet
2022-06-04 20:22:49 +01:00
Sergio Martins
e25a940ad1
qtquick: Implement DockWidget_qtquick::frameVisualItem()
2022-06-04 20:18:41 +01:00
Sergio Martins
9332eb3bf8
Remove unneeded FrameOptions argument from createFrame()
...
It's passed to the controller, the view doesn't need it.
2022-06-04 20:08:26 +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
e5b82e0a45
qtquick: Fix frame not getting parented to DropArea
2022-06-04 12:32:20 +01:00
Sergio Martins
6c5f477c31
cmake: Remove qtquick presets, they are unneeded now
...
The build will build both frontends now.
2022-06-04 12:15:23 +01:00
Sergio Martins
20546acc4e
cmake: Remove unneeded condition for old Qt
...
5.15. is the minimum nowadays
2022-06-04 12:07:51 +01:00
Sergio Martins
87319c69d2
cmake: Swap if/else branches to remove a negation
2022-06-04 12:05:59 +01:00
Sergio Martins
dc36435b35
cmake: Make the frontend discovery shorter
...
The fatal messages aren't needed, replaced by a REQUIRED find_package.
Added missing QtQuickControls find package from one branch, it was
only looking for QtQuick.
2022-06-04 12:03:26 +01:00
Sergio Martins
ea9bf1ef0f
cmake: Remove unneeded negation
2022-06-04 11:48:53 +01:00
Sergio Martins
adbaedef89
cmake: Don't require the user to specify a frontend.
...
It would error-out with "OFF is not a frontend"
Just use find_package instead and enable any compatible frontend.
2022-06-03 19:18:53 +01:00
Sergio Martins
2fafef87df
cmake: Replace ${PROJECT_NAME} with the actual project name
...
Because:
- Doesn't select the whole option name on double-click
- Not easily greppable on the terminal
It make's sense for any reusable cmake code though, we can replace
with ${PROJECT_NAME} again after factoring out any of our non-reusable
cmake code into a reusable module, if any.
2022-06-03 19:14:01 +01:00
Waqar Ahmed
cd88e19648
cmake: Add KDDockWidgets_FRONTENDS option
2022-06-03 16:10:41 +05:00
Sergio Martins
a2f1c1347a
cmake: Explicitly add QtWidgets as dependency of our widgets frontend
2022-06-02 23:33:20 +01:00
Sergio Martins
e74055c1fd
qtquick: Move titlebar invokables to the view
...
As that's what's exposed to QtQuick
2022-06-01 08:53:11 +01:00
Sergio Martins
1acafd8a6c
Remove unneeded MultiSplitterConfig
...
Config.cpp is enough
2022-05-31 23:31:29 +01:00