29 Q_PROPERTY(qreal from READ from WRITE setFrom NOTIFY fromChanged FINAL)
30 Q_PROPERTY(qreal to READ to WRITE setTo NOTIFY toChanged FINAL)
31 Q_PROPERTY(QQuickRangeSliderNode *first READ first CONSTANT FINAL)
32 Q_PROPERTY(QQuickRangeSliderNode *second READ second CONSTANT FINAL)
33 Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL)
34 Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL)
35 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
37 Q_PROPERTY(
bool live READ live WRITE setLive NOTIFY liveChanged FINAL REVISION(2, 2))
38 Q_PROPERTY(
bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
40 Q_PROPERTY(
bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
42 Q_PROPERTY(qreal touchDragThreshold READ touchDragThreshold WRITE setTouchDragThreshold RESET resetTouchDragThreshold NOTIFY touchDragThresholdChanged FINAL REVISION(2, 5))
43 QML_NAMED_ELEMENT(RangeSlider)
44 QML_ADDED_IN_VERSION(2, 0)
47 explicit QQuickRangeSlider(QQuickItem *parent =
nullptr);
51 void setFrom(qreal from);
56 QQuickRangeSliderNode *first()
const;
57 QQuickRangeSliderNode *second()
const;
59 qreal stepSize()
const;
60 void setStepSize(qreal step);
69 SnapMode snapMode()
const;
70 void setSnapMode(SnapMode mode);
72 Qt::Orientation orientation()
const;
73 void setOrientation(Qt::Orientation orientation);
75 Q_INVOKABLE
void setValues(qreal firstValue, qreal secondValue);
79 void setLive(
bool live);
82 bool isHorizontal()
const;
83 bool isVertical()
const;
86 qreal touchDragThreshold()
const;
87 void setTouchDragThreshold(qreal touchDragThreshold);
88 void resetTouchDragThreshold();
89 Q_REVISION(2, 5) Q_INVOKABLE qreal valueAt(qreal position)
const;
94 void stepSizeChanged();
95 void snapModeChanged();
96 void orientationChanged();
98 Q_REVISION(2, 2)
void liveChanged();
100 Q_REVISION(2, 5)
void touchDragThresholdChanged();
103 void focusInEvent(QFocusEvent *event) override;
104 void hoverEnterEvent(QHoverEvent *event) override;
105 void hoverMoveEvent(QHoverEvent *event) override;
106 void hoverLeaveEvent(QHoverEvent *event) override;
107 void keyPressEvent(QKeyEvent *event) override;
108 void keyReleaseEvent(QKeyEvent *event) override;
109 void mousePressEvent(QMouseEvent *event) override;
110#if QT_CONFIG(quicktemplates2_multitouch)
111 void touchEvent(QTouchEvent *event) override;
113 void mirrorChange() override;
114 void classBegin() override;
115 void componentComplete() override;
117#if QT_CONFIG(accessibility)
118 QAccessible::Role accessibleRole()
const override;
122 friend class QQuickRangeSliderNode;
124 Q_DISABLE_COPY(QQuickRangeSlider)
125 Q_DECLARE_PRIVATE(QQuickRangeSlider)
133 Q_PROPERTY(qreal value READ value WRITE setValue NOTIFY valueChanged FINAL)
134 Q_PROPERTY(qreal position READ position NOTIFY positionChanged FINAL)
135 Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL)
136 Q_PROPERTY(QQuickItem *handle READ handle WRITE setHandle NOTIFY handleChanged FINAL)
137 Q_PROPERTY(
bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
139 Q_PROPERTY(
bool hovered READ isHovered WRITE setHovered NOTIFY hoveredChanged FINAL REVISION(2, 1))
141 Q_PROPERTY(qreal implicitHandleWidth READ implicitHandleWidth NOTIFY implicitHandleWidthChanged FINAL REVISION(2, 5))
142 Q_PROPERTY(qreal implicitHandleHeight READ implicitHandleHeight NOTIFY implicitHandleHeightChanged FINAL REVISION(2, 5))
143 Q_CLASSINFO(
"DeferredPropertyNames",
"handle")
145 QML_ADDED_IN_VERSION(2, 0)
148 explicit QQuickRangeSliderNode(qreal value, QQuickRangeSlider *slider);
149 ~QQuickRangeSliderNode();
152 void setValue(qreal value);
154 qreal position()
const;
155 qreal visualPosition()
const;
157 QQuickItem *handle()
const;
158 void setHandle(QQuickItem *handle);
160 bool isPressed()
const;
161 void setPressed(
bool pressed);
164 bool isHovered()
const;
165 void setHovered(
bool hovered);
168 qreal implicitHandleWidth()
const;
169 qreal implicitHandleHeight()
const;
177 void positionChanged();
178 void visualPositionChanged();
179 void handleChanged();
180 void pressedChanged();
182 Q_REVISION(2, 1)
void hoveredChanged();
185 void implicitHandleWidthChanged();
186 void implicitHandleHeightChanged();
189 Q_DISABLE_COPY(QQuickRangeSliderNode)
190 Q_DECLARE_PRIVATE(QQuickRangeSliderNode)