Sergio Martins
ebb623f080
Initialize static resources in the correct platform
...
Non-Qt platforms won't have to do this
2022-05-26 23:16:02 +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
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
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
7fbd1ea920
Added Platform::startDragDistance()
...
As its value is per platform.
2022-05-15 22:31:40 +01:00
Sergio Martins
b6d87d10c4
Add a TestHelpers_ file for each platform
...
So we don't have too much ifdefed stuff that's only for tests in
the main files.
2022-04-30 10:31:31 +01:00
Sergio Martins
c55cac97d0
tests: Add unit-test for View::setParent()
2022-04-29 18:46:28 +01:00
Sergio Martins
8d09acdf5f
tests: Fix warning about requiring to call init after qApp
2022-04-29 18:05:24 +01:00
Sergio Martins
9dc53f9755
tests: Create the QApplication in Platform ctor
...
Other frontends won't use QApplication, and QtQuick might even use
just QGuiApplication eventually
2022-04-29 15:36:16 +01:00
Sergio Martins
aa72a8cd5a
Add Platform_qtwidgets::init(), so we can share some code with ctors
2022-04-29 15:09:43 +01:00
Sergio Martins
099a9018df
Make it easier for tests to init the platform
...
Only a single static method is needed now, instead of 2.
2022-04-29 14:34:32 +01:00
Sergio Martins
34b07ef340
Delete the Platform when a test is complete
...
So that we support testing multiple platforms in the same test run
2022-04-29 14:05:35 +01:00
Sergio Martins
8015e49bee
Add Platform::screenSizeFor(window), removes more asQWidget() usage
2022-04-21 22:10:59 +01:00
Sergio Martins
4946cdeed3
Add Platform::screenNumberFor, removes more asQWidget() usage
2022-04-21 21:47:55 +01:00
Sergio Martins
05deea3cd8
tests: Move some ifdefed code to their respective platforms
2022-04-19 17:44:36 +01:00
Sergio Martins
8e4e998e74
tests: port away from QApplication::topLevelAt()
2022-04-14 23:44:39 +01:00
Sergio Martins
432ff65cc2
Remove QTimer hacks from Platform
...
It's now instantiated after qApp, so it's safe
2022-04-11 01:48:48 +01:00
Sergio Martins
037140b980
Add KDDockWidgets::initPlatform()
...
Instead of using the static variable, which is initialized before
having QApplication.
Will allow us to remove the QTimer from Platform init
2022-04-11 00:55:28 +01:00
Sergio Martins
8cd05c7314
Add Platform::createDefaultFrameworkWidgetFactory()
2022-04-10 23:54:52 +01:00
Sergio Martins
d6fd54cec4
Por all usages of QWindop/windowHandle to KDDockWidgets::Window
...
Removes a lot of asQWidget() code and is also prepared for non-Qt
views.
2022-04-09 19:21:56 +01:00
Sergio Martins
95671f9d9a
Add Platform_qt, a baseclass for both Qt frontends
...
So we can share some code between QtQuick and QtWidgets
2022-04-07 23:48:40 +01:00
Sergio Martins
4944ad5882
Add Platform::qobjectAsView()
...
to be removed once we port away from Qt, but needed for now to
support QtQuick
2022-04-07 23:10:01 +01:00
Sergio Martins
793e48150a
Don't access qApp directly from Platform's ctor
...
QApplication might not be created yet, so delay it
With a timer for now. Don't guarantee this will stay.
Explicit init by the user might be an alternative.
2022-04-05 22:29:01 +01:00
Sergio Martins
3ba4bc2d08
Add Platform::focusedView() and respective signal
...
Implemented as QGuiApplication::focusObjectChanged() for Qt,
other frontends will have their own impl.
2022-04-05 21:53:52 +01:00
Sergio Martins
631736b202
Abstract away a call to qApp->activePopupWidget()
...
It's now generic and doesn't depend on QApplication.
Removes an ifdef.
2022-04-04 16:43:01 +01:00
Sergio Martins
6fcc55ce60
Add missing include
2022-04-04 16:30:41 +01:00
Sergio Martins
a36f85aae3
Add Platform and Platform_qtwidgets
...
So we can start removing QtWidgets vs QtQuick ifdefs.
Each "platform" will implement the differences
2022-04-04 16:21:35 +01:00