28 Q_PROPERTY(qreal size READ size WRITE setSize NOTIFY sizeChanged FINAL)
29 Q_PROPERTY(qreal position READ position WRITE setPosition NOTIFY positionChanged FINAL)
30 Q_PROPERTY(qreal stepSize READ stepSize WRITE setStepSize NOTIFY stepSizeChanged FINAL)
31 Q_PROPERTY(
bool active READ isActive WRITE setActive NOTIFY activeChanged FINAL)
32 Q_PROPERTY(
bool pressed READ isPressed WRITE setPressed NOTIFY pressedChanged FINAL)
33 Q_PROPERTY(Qt::Orientation orientation READ orientation WRITE setOrientation NOTIFY orientationChanged FINAL)
35 Q_PROPERTY(SnapMode snapMode READ snapMode WRITE setSnapMode NOTIFY snapModeChanged FINAL REVISION(2, 2))
36 Q_PROPERTY(
bool interactive READ isInteractive WRITE setInteractive RESET resetInteractive NOTIFY interactiveChanged FINAL REVISION(2, 2))
37 Q_PROPERTY(Policy policy READ policy WRITE setPolicy NOTIFY policyChanged FINAL REVISION(2, 2))
39 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 minimumSize READ minimumSize WRITE setMinimumSize NOTIFY minimumSizeChanged FINAL REVISION(2, 4))
43 Q_PROPERTY(qreal visualSize READ visualSize NOTIFY visualSizeChanged FINAL REVISION(2, 4))
44 Q_PROPERTY(qreal visualPosition READ visualPosition NOTIFY visualPositionChanged FINAL REVISION(2, 4))
46 Q_PROPERTY(QQuickIndicatorButton *__decreaseVisual READ decreaseVisual CONSTANT FINAL)
47 Q_PROPERTY(QQuickIndicatorButton *__increaseVisual READ increaseVisual CONSTANT FINAL)
49 QML_NAMED_ELEMENT(ScrollBar)
50 QML_ATTACHED(QQuickScrollBarAttached)
51 QML_ADDED_IN_VERSION(2, 0)
54 explicit QQuickScrollBar(QQuickItem *parent =
nullptr);
56 static QQuickScrollBarAttached *qmlAttachedProperties(QObject *object);
59 qreal position()
const;
61 qreal stepSize()
const;
62 void setStepSize(qreal step);
64 bool isActive()
const;
65 void setActive(
bool active);
67 bool isPressed()
const;
68 void setPressed(
bool pressed);
70 Qt::Orientation orientation()
const;
71 void setOrientation(Qt::Orientation orientation);
81 SnapMode snapMode()
const;
82 void setSnapMode(SnapMode mode);
84 bool isInteractive()
const;
85 void setInteractive(
bool interactive);
86 void resetInteractive();
89 AsNeeded = Qt::ScrollBarAsNeeded,
90 AlwaysOff = Qt::ScrollBarAlwaysOff,
91 AlwaysOn = Qt::ScrollBarAlwaysOn
95 Policy policy()
const;
96 void setPolicy(Policy policy);
99 bool isHorizontal()
const;
100 bool isVertical()
const;
103 qreal minimumSize()
const;
104 void setMinimumSize(qreal minimumSize);
106 qreal visualSize()
const;
107 qreal visualPosition()
const;
109 QQuickIndicatorButton *decreaseVisual();
110 QQuickIndicatorButton *increaseVisual();
115 void setSize(qreal size);
116 void setPosition(qreal position);
120 void positionChanged();
121 void stepSizeChanged();
122 void activeChanged();
123 void pressedChanged();
124 void orientationChanged();
126 Q_REVISION(2, 2)
void snapModeChanged();
127 Q_REVISION(2, 2)
void interactiveChanged();
128 Q_REVISION(2, 2)
void policyChanged();
130 Q_REVISION(2, 4)
void minimumSizeChanged();
131 Q_REVISION(2, 4)
void visualSizeChanged();
132 Q_REVISION(2, 4)
void visualPositionChanged();
135 void mousePressEvent(QMouseEvent *event) override;
137#if QT_CONFIG(quicktemplates2_hover)
138 void hoverChange() override;
139 void hoverEnterEvent(QHoverEvent *event) override;
140 void hoverMoveEvent(QHoverEvent *event) override;
141 void hoverLeaveEvent(QHoverEvent *event) override;
144 void classBegin() override;
145 void componentComplete() override;
147#if QT_CONFIG(accessibility)
148 void accessibilityActiveChanged(
bool active) override;
149 QAccessible::Role accessibleRole()
const override;
153 Q_DISABLE_COPY(QQuickScrollBar)
154 Q_DECLARE_PRIVATE(QQuickScrollBar)
162 Q_PROPERTY(QQuickScrollBar *horizontal READ horizontal WRITE setHorizontal NOTIFY horizontalChanged FINAL)
163 Q_PROPERTY(QQuickScrollBar *vertical READ vertical WRITE setVertical NOTIFY verticalChanged FINAL)
166 explicit QQuickScrollBarAttached(QObject *parent =
nullptr);
167 ~QQuickScrollBarAttached();
169 QQuickScrollBar *horizontal()
const;
170 void setHorizontal(QQuickScrollBar *horizontal);
172 QQuickScrollBar *vertical()
const;
173 void setVertical(QQuickScrollBar *vertical);
176 void horizontalChanged();
177 void verticalChanged();
180 Q_DISABLE_COPY(QQuickScrollBarAttached)
181 Q_DECLARE_PRIVATE(QQuickScrollBarAttached)