aboutsummaryrefslogtreecommitdiffstats
path: root/src/quicktemplates2/qquickrangeslider_p.h
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@qt.io>2017-03-28 12:36:51 +0200
committerJ-P Nurmi <jpnurmi@qt.io>2017-03-28 11:12:38 +0000
commitbefa702ce798b35085594233520359e12e2e79e1 (patch)
tree05c05639fd3b8b458f607be9387bf8b7d8897342 /src/quicktemplates2/qquickrangeslider_p.h
parent72e12f8e5ee54a919c254000a017f3f918825406 (diff)
RangeSlider: add horizontal and vertical properties for convenience
[ChangeLog][Controls][RangeSlider] Added horizontal and vertical properties to make it more convenient to create orientation-dependent bindings in styles. Change-Id: Iac2ae7d4d701cf9516521923cf27416d76dfba5c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickrangeslider_p.h')
-rw-r--r--src/quicktemplates2/qquickrangeslider_p.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickrangeslider_p.h b/src/quicktemplates2/qquickrangeslider_p.h
index d07cb6f0..affb734a 100644
--- a/src/quicktemplates2/qquickrangeslider_p.h
+++ b/src/quicktemplates2/qquickrangeslider_p.h
@@ -65,6 +65,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickRangeSlider : public QQuickControl
Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL)
Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged 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)
Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2)
public:
@@ -95,6 +97,9 @@ public:
Qt::Orientation orientation() const;
void setOrientation(Qt::Orientation orientation);
+ bool isHorizontal() const;
+ bool isVertical() const;
+
bool live() const;
void setLive(bool live);