Go to the documentation of this file.
16#ifndef KDSME_QUICK_QUICKRECURSIVEINSTANTIATOR_P_H
17#define KDSME_QUICK_QUICKRECURSIVEINSTANTIATOR_P_H
21#include <QPersistentModelIndex>
25class QAbstractItemModel;
34 Q_CLASSINFO(
"DefaultProperty",
"delegate")
39 QAbstractItemModel *
model() const;
45 QObject *
itemForIndex(const QModelIndex &index) const override;
51 void modelDestroyed();
52 void rowsInserted(const QModelIndex &parent,
int first,
int last);
53 void rowsAboutToBeRemoved(const QModelIndex &parent,
int first,
int last);
60 QObject *createItems(const QModelIndex &index, QObject *parent);
61 void removeItems(const QModelIndex &index, QObject *parent);
63 QAbstractItemModel *m_model;
64 QQmlComponent *m_delegate;
65 QHash<QPersistentModelIndex, QObject *> m_createdItems;
67 QList<QObject *> m_rootItems;
virtual void setModel(QAbstractItemModel *model)
QAbstractItemModel * model
void modelChanged(QAbstractItemModel *model)
QuickRecursiveInstantiator(QQuickItem *parent=nullptr)
QObject * itemForIndex(const QModelIndex &index) const override
void setDelegate(QQmlComponent *delegate)
void delegateChanged(QQmlComponent *delegate)
QList< QObject * > rootItems() const