Commit Graph

3051 Commits

Author SHA1 Message Date
Sergio Martins
c554bdc68c Fix DropArea only looking for QtWidget children
Instead of using findChildren(), just ask the layout for the
items.

tst_floatingWindow now doesn't crash anymore when looking for
the layout items.
2022-05-26 09:58:23 +01:00
Sergio Martins
4a8ac4a309 Remove unneeded assignment, since we're using scoped rollback 2022-05-26 09:54:31 +01:00
Sergio Martins
042cabbe5d Use a RAII class to emit floatingChanging()
Otherwise during reparenting the signal can be emitted by mistake.
Now we only check at the end if we need to emit it.
2022-05-26 09:29:37 +01:00
Sergio Martins
a85c56a25a Implement ViewWrapper::is() 2022-05-23 23:37:25 +01:00
Sergio Martins
ac51ffc7d4 tests: Add tests for DockWidget and FloatingWindow ctor
To catch potential QML errors in the .qml files.
2022-05-23 23:06:32 +01:00
Sergio Martins
c648e5fbba qtquick: View::rootView() now returns itself if no parent
This matches QWidget::window() behaviour
2022-05-23 22:51:57 +01:00
Sergio Martins
6fd88a8570 qtquick: Add missing properties to floating window
They return QObject as they can't be fwd declared in Qt 6 and might
have circular dependency.
2022-05-23 22:31:54 +01:00
Sergio Martins
821002ce43 qtquick: Add QML interface to TitleBar_qtquick 2022-05-23 17:12:35 +01:00
Sergio Martins
dab7195408 tests: Fix view factory being overridden
It's set during init
2022-05-23 16:39:03 +01:00
Sergio Martins
349816dab7 qtquick: Add QML interface for Frame
Since the controllers won't be QObjects eventually, we need the
C++ views to hold the properties.
2022-05-23 15:55:54 +01:00
Sergio Martins
e09a328281 qtquick: Add missing isMDI Q_PROPERTY 2022-05-21 10:36:41 +01:00
Sergio Martins
8c757955b5 qtquick: Fix signal connection in Frame 2022-05-21 10:33:14 +01:00
Sergio Martins
e7d20a403a qtquick: Dont' crash in frame ctor 2022-05-21 10:26:12 +01:00
Sergio Martins
bafa21d11c tests: Abort tests if there were warnings 2022-05-21 00:00:14 +01:00
Sergio Martins
07fc7d0437 tests: Move waitForDeleted() into Platform
So each platform can implement their own.
Meaning old Testing.cpp can be deleted too.
2022-05-20 16:41:59 +01:00
Sergio Martins
cc1f75b1b3 tests: Move our message filter into Platform_qt
So it can be reused by other tests
2022-05-20 16:29:14 +01:00
Sergio Martins
4a7446e57b qtquick: Build QmlTypes.cpp
Still a bit commented out
2022-05-20 15:02:33 +01:00
Sergio Martins
fc0fa1c58c qtquick: Return the correct paths for qml files 2022-05-19 19:28:48 +01:00
Sergio Martins
bb4f5a5037 Mass renaming of last usages of FrameworkWidgetFactory 2022-05-19 08:12:29 +01:00
Sergio Martins
09eb303bab Rename some methods from FrameworkWidget to View 2022-05-19 08:00:20 +01:00
Sergio Martins
4708b2c25d Rename FrameworkWidgetFactory_qtwidgets|qtquick to ViewFactory_* 2022-05-19 07:51:50 +01:00
Sergio Martins
e514a8c3e1 Rename FrameworkWidgetFactory to ViewFactory
We now deal in views instead of widgets, and the "Framework"
part was redundant. It's also shorter now
2022-05-18 23:12:43 +01:00
Sergio Martins
aefbbd5738 Allow the classic/segmented views be created by FrameworkWidgetFactory
Instead of the controllers. We only allow the user to customize
the views.
2022-05-18 23:10:27 +01:00
Sergio Martins
ab881c9b5a Fix fwd declaration typo 2022-05-18 22:54:49 +01:00
Sergio Martins
e54ebd096c Both ClassicIndicatorsWindow qtquick and qtwidgets build
They don't clash anymore. Rename them to include the suffix.
Next step is abstracting the creation of IndicatorWindow so we
remove the last qtwidget traces from ClassicIndicators.cpp
2022-05-18 05:27:24 +01:00
Sergio Martins
6054ccfdf2 Move Indicator class into .cpp file
It's impl detail
2022-05-18 05:19:24 +01:00
Sergio Martins
2fda6d11e1 Removed the qtquick/qtwidgets ifdefs from ClassicIndicatorsWindow_*
They now each have their own implementation.
qtquick one still not compiling, as it duplicates symbols.
2022-05-18 05:10:01 +01:00
Sergio Martins
34c25a065a Copy ClassicIndicatorsWindow.cpp into qtwidgets and qtquick
No other changes made.
In preparation to remove the ifdefs.
2022-05-18 05:03:15 +01:00
Sergio Martins
89ceb01b59 Remove some classes that were copied instead of renamed 2022-05-18 04:49:54 +01:00
Sergio Martins
522b2623be Moved DropIndicatorOverlay into controllers/ folder 2022-05-18 04:47:01 +01:00
Sergio Martins
d2bf83e4ac Rename DropIndicatorOverlayInterface to DropIndicatorOverlay
We don't suffix our base classes with "Interface"
2022-05-18 04:39:21 +01:00
Sergio Martins
30c3a047d1 Move the indicator classes into controllers/indicators/ 2022-05-18 04:35:33 +01:00
Sergio Martins
2b6c18dbcd Move the drop indicators into Controllers namespace 2022-05-18 04:24:16 +01:00
Sergio Martins
7b486bb28c qtwidgets: Add views for the Classical and Segmented indicators
Copied from indicators/
2022-05-18 04:10:01 +01:00
Sergio Martins
10b61f0e30 Remove unused Type::DropIndicatorOverlayInterface 2022-05-17 23:45:54 +01:00
Sergio Martins
1b35810766 Add Platform::createView()
For when kddw internalls need to create an empty view.
Use case will be to create the parent widget for the drop indicators.
2022-05-17 23:43:41 +01:00
Sergio Martins
fc0160213e Remove old MDILayoutWidget_p.h file
It has been renamed already
2022-05-17 22:18:40 +01:00
Sergio Martins
a039f102a3 Remove some unneeded QWidget includes 2022-05-17 22:16:00 +01:00
Sergio Martins
41efefa21e Port away from ViewWrapper_qtwidgets in the backend
Only qtwidgets frontend is allow to use this type
2022-05-16 23:10:04 +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
be8250acb7 tests: Remove instances of QLineEdit from the tests
It's now generic
2022-05-16 21:59:43 +01:00
Sergio Martins
7fbd1ea920 Added Platform::startDragDistance()
As its value is per platform.
2022-05-15 22:31:40 +01:00
Sergio Martins
ef4a0214ed Added Platform::isQtWidgets()
Removes it from Utils_p.h
2022-05-15 22:23:34 +01:00
Sergio Martins
d5ac23a8d2 qtquick: Implement DefaultWidgetFactory_qtquick
Requires implementing some pure-virtuals in the views too
2022-05-15 22:14:51 +01:00
Sergio Martins
7434865967 Move Layout.cpp to controllers/ folder
as it's a controller
2022-05-15 21:30:31 +01:00
Sergio Martins
f29d3bf5f8 Move Layout into Controllers namespace 2022-05-15 21:22:26 +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
378f380968 Rename LayoutWidget to Layout , since it's not a view
Controllers shouldn't be suffixed
2022-05-15 21:04:07 +01:00
Sergio Martins
8e506aa327 Rename LayoutWidget.cpp to Layout.cpp , as it's a controller 2022-05-15 16:51:55 +01:00