qml: decouple ClassicIndicator from QRubberBand

the rubber band is now returned from the factory, meaning it can
be a QQuickItem when QtQuick is being used

Still need to remove the QtWidget'isms from IndicatorWindow
though
This commit is contained in:
Sergio Martins
2020-08-09 18:39:56 +01:00
parent dc3aa354ec
commit 64791eec82
4 changed files with 20 additions and 7 deletions

View File

@@ -117,6 +117,10 @@ public:
/// Override to provide your own DropIndicatorOverlayInterface sub-class.
///@param dropArea Just forward to DropIndicatorOverlayInterface's constructor.
virtual DropIndicatorOverlayInterface *createDropIndicatorOverlay(DropArea *dropArea) const = 0;
///@brief Called internally by the framework to create a RubberBand to show as drop zone
///Returns a rubber band
virtual QWidgetOrQuick *createRubberBand(QWidgetOrQuick *parent) const = 0;
private:
Q_DISABLE_COPY(FrameworkWidgetFactory)
};
@@ -137,6 +141,7 @@ public:
FloatingWindow *createFloatingWindow(MainWindowBase *parent = nullptr) const override;
FloatingWindow *createFloatingWindow(Frame *frame, MainWindowBase *parent = nullptr) const override;
DropIndicatorOverlayInterface *createDropIndicatorOverlay(DropArea*) const override;
QWidgetOrQuick *createRubberBand(QWidgetOrQuick *parent) const override;
private:
Q_DISABLE_COPY(DefaultWidgetFactory)
};