29 Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL)
30 Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
31 Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL)
32 Q_PROPERTY(
bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
33 Q_PROPERTY(
bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
34 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
36 Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION(2, 2))
37 Q_PROPERTY(
bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
38 Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION(2, 2))
40 Q_PROPERTY(
bool horizontal READ isHorizontal NOTIFY orientationChanged FINAL REVISION(2, 3))
41 Q_PROPERTY(
bool vertical READ isVertical NOTIFY orientationChanged FINAL REVISION(2, 3))
43 Q_PROPERTY(qreal minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
44 Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
45 Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
47 Q_PROPERTY(QQuickIndicatorButton *__decreaseVisual READ decreaseVisual CONSTANT FINAL)
48 Q_PROPERTY(QQuickIndicatorButton *__increaseVisual READ increaseVisual CONSTANT FINAL)
50 QML_NAMED_ELEMENT(ScrollBar)
51 QML_ATTACHED(QQuickScrollBarAttached)
52 QML_ADDED_IN_VERSION(2, 0)
55 explicit QQuickScrollBar(QQuickItem *parent =
nullptr);
57 static QQuickScrollBarAttached *qmlAttachedProperties(QObject *object);
60 qreal position()
const;
62 qreal stepSize()
const;
63 void setStepSize(qreal step);
65 bool isActive()
const;
66 void setActive(
bool active);
68 bool isPressed()
const;
69 void setPressed(
bool pressed);
71 Qt::Orientation orientation()
const;
72 void setOrientation(Qt::Orientation orientation);
82 SnapMode snapMode()
const;
83 void setSnapMode(SnapMode mode);
85 bool isInteractive()
const;
86 void setInteractive(
bool interactive);
87 void resetInteractive();
90 AsNeeded = Qt::ScrollBarAsNeeded,
91 AlwaysOff = Qt::ScrollBarAlwaysOff,
92 AlwaysOn = Qt::ScrollBarAlwaysOn
96 Policy policy()
const;
97 void setPolicy(Policy policy);
100 bool isHorizontal()
const;
101 bool isVertical()
const;
104 qreal minimumSize()
const;
105 void setMinimumSize(qreal minimumSize);
107 qreal visualSize()
const;
108 qreal visualPosition()
const;
110 QQuickIndicatorButton *decreaseVisual();
111 QQuickIndicatorButton *increaseVisual();
116 void setSize(qreal size);
117 void setPosition(qreal position);
121 void positionChanged();
122 void stepSizeChanged();
123 void activeChanged();
124 void pressedChanged();
125 void orientationChanged();
127 Q_REVISION(2, 2)
void snapModeChanged();
128 Q_REVISION(2, 2)
void interactiveChanged();
129 Q_REVISION(2, 2)
void policyChanged();
131 Q_REVISION(2, 4)
void minimumSizeChanged();
132 Q_REVISION(2, 4)
void visualSizeChanged();
133 Q_REVISION(2, 4)
void visualPositionChanged();
136 void mousePressEvent(QMouseEvent *event) override;
138#if QT_CONFIG(quicktemplates2_hover)
139 void hoverChange() override;
140 void hoverEnterEvent(QHoverEvent *event) override;
141 void hoverMoveEvent(QHoverEvent *event) override;
142 void hoverLeaveEvent(QHoverEvent *event) override;
145 void classBegin() override;
146 void componentComplete() override;
148#if QT_CONFIG(accessibility)
149 void accessibilityActiveChanged(
bool active) override;
150 QAccessible::Role accessibleRole()
const override;
154 Q_DISABLE_COPY(QQuickScrollBar)
155 Q_DECLARE_PRIVATE(QQuickScrollBar)
163 Q_PROPERTY(QQuickScrollBar *horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged FINAL)
164 Q_PROPERTY(QQuickScrollBar *vertical READ vertical WRITE setVertical NOTIFY verticalChanged FINAL)
167 explicit QQuickScrollBarAttached(QObject *parent =
nullptr);
168 ~QQuickScrollBarAttached();
170 QQuickScrollBar *horizontal()
const;
171 void setHorizontal(QQuickScrollBar *horizontal);
173 QQuickScrollBar *vertical()
const;
174 void setVertical(QQuickScrollBar *vertical);
177 void horizontalChanged();
178 void verticalChanged();
181 Q_DISABLE_COPY(QQuickScrollBarAttached)
182 Q_DECLARE_PRIVATE(QQuickScrollBarAttached)