qtquick: Allow the user to pass a different QQmlEngine to DockWidget

Like was the case in v1.x
This commit is contained in:
Sergio Martins
2022-06-12 15:51:00 +01:00
parent 1f7ac6897c
commit 5a99c8390a
4 changed files with 30 additions and 11 deletions

View File

@@ -25,12 +25,9 @@
QT_BEGIN_NAMESPACE
class QAbstractButton;
class QQmlEngine;
QT_END_NAMESPACE
namespace Layouting {
class Widget;
}
namespace KDDockWidgets {
class DropIndicatorOverlay;
@@ -58,6 +55,10 @@ public:
Controllers::DockWidget::Options options = {},
Controllers::DockWidget::LayoutSaverOptions layoutSaverOptions = {},
Qt::WindowFlags windowFlags = {}) const override;
virtual View *createDockWidget(const QString &uniqueName,
QQmlEngine *, Controllers::DockWidget::Options options = {},
Controllers::DockWidget::LayoutSaverOptions layoutSaverOptions = {},
Qt::WindowFlags windowFlags = {}) const;
View *createFrame(Controllers::Frame *, View *parent) const override;
View *createTitleBar(Controllers::TitleBar *, Controllers::Frame *) const override;
View *createTitleBar(Controllers::TitleBar *, Controllers::FloatingWindow *) const override;
@@ -82,6 +83,8 @@ public:
Views::ClassicIndicatorWindow *createClassicIndicatorWindow(Controllers::ClassicIndicators *) const override;
View *createSegmentedDropIndicatorOverlayView(Controllers::SegmentedIndicators *controller, View *parent = nullptr) const override;
static ViewFactory_qtquick *self();
private:
Q_DISABLE_COPY(ViewFactory_qtquick)
};