diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-01-19 14:31:54 +0100 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-01-20 09:05:06 +0000 |
commit | fdd41317118cd14fdab472a60ac67516d9d4d937 (patch) | |
tree | e271bd55ae5a0e6bf700ffc32f7db53b6072a671 /src/quicktemplates2/qquickscrollbar_p.h | |
parent | 945a407d6f6ca25098efcf3bdf138fb622cd5110 (diff) |
Add ScrollBar::interactive
[ChangeLog][Controls][ScrollBar] Added an interactive-property.
A non-interactive ScrollBar is visually and behaviorally similar
to ScrollIndicator. This property is useful for switching between
typical mouse- and touch-orientated UIs with interactive and non-
interactive scroll bars, respectively.
Change-Id: Ie98bfa0b5bba94a9751baf3c65f17b850b58fd1f
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickscrollbar_p.h')
-rw-r--r-- | src/quicktemplates2/qquickscrollbar_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickscrollbar_p.h b/src/quicktemplates2/qquickscrollbar_p.h index a34c337c..9709f183 100644 --- a/src/quicktemplates2/qquickscrollbar_p.h +++ b/src/quicktemplates2/qquickscrollbar_p.h @@ -66,6 +66,7 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollBar : public QQuickControl Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL) Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION 2) + Q_PROPERTY(bool interactive READ isInteractive WRITE setInteractive NOTIFY interactiveChanged FINAL REVISION 2) public: explicit QQuickScrollBar(QQuickItem *parent = nullptr); @@ -97,6 +98,9 @@ public: SnapMode snapMode() const; void setSnapMode(SnapMode mode); + bool isInteractive() const; + void setInteractive(bool interactive); + public Q_SLOTS: void increase(); void decrease(); @@ -111,6 +115,7 @@ Q_SIGNALS: void pressedChanged(); void orientationChanged(); Q_REVISION(2) void snapModeChanged(); + Q_REVISION(2) void interactiveChanged(); protected: void mousePressEvent(QMouseEvent *event) override; |