aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickscrollindicator_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-28 12:48:37 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-28 11:12:43 +0000
commit4ff021d3cbe11ffd6132d2b4c7ad735c1ee85d14 (patch)
treee53985e3f31db62470fb2c27294ed6bf8801681f /src/quicktemplates2/qquickscrollindicator_p.h
parent113d6f0670482706fd8184128175ad19cfd0c4a9 (diff)
ScrollIndicator: add horizontal and vertical properties for convenience
[ChangeLog][Controls][ScrollIndicator] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: I8670456bb84387af99440ba25ab652c07ec1cb29 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickscrollindicator_p.h')
-rw-r--r--src/quicktemplates2/qquickscrollindicator_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickscrollindicator_p.h b/src/quicktemplates2/qquickscrollindicator_p.h
index bc6c5418..6f08ef31 100644
--- a/src/quicktemplates2/qquickscrollindicator_p.h
+++ b/src/quicktemplates2/qquickscrollindicator_p.h
@@ -63,6 +63,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickScrollIndicator : public QQuickCont
Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
+ Q_PROPERTY(bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION 3)
+ Q_PROPERTY(bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION 3)
public:
explicit QQuickScrollIndicator(QQuickItem *parent = nullptr);
@@ -78,6 +80,9 @@ public:
Qt::Orientation orientation() const;
void setOrientation(Qt::Orientation orientation);
+ bool isHorizontal() const;
+ bool isVertical() const;
+
public Q_SLOTS:
void setSize(qreal size);
void setPosition(qreal position);