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
qquicktumblerview_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 QQUICKTUMBLERVIEW_P_H
5#define QQUICKTUMBLERVIEW_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 <QQuickItem>
19#include <QtQuickControls2Impl/private/qtquickcontrols2implglobal_p.h>
20
22
23class QQuickListView;
24class QQuickPath;
25class QQuickPathView;
26
27class QQuickTumbler;
28
29class Q_QUICKCONTROLS2IMPL_EXPORT QQuickTumblerView : public QQuickItem
30{
32 Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
33 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
34 Q_PROPERTY(QQuickPath *path READ path WRITE setPath NOTIFY pathChanged)
35 QML_NAMED_ELEMENT(TumblerView)
37
38public:
39 QQuickTumblerView(QQuickItem *parent = nullptr);
40
41 QVariant model() const;
42 void setModel(const QVariant &model);
43
44 QQmlComponent *delegate() const;
45 void setDelegate(QQmlComponent *delegate);
46
47 QQuickPath *path() const;
48 void setPath(QQuickPath *path);
49
51 void modelChanged();
52 void delegateChanged();
53 void pathChanged();
54
55protected:
56 void geometryChange(const QRectF &newGeometry, const QRectF &oldGeometry) override;
57 void componentComplete() override;
58 void itemChange(ItemChange change, const ItemChangeData &data) override;
59
62 void createView();
63 void updateView();
64 void updateModel();
65
66 void wrapChange();
67
68 QQuickTumbler *m_tumbler = nullptr;
69 QVariant m_model;
70 QQmlComponent *m_delegate = nullptr;
71 QQuickPathView *m_pathView = nullptr;
72 QQuickListView *m_listView = nullptr;
73 QQuickPath *m_path = nullptr;
74};
75
77
78#endif // TUMBLERVIEW_H
DarwinBluetooth::DeviceInquiryDelegate * m_delegate
The QQmlComponent class encapsulates a QML component definition.
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
Definition qquickitem.h:63
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:144
\inmodule QtCore\reentrant
Definition qrect.h:484
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLsizei const GLchar *const * path
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SIGNALS
view setModel(model)
[17] //! [18]
QSqlQueryModel * model
[16]
QQuickView * view
[0]
\inmodule QtQuick
Definition qquickitem.h:159