Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qquickscrollbar_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QQUICKSCROLLBAR_P_P_H
6#define QQUICKSCROLLBAR_P_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuickTemplates2/private/qquickscrollbar_p.h>
20#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
21#include <QtQuick/private/qquickitemchangelistener_p.h>
22
24
25class QQuickFlickable;
26class QQuickIndicatorButton;
27
29{
30 Q_DECLARE_PUBLIC(QQuickScrollBar)
31
32public:
34 {
35 return bar->d_func();
36 }
37
45 VisualArea visualArea() const;
46
47 qreal logicalPosition(qreal position) const;
48
49 void setPosition(qreal position, bool notifyVisualChange = true);
50 qreal snapPosition(qreal position) const;
51 qreal positionAt(const QPointF &point) const;
52 void setInteractive(bool interactive);
53 void updateActive();
55 void itemImplicitWidthChanged(QQuickItem *item) override;
56 void itemImplicitHeightChanged(QQuickItem *item) override;
57
58 bool handlePress(const QPointF &point, ulong timestamp) override;
59 bool handleMove(const QPointF &point, ulong timestamp) override;
60 bool handleRelease(const QPointF &point, ulong timestamp) override;
62
63 void visualAreaChange(const VisualArea &newVisualArea, const VisualArea &oldVisualArea);
64
65 void updateHover(const QPointF &pos, std::optional<bool> newHoverState = {});
66
67 QQuickIndicatorButton *decreaseVisual = nullptr;
68 QQuickIndicatorButton *increaseVisual = nullptr;
74 bool active = false;
75 bool pressed = false;
76 bool moving = false;
77 bool interactive = true;
78 bool explicitInteractive = false;
82};
83
86{
87public:
88 static QQuickScrollBarAttachedPrivate *get(QQuickScrollBarAttached *attached)
89 {
90 return attached->d_func();
91 }
92
93 void setFlickable(QQuickFlickable *flickable);
94
95 void initHorizontal();
96 void initVertical();
97 void cleanupHorizontal();
98 void cleanupVertical();
99 void activateHorizontal();
100 void activateVertical();
101 void scrollHorizontal();
102 void scrollVertical();
103 void mirrorVertical();
104
105 void layoutHorizontal(bool move = true);
106 void layoutVertical(bool move = true);
107
108 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
109 void itemImplicitWidthChanged(QQuickItem *item) override;
110 void itemImplicitHeightChanged(QQuickItem *item) override;
111 void itemDestroyed(QQuickItem *item) override;
112
113 QQuickFlickable *flickable = nullptr;
116};
117
118QT_END_NAMESPACE
119
120#endif // QQUICKSCROLLBAR_P_P_H
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override
void setFlickable(QQuickFlickable *flickable)
void layoutHorizontal(bool move=true)
void itemImplicitHeightChanged(QQuickItem *item) override
void itemDestroyed(QQuickItem *item) override
static QQuickScrollBarAttachedPrivate * get(QQuickScrollBarAttached *attached)
void itemImplicitWidthChanged(QQuickItem *item) override
void itemImplicitHeightChanged(QQuickItem *item) override
bool handlePress(const QPointF &point, ulong timestamp) override
QQuickIndicatorButton * increaseVisual
qreal snapPosition(qreal position) const
QQuickIndicatorButton * decreaseVisual
void itemImplicitWidthChanged(QQuickItem *item) override
void updateHover(const QPointF &pos, std::optional< bool > newHoverState={})
bool handleRelease(const QPointF &point, ulong timestamp) override
bool handleMove(const QPointF &point, ulong timestamp) override
void visualAreaChange(const VisualArea &newVisualArea, const VisualArea &oldVisualArea)
qreal positionAt(const QPointF &point) const
void setPosition(qreal position, bool notifyVisualChange=true)
void setInteractive(bool interactive)
void resizeContent() override
qreal logicalPosition(qreal position) const
VisualArea visualArea() const
static QT_BEGIN_NAMESPACE const QQuickItemPrivate::ChangeTypes QsbChangeTypes
Vertical or horizontal interactive scroll bar.
static const QQuickItemPrivate::ChangeTypes QsbVerticalChangeTypes
static const QQuickItemPrivate::ChangeTypes QsbHorizontalChangeTypes