diff options
author | J-P Nurmi <jpnurmi@qt.io> | 2017-03-28 11:37:34 +0200 |
---|---|---|
committer | J-P Nurmi <jpnurmi@qt.io> | 2017-03-28 11:12:35 +0000 |
commit | 72e12f8e5ee54a919c254000a017f3f918825406 (patch) | |
tree | 37d7eed07ad198002aabf89bb626ba87f662ba07 /src/quicktemplates2/qquickslider_p.h | |
parent | b44048ae27bd916d0eaa1e7d6a5456488ff76f29 (diff) |
Slider: add horizontal and vertical properties for convenience
[ChangeLog][Controls][Slider] Added horizontal and vertical properties
to make it more convenient to create orientation-dependent bindings in
styles.
Change-Id: Iec3332f873e482590ab4f0cca08323c905527c77
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/quicktemplates2/qquickslider_p.h')
-rw-r--r-- | src/quicktemplates2/qquickslider_p.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/quicktemplates2/qquickslider_p.h b/src/quicktemplates2/qquickslider_p.h index a6cf02fb..f2a13217 100644 --- a/src/quicktemplates2/qquickslider_p.h +++ b/src/quicktemplates2/qquickslider_p.h @@ -66,6 +66,8 @@ class Q_QUICKTEMPLATES2_PRIVATE_EXPORT QQuickSlider : public QQuickControl Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL) Q_PROPERTY(bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION 2) Q_PROPERTY(bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged 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(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL) Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL) @@ -103,6 +105,9 @@ public: bool isPressed() const; void setPressed(bool pressed); + bool isHorizontal() const; + bool isVertical() const; + Qt::Orientation orientation() const; void setOrientation(Qt::Orientation orientation); |