Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquickpathview_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QQUICKPATHVIEW_P_P_H
5#define QQUICKPATHVIEW_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 <private/qtquickglobal_p.h>
19
20QT_REQUIRE_CONFIG(quick_pathview);
21
22#include "qquickpathview_p.h"
23#include "qquickitem_p.h"
24
25#include <QtQml/qqml.h>
26#include <QtCore/qdatetime.h>
27#include <QtCore/qcoreapplication.h>
28
29#include <private/qquickanimation_p_p.h>
30#include <private/qqmldelegatemodel_p.h>
31#include <private/qquicktimeline_p_p.h>
32#include <private/qpodvector_p.h>
33
35
39{
40 Q_DECLARE_PUBLIC(QQuickPathView)
41
42public:
44
45 void init();
46
48 if (change.sizeChange() && (!highlightItem || item != highlightItem)) {
50 att->m_percent = -1;
52 }
53 }
54
56 {
57 if (!items.removeOne(item))
59 }
60
62 Q_Q(QQuickPathView);
63 if (!layoutScheduled) {
64 layoutScheduled = true;
65 q->polish();
66 }
67 }
68
69 QQuickItem *getItem(int modelIndex, qreal z = 0, bool async=false);
73 void clear();
74 void updateMappedRange();
76 bool isInBound(qreal position, qreal lower, qreal upper) const;
77 void createHighlight();
78 void updateHighlight();
80 bool isValid() const {
81 return model && model->count() > 0 && model->isValid() && path;
82 }
83
87
88 int calcCurrentIndex();
89 void createCurrentItem();
90 void updateCurrent();
91 static void fixOffsetCallback(void*);
92 void fixOffset();
95 void regenerate();
98 void snapToIndex(int index, MovementReason reason);
99 QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const;
101 qreal calcVelocity() const;
103 void setDragging(bool d);
104
116 bool stealMouse : 1;
117 bool ownModel : 1;
118 bool interactive : 1;
121 bool highlightUp : 1;
123 bool moving : 1;
124 bool flicking : 1;
125 bool dragging : 1;
126 bool inRequest : 1;
128 bool inRefill : 1;
161};
162
164
165#endif
\inmodule QtCore
\inmodule QtGui
Definition qevent.h:49
Definition qlist.h:74
bool removeOne(const AT &t)
Definition qlist.h:581
\inmodule QtGui
Definition qevent.h:195
\inmodule QtCore\reentrant
Definition qpoint.h:214
\inmodule QtCore
Definition qpointer.h:18
The QQmlComponent class encapsulates a QML component definition.
virtual bool isValid() const =0
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:64
QPointer< QQmlInstanceModel > model
void releaseItem(QQuickItem *item)
qint64 computeCurrentTime(QInputEvent *event) const
void updateItem(QQuickItem *, qreal)
void snapToIndex(int index, MovementReason reason)
QPODVector< qreal, 10 > velocityBuffer
void handleMousePressEvent(QMouseEvent *event)
QQmlOpenMetaObjectType * attType
void handleMouseReleaseEvent(QMouseEvent *)
QPointer< QQuickItem > currentItem
QQmlComponent * highlightComponent
void setAdjustedOffset(qreal offset)
bool isInBound(qreal position, qreal lower, qreal upper) const
QQuickTimeLineValueProxy< QQuickPathViewPrivate > moveHighlight
QQuickPathView::MovementDirection movementDirection
void setHighlightPosition(qreal pos)
QQuickTimeLineValueProxy< QQuickPathViewPrivate > moveOffset
void handleMouseMoveEvent(QMouseEvent *event)
QPointF pointNear(const QPointF &point, qreal *nearPercent=0) const
void setOffset(qreal offset)
QQmlOpenMetaObjectType * attachedType()
void itemDestroyed(QQuickItem *item) override
qreal positionOfIndex(qreal index) const
QQuickItem * getItem(int modelIndex, qreal z=0, bool async=false)
QList< QQuickItem * > itemCache
QQuickPathView::SnapMode snapMode
void itemGeometryChanged(QQuickItem *item, QQuickGeometryChange change, const QRectF &) override
QQuickPathView::HighlightRangeMode highlightRangeMode
void addVelocitySample(qreal v)
QQuickPathView::MovementDirection moveDirection
QQuickPathViewAttached * attached(QQuickItem *item)
QList< QQuickItem * > items
static void fixOffsetCallback(void *)
The QQuickTimeLine class provides a timeline for controlling animations.
\inmodule QtCore\reentrant
Definition qrect.h:483
\inmodule QtCore
Definition qvariant.h:64
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLuint index
[2]
GLenum GLuint GLintptr offset
struct _cl_event * event
GLdouble GLdouble GLdouble GLdouble q
Definition qopenglext.h:259
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QT_REQUIRE_CONFIG(feature)
long long qint64
Definition qtypes.h:55
double qreal
Definition qtypes.h:92
QGraphicsItem * item