8#include <QtQml/qqmlinfo.h>
9#include <QtQuick/private/qquickflickable_p.h>
10#if QT_CONFIG(accessibility)
11#include <QtQuick/private/qquickaccessibleattached_p.h>
136 qreal maximumSize = qMax<qreal>(0.0, 1.0 - visualPos);
141 visualPos = qMax<qreal>(0,qMin<qreal>(visualPos,qMax<qreal>(0, 1.0 - visualSize)));
180#if QT_CONFIG(quicktemplates2_multitouch)
181 q->setAcceptTouchEvents(
true);
188#if QT_CONFIG(quicktemplates2_multitouch)
189 q->setAcceptTouchEvents(
false);
196 emit q->interactiveChanged();
202#if QT_CONFIG(quicktemplates2_hover)
203 bool hover = hovered;
234 if (!indicatorButton ||
item != indicatorButton->
indicator()) {
235 indicatorButton =
q->increaseVisual();
236 if (!indicatorButton ||
item != indicatorButton->
indicator())
240 emit indicatorButton->implicitIndicatorWidthChanged();
248 if (!indicatorButton ||
item != indicatorButton->
indicator()) {
249 indicatorButton =
q->increaseVisual();
250 if (!indicatorButton ||
item != indicatorButton->
indicator())
254 emit indicatorButton->implicitIndicatorHeightChanged();
262 QQuickItem *decreaseArrow = indicatorButton->indicator();
263 if (decreaseArrow && decreaseArrow->
contains(
q->mapToItem(decreaseArrow, point +
QPointF(0.5, 0.5)))) {
264 indicatorButton->setPressed(
true);
271 QQuickItem *increaseArrow = increaseObject->indicator();
272 if (increaseArrow && increaseArrow->
contains(
q->mapToItem(increaseArrow, point +
QPointF(0.5, 0.5)))) {
273 increaseObject->setPressed(
true);
281 if (offset < 0 || offset > sz)
315 if (point.
y() <
q->topPadding() || point.
y() >= (
q->height() -
q->bottomPadding()))
318 if (point.
x() <
q->leftPadding() || point.
x() >= (
q->width() -
q->rightPadding()))
327 q->setPressed(
false);
336 q->setPressed(
false);
343 emit q->visualSizeChanged();
345 emit q->visualPositionChanged();
353 bool hovered = newHoverState.value_or(
false);
354 if (!newHoverState.has_value()) {
355 if (
QQuickItem *indicator = sbButton->indicator())
356 hovered = indicator->contains(
q->mapToItem(indicator,
pos));
358 sbButton->setHovered(hovered);
361 updateHoverOnButton(
q->decreaseVisual());
362 updateHoverOnButton(
q->increaseVisual());
373#if QT_CONFIG(quicktemplates2_multitouch)
414 auto oldVisualArea =
d->visualArea();
416 if (
d->size +
d->position > 1.0) {
418 oldVisualArea =
d->visualArea();
424 d->visualAreaChange(
d->visualArea(), oldVisualArea);
456 auto oldVisualArea =
d->visualArea();
461 d->visualAreaChange(
d->visualArea(), oldVisualArea);
531 button->setPressed(
false);
533 button->setPressed(
false);
561 return d->orientation;
609 if (
d->snapMode ==
mode)
613 emit snapModeChanged();
629 return d->interactive;
635 d->explicitInteractive =
true;
642 d->explicitInteractive =
false;
643 d->setInteractive(
true);
684 emit policyChanged();
728 return d->minimumSize;
737 auto oldVisualArea =
d->visualArea();
741 emit minimumSizeChanged();
742 d->visualAreaChange(
d->visualArea(), oldVisualArea);
757 return d->visualArea().size;
772 return d->visualArea().position;
778 return d->decreaseVisual;
784 return d->increaseVisual;
798 bool wasActive =
d->active;
815 bool wasActive =
d->active;
825 d->handleMove(
event->position(),
event->timestamp());
828#if QT_CONFIG(quicktemplates2_hover)
829void QQuickScrollBar::hoverChange()
839 d->updateHover(
event->position());
847 d->updateHover(
event->position());
856 d->updateHover(
QPoint(),
false);
882#if QT_CONFIG(accessibility)
883void QQuickScrollBar::accessibilityActiveChanged(
bool active)
885 QQuickControl::accessibilityActiveChanged(
active);
903QAccessible::Role QQuickScrollBar::accessibleRole()
const
905 return QAccessible::ScrollBar;
955 if (
auto control = qobject_cast<QQuickControl*>(q_func()->
parent())) {
982 if (
auto control = qobject_cast<QQuickControl*>(q_func()->
parent())) {
1061 const qreal maxxextent = -
f->maxXExtent() +
f->minXExtent();
1076 const qreal maxyextent = -
f->maxYExtent() +
f->minYExtent();
1113#ifdef QT_QUICK_NEW_GEOMETRY_CHANGED_HANDLING
1122#ifdef QT_QUICK_NEW_GEOMETRY_CHANGED_HANDLING
1158 d->setFlickable(qobject_cast<QQuickFlickable *>(
parent));
1160 if (
parent && !
d->flickable && !qobject_cast<QQuickScrollView *>(
parent))
1161 qmlWarning(
parent) <<
"ScrollBar must be attached to a Flickable or ScrollView";
1167 if (
d->horizontal) {
1169 d->horizontal =
nullptr;
1173 d->vertical =
nullptr;
1175 d->setFlickable(
nullptr);
1195 return d->horizontal;
1204 if (
d->horizontal) {
1209 d->cleanupHorizontal();
1223 d->initHorizontal();
1260 d->cleanupVertical();
1282#include "moc_qquickscrollbar_p.cpp"
static QMetaObject::Connection connect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
static bool disconnect(const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
static bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *member)
\threadsafe
QVariant property(const char *name) const
Returns the value of the object's name property.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
\inmodule QtCore\reentrant
The QQmlContext class defines a context within a QML engine.
static void setContextForObject(QObject *, QQmlContext *)
Sets the QQmlContext for the object to context.
static void removeBinding(const QQmlProperty &that)
The QQmlProperty class abstracts accessing properties on objects created from QML.
void itemImplicitWidthChanged(QQuickItem *item) override
static void unhideOldItem(QQuickControl *control, QQuickItem *item, UnhideVisibility visibility=UnhideVisibility::Show)
virtual bool handlePress(const QPointF &point, ulong timestamp)
QQuickDeferredPointer< QQuickItem > contentItem
static void hideOldItem(QQuickItem *item)
virtual void handleUngrab()
virtual bool handleRelease(const QPointF &point, ulong timestamp)
virtual bool handleMove(const QPointF &point, ulong timestamp)
void itemImplicitHeightChanged(QQuickItem *item) override
void componentComplete() override
Invoked after the root component that caused this instantiation has completed construction.
void classBegin() override
Invoked after class creation, but before any properties have been set.
void mousePressEvent(QMouseEvent *event) override
This event handler can be reimplemented in a subclass to receive mouse press events for an item.
bool setAccessibleProperty(const char *propertyName, const QVariant &value)
bool isMirrored() const
\qmlproperty bool QtQuick.Controls::Control::mirrored \readonly
bool isMovingHorizontally() const
virtual void setContentX(qreal pos)
void movingHorizontallyChanged()
virtual void setContentY(qreal pos)
void movingVerticallyChanged()
bool isMovingVertically() const
void updateOrAddGeometryChangeListener(QQuickItemChangeListener *listener, QQuickGeometryChange types)
void removeItemChangeListener(QQuickItemChangeListener *, ChangeTypes types)
void updateOrAddItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types)
void addItemChangeListener(QQuickItemChangeListener *listener, ChangeTypes types)
static QQuickItemPrivate * get(QQuickItem *item)
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
virtual void hoverEnterEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-enter events for an item.
void setSize(const QSizeF &size)
qreal x
\qmlproperty real QtQuick::Item::x \qmlproperty real QtQuick::Item::y \qmlproperty real QtQuick::Item...
void setParentItem(QQuickItem *parent)
virtual void hoverMoveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-move events for an item.
qreal y
Defines the item's y position relative to its parent.
void setAcceptTouchEvents(bool accept)
If enabled is true, this sets the item to accept touch events; otherwise, touch events are not accept...
virtual Q_INVOKABLE bool contains(const QPointF &point) const
\qmlmethod bool QtQuick::Item::contains(point point)
void setAcceptedMouseButtons(Qt::MouseButtons buttons)
Sets the mouse buttons accepted by this item to buttons.
qreal width
This property holds the width of this item.
QQuickItem * parentItem() const
void stackAfter(const QQuickItem *)
Moves the specified sibling item to the index after this item within the list of children.
bool isComponentComplete() const
Returns true if construction of the QML component is complete; otherwise returns false.
void setKeepMouseGrab(bool)
Sets whether the mouse input should remain exclusively with this item.
qreal height
This property holds the height of this item.
void setPosition(const QPointF &)
friend class QQuickAccessibleAttached
virtual void hoverLeaveEvent(QHoverEvent *event)
This event handler can be reimplemented in a subclass to receive hover-leave events for an item.
\inmodule QtCore\reentrant
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
bool qFuzzyIsNull(qfloat16 f) noexcept
bool qIsNaN(qfloat16 f) noexcept
int qRound(qfloat16 d) noexcept
static int area(const QSize &s)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
static Q_DECL_CONST_FUNCTION bool qt_is_finite(double d)
n void setPosition(void) \n\
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLenum GLuint GLintptr offset
GLdouble GLdouble GLdouble GLdouble q
QQmlContext * qmlContext(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
QQuickItem * qobject_cast< QQuickItem * >(QObject *o)
#define QStringLiteral(str)
myObject disconnect()
[26]
item setCursor(Qt::IBeamCursor)
[1]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent