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
qquickrepeater_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 QQUICKREPEATER_P_H
5#define QQUICKREPEATER_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.h"
19
20#include <private/qtquickglobal_p.h>
21
22QT_REQUIRE_CONFIG(quick_repeater);
23
25
26class QQmlChangeSet;
27
29class Q_QUICK_EXPORT QQuickRepeater : public QQuickItem
30{
32
33 Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged)
34 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
35 Q_PROPERTY(int count READ count NOTIFY countChanged)
36 Q_CLASSINFO("DefaultProperty", "delegate")
37 QML_NAMED_ELEMENT(Repeater)
39
40public:
41 QQuickRepeater(QQuickItem *parent=nullptr);
42 virtual ~QQuickRepeater();
43
44 QVariant model() const;
45 void setModel(const QVariant &);
46
47 QQmlComponent *delegate() const;
48 void setDelegate(QQmlComponent *);
49
50 int count() const;
51
52 Q_INVOKABLE QQuickItem *itemAt(int index) const;
53
55 void modelChanged();
56 void delegateChanged();
57 void countChanged();
58
59 void itemAdded(int index, QQuickItem *item);
60 void itemRemoved(int index, QQuickItem *item);
61
63 void clear();
64 void regenerate();
65
66protected:
67 void componentComplete() override;
68 void itemChange(ItemChange change, const ItemChangeData &value) override;
69
71 void createdItem(int index, QObject *item);
72 void initItem(int, QObject *item);
73 void modelUpdated(const QQmlChangeSet &changeSet, bool reset);
74
76 Q_DISABLE_COPY(QQuickRepeater)
77 Q_DECLARE_PRIVATE(QQuickRepeater)
78};
79
81
82#endif // QQUICKREPEATER_P_H
\inmodule QtCore
Definition qobject.h:103
The QQmlChangeSet class stores an ordered list of notifications about changes to a linear data set.
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
Definition qvariant.h:65
b clear()
Combined button and popup list for selecting options.
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint index
[2]
GLenum GLenum GLsizei count
GLboolean reset
#define QML_NAMED_ELEMENT(NAME)
#define QML_ADDED_IN_VERSION(MAJOR, MINOR)
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_CLASSINFO(name, value)
#define Q_INVOKABLE
#define Q_SLOTS
#define Q_SIGNALS
view setModel(model)
[17] //! [18]
QSqlQueryModel * model
[16]
QGraphicsItem * item
\inmodule QtQuick
Definition qquickitem.h:159