Go to the documentation of this file.
16#ifndef KDSME_UTIL_OBJECTTREEMODEL_H
17#define KDSME_UTIL_OBJECTTREEMODEL_H
19#include "kdsme_core_export.h"
21#include <QAbstractItemModel>
25class ObjectTreeModelPrivate;
82 void appendRootObject(QObject *
object);
83 QList<QObject *> rootObjects()
const;
84 void setRootObject(QObject *rootObject);
85 void setRootObjects(
const QList<QObject *> &rootObjects);
88 int columnCount(
const QModelIndex &parent = QModelIndex())
const override;
89 int rowCount(
const QModelIndex &parent = QModelIndex())
const override;
90 QVariant data(
const QModelIndex &index,
int role = Qt::DisplayRole)
const override;
91 QModelIndex index(
int row,
int column,
const QModelIndex &parent = {})
const override;
92 QModelIndex parent(
const QModelIndex &index)
const override;
93 QHash<int, QByteArray> roleNames()
const override;
95 QModelIndex indexForObject(QObject *
object)
const;
98 Q_DECLARE_PRIVATE(ObjectTreeModel)
99 ObjectTreeModelPrivate *const
d_ptr;
AppendOperation(ObjectTreeModel *model, QObject *parent, int count=1, int index=-1)
RemoveOperation(ObjectTreeModel *model, QObject *object)
ReparentOperation(ObjectTreeModel *model, QObject *object, QObject *newParent)
ResetOperation(ObjectTreeModel *model)
ObjectTreeModelPrivate *const d_ptr
ObjectTreeModel(QObject *parent=nullptr)
QModelIndex index(int row, int column, const QModelIndex &parent={}) const override
QModelIndex parent(const QModelIndex &index) const override
@ ObjectIdRole
return quint64
@ ObjectRole
return QObject*