22class PHOSPHORSHELL_EXPORT
Variants :
public QQuickItem
25 Q_CLASSINFO(
"DefaultProperty",
"delegate")
27 Q_PROPERTY(QAbstractListModel* model READ model WRITE setModel NOTIFY modelChanged)
28 Q_PROPERTY(QQmlComponent* delegate READ delegate WRITE setDelegate NOTIFY delegateChanged)
31 explicit Variants(QQuickItem* parent =
nullptr);
34 [[nodiscard]] QAbstractListModel*
model()
const;
45 void onRowsInserted(
const QModelIndex& parent,
int first,
int last);
46 void onRowsRemoved(
const QModelIndex& parent,
int first,
int last);
47 void onRowsMoved(
const QModelIndex& sourceParent,
int sourceStart,
int sourceEnd,
const QModelIndex& destParent,
50 void onDataChanged(
const QModelIndex& topLeft,
const QModelIndex& bottomRight,
const QList<int>& roles);
55 void refreshInstanceData(
int row);
56 QVariantMap buildModelData(
int row)
const;
60 QPointer<QAbstractListModel> m_model;
61 QPointer<QQmlComponent> m_delegate;
64 QList<QObject*> m_instances;