Qt 6.x
The Qt SDK
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_PRIVATE_EXPORT QQuickRepeater : public QQuickItem
30{
32
33 Q_PROPERTY(QVariant model READ model WRITE setModel NOTIFY modelChanged FINAL)
34 Q_PROPERTY(QQmlComponent *delegate READ delegate WRITE setDelegate NOTIFY delegateChanged FINAL)
35 Q_PROPERTY(int count READ count NOTIFY countChanged FINAL)
36 Q_CLASSINFO("DefaultProperty", "delegate")
37 QML_NAMED_ELEMENT(Repeater)
39
40public:
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
58
61
62private:
63 void clear();
64 void regenerate();
65
66protected:
67 void componentComplete() override;
68 void itemChange(ItemChange change, const ItemChangeData &value) override;
69
70private Q_SLOTS:
71 void createdItem(int index, QObject *item);
72 void initItem(int, QObject *item);
73 void modelUpdated(const QQmlChangeSet &changeSet, bool reset);
74
75private:
76 Q_DISABLE_COPY(QQuickRepeater)
77 Q_DECLARE_PRIVATE(QQuickRepeater)
78};
79
81
83
84#endif // QQUICKREPEATER_P_H
\inmodule QtCore
Definition qobject.h:90
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:64
void componentComplete() override
\reimp Derived classes should call the base class method before adding their own actions to perform a...
virtual void itemChange(ItemChange, const ItemChangeData &)
Called when change occurs for this item.
ItemChange
Used in conjunction with QQuickItem::itemChange() to notify the item about certain types of changes.
Definition qquickitem.h:143
void modelChanged()
void countChanged()
void itemAdded(int index, QQuickItem *item)
void itemRemoved(int index, QQuickItem *item)
void delegateChanged()
\inmodule QtCore
Definition qvariant.h:64
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_DECLARE_TYPE(TYPE)
Definition qqml.h:19
#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
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent
\inmodule QtQuick
Definition qquickitem.h:158