3#include "qml_material/model/item_source.hpp"
7class QML_MATERIAL_API LazyRow :
public QObject {
10 QML_UNCREATABLE(
"Rows are supplied by a lazy view")
11 Q_PROPERTY(
int index READ index NOTIFY changed FINAL)
12 Q_PROPERTY(QString key READ key NOTIFY changed FINAL)
13 Q_PROPERTY(QVariant value READ value NOTIFY changed FINAL)
14 Q_PROPERTY(quint64 revision READ revision NOTIFY changed FINAL)
15 Q_PROPERTY(quint64 contentRevision READ contentRevision NOTIFY changed FINAL)
16 Q_PROPERTY(
bool active READ active NOTIFY activeChanged FINAL)
18 using QObject::QObject;
19 int index()
const {
return m_index; }
20 QString key()
const {
return m_record.key; }
21 QVariant value()
const {
return m_record.value; }
22 quint64 revision()
const {
return m_revision; }
23 quint64 contentRevision()
const {
return m_record.contentRevision; }
24 bool active()
const {
return m_active; }
25 void bind(
const ItemSnapshotPtr&,
int index);
27 Q_SIGNAL
void changed();
28 Q_SIGNAL
void activeChanged();
29 Q_SIGNAL
void pooled();
30 Q_SIGNAL
void reused();
35 quint64 m_revision = 0;
36 bool m_active =
false;
37 quint64 m_generation = 0;