Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
4#ifndef QQUICKSCROLLBAR_P_P_H
5#define QQUICKSCROLLBAR_P_P_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <QtQuickTemplates2/private/qquickscrollbar_p.h>
19#include <QtQuickTemplates2/private/qquickcontrol_p_p.h>
20#include <QtQuick/private/qquickitemchangelistener_p.h>
21
23
24class QQuickFlickable;
26
28{
29 Q_DECLARE_PUBLIC(QQuickScrollBar)
30
31public:
33 {
34 return bar->d_func();
35 }
36
38 {
40 : position(pos), size(sz) { }
43 };
44 VisualArea visualArea() const;
45
47
48 void setPosition(qreal position, bool notifyVisualChange = true);
50 qreal positionAt(const QPointF &point) const;
51 void setInteractive(bool interactive);
52 void updateActive();
53 void resizeContent() override;
56
57 bool handlePress(const QPointF &point, ulong timestamp) override;
58 bool handleMove(const QPointF &point, ulong timestamp) override;
59 bool handleRelease(const QPointF &point, ulong timestamp) override;
60 void handleUngrab() override;
61
62 void visualAreaChange(const VisualArea &newVisualArea, const VisualArea &oldVisualArea);
63
64 void updateHover(const QPointF &pos, std::optional<bool> newHoverState = {});
65
73 bool active = false;
74 bool pressed = false;
75 bool moving = false;
76 bool interactive = true;
77 bool explicitInteractive = false;
81};
82
84{
85public:
87 {
88 return attached->d_func();
89 }
90
92
93 void initHorizontal();
94 void initVertical();
95 void cleanupHorizontal();
96 void cleanupVertical();
97 void activateHorizontal();
98 void activateVertical();
99 void scrollHorizontal();
100 void scrollVertical();
101 void mirrorVertical();
102
103 void layoutHorizontal(bool move = true);
104 void layoutVertical(bool move = true);
105
106 void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &diff) override;
109 void itemDestroyed(QQuickItem *item) override;
110
114};
115
117
118#endif // QQUICKSCROLLBAR_P_P_H
\inmodule QtCore\reentrant
Definition qpoint.h:217
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
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
static QQuickScrollBarPrivate * get(QQuickScrollBar *bar)
QQuickIndicatorButton * decreaseVisual
void itemImplicitWidthChanged(QQuickItem *item) override
void updateHover(const QPointF &pos, std::optional< bool > newHoverState={})
QQuickScrollBar::Policy policy
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 setInteractive(bool interactive)
void resizeContent() override
qreal logicalPosition(qreal position) const
QQuickScrollBar::SnapMode snapMode
VisualArea visualArea() const
\inmodule QtCore\reentrant
Definition qrect.h:484
Combined button and popup list for selecting options.
Orientation
Definition qnamespace.h:98
@ Vertical
Definition qnamespace.h:100
n void setPosition(void) \n\
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLintptr offset
unsigned long ulong
Definition qtypes.h:35
double qreal
Definition qtypes.h:187
QGraphicsItem * item