diff options
Diffstat (limited to 'src/qmlmodels/qqmldelegatemodel_p.h')
-rw-r--r-- | src/qmlmodels/qqmldelegatemodel_p.h | 41 |
1 files changed, 19 insertions, 22 deletions
diff --git a/src/qmlmodels/qqmldelegatemodel_p.h b/src/qmlmodels/qqmldelegatemodel_p.h index bfb5b6d38a..2eeffb9e0c 100644 --- a/src/qmlmodels/qqmldelegatemodel_p.h +++ b/src/qmlmodels/qqmldelegatemodel_p.h @@ -29,13 +29,12 @@ QT_BEGIN_NAMESPACE class QQmlChangeSet; class QQuickPackage; -class QQmlV4Function; class QQmlDelegateModelGroup; class QQmlDelegateModelAttached; class QQmlDelegateModelPrivate; -class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateModel : public QQmlInstanceModel, public QQmlParserStatus +class Q_QMLMODELS_EXPORT QQmlDelegateModel : public QQmlInstanceModel, public QQmlParserStatus { Q_OBJECT Q_DECLARE_PRIVATE(QQmlDelegateModel) @@ -114,7 +113,7 @@ private Q_SLOTS: void _q_itemsInserted(int index, int count); void _q_itemsRemoved(int index, int count); void _q_itemsMoved(int from, int to, int count); - void _q_modelReset(); + void _q_modelAboutToBeReset(); void _q_rowsInserted(const QModelIndex &,int,int); void _q_columnsInserted(const QModelIndex &, int, int); void _q_columnsRemoved(const QModelIndex &, int, int); @@ -126,13 +125,14 @@ private Q_SLOTS: void _q_layoutChanged(const QList<QPersistentModelIndex>&, QAbstractItemModel::LayoutChangeHint); private: + void handleModelReset(); bool isDescendantOf(const QPersistentModelIndex &desc, const QList<QPersistentModelIndex> &parents) const; Q_DISABLE_COPY(QQmlDelegateModel) }; class QQmlDelegateModelGroupPrivate; -class Q_QMLMODELS_PRIVATE_EXPORT QQmlDelegateModelGroup : public QObject +class Q_QMLMODELS_EXPORT QQmlDelegateModelGroup : public QObject { Q_OBJECT Q_PROPERTY(int count READ count NOTIFY countChanged) @@ -156,14 +156,14 @@ public: Q_INVOKABLE QJSValue get(int index); public Q_SLOTS: - void insert(QQmlV4Function *); - void create(QQmlV4Function *); - void resolve(QQmlV4Function *); - void remove(QQmlV4Function *); - void addGroups(QQmlV4Function *); - void removeGroups(QQmlV4Function *); - void setGroups(QQmlV4Function *); - void move(QQmlV4Function *); + void insert(QQmlV4FunctionPtr); + void create(QQmlV4FunctionPtr); + void resolve(QQmlV4FunctionPtr); + void remove(QQmlV4FunctionPtr); + void addGroups(QQmlV4FunctionPtr); + void removeGroups(QQmlV4FunctionPtr); + void setGroups(QQmlV4FunctionPtr); + void move(QQmlV4FunctionPtr); Q_SIGNALS: void countChanged(); @@ -179,13 +179,13 @@ class QQmlDelegateModelAttachedMetaObject; class QQmlDelegateModelAttached : public QObject { Q_OBJECT - Q_PROPERTY(QQmlDelegateModel *model READ model CONSTANT) - Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged) - Q_PROPERTY(bool isUnresolved READ isUnresolved NOTIFY unresolvedChanged) - Q_PROPERTY(bool inPersistedItems READ inPersistedItems WRITE setInPersistedItems NOTIFY groupsChanged) - Q_PROPERTY(bool inItems READ inItems WRITE setInItems NOTIFY groupsChanged) - Q_PROPERTY(int persistedItemsIndex READ persistedItemsIndex NOTIFY groupsChanged) - Q_PROPERTY(int itemsIndex READ itemsIndex NOTIFY groupsChanged) + Q_PROPERTY(QQmlDelegateModel *model READ model CONSTANT FINAL) + Q_PROPERTY(QStringList groups READ groups WRITE setGroups NOTIFY groupsChanged FINAL) + Q_PROPERTY(bool isUnresolved READ isUnresolved NOTIFY unresolvedChanged FINAL) + Q_PROPERTY(bool inPersistedItems READ inPersistedItems WRITE setInPersistedItems NOTIFY groupsChanged FINAL) + Q_PROPERTY(bool inItems READ inItems WRITE setInItems NOTIFY groupsChanged FINAL) + Q_PROPERTY(int persistedItemsIndex READ persistedItemsIndex NOTIFY groupsChanged FINAL) + Q_PROPERTY(int itemsIndex READ itemsIndex NOTIFY groupsChanged FINAL) public: QQmlDelegateModelAttached(QObject *parent); @@ -232,7 +232,4 @@ public: QT_END_NAMESPACE -QML_DECLARE_TYPE(QQmlDelegateModel) -QML_DECLARE_TYPE(QQmlDelegateModelGroup) - #endif // QQMLDATAMODEL_P_H |