KDStateMachineEditor API Documentation 2.1
|
#include <objecttreemodel.h>
Classes | |
class | AppendOperation |
class | RemoveOperation |
class | ReparentOperation |
class | ResetOperation |
Public Types | |
enum | Roles { ObjectRole = Qt::UserRole + 1 , ObjectIdRole , UserRole = Qt::UserRole + 100 } |
Public Member Functions | |
ObjectTreeModel (QObject *parent=nullptr) | |
~ObjectTreeModel () | |
void | appendRootObject (QObject *object) |
void | clear () |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
QModelIndex | index (int row, int column, const QModelIndex &parent={}) const override |
QModelIndex | indexForObject (QObject *object) const |
QModelIndex | parent (const QModelIndex &index) const override |
QHash< int, QByteArray > | roleNames () const override |
QList< QObject * > | rootObjects () const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
void | setRootObject (QObject *rootObject) |
void | setRootObjects (const QList< QObject * > &rootObjects) |
Protected Attributes | |
ObjectTreeModelPrivate *const | d_ptr |
Definition at line 27 of file objecttreemodel.h.
Enumerator | |
---|---|
ObjectRole | return QObject* |
ObjectIdRole | return quint64 |
UserRole |
Definition at line 72 of file objecttreemodel.h.
|
explicit |
Definition at line 162 of file objecttreemodel.cpp.
ObjectTreeModel::~ObjectTreeModel | ( | ) |
Definition at line 168 of file objecttreemodel.cpp.
References d_ptr.
void ObjectTreeModel::appendRootObject | ( | QObject * | object | ) |
Definition at line 181 of file objecttreemodel.cpp.
void ObjectTreeModel::clear | ( | ) |
Definition at line 217 of file objecttreemodel.cpp.
|
override |
|
override |
Definition at line 225 of file objecttreemodel.cpp.
References index(), ObjectIdRole, and ObjectRole.
Referenced by KDSME::StateModel::data().
|
override |
Definition at line 258 of file objecttreemodel.cpp.
References columnCount(), parent(), and rowCount().
Referenced by KDSME::ObjectTreeModel::AppendOperation::AppendOperation(), KDSME::StateModel::data(), data(), KDSME::StateModel::flags(), and parent().
QModelIndex ObjectTreeModel::indexForObject | ( | QObject * | object | ) | const |
Definition at line 280 of file objecttreemodel.cpp.
Referenced by KDSME::ObjectTreeModel::AppendOperation::AppendOperation(), KDSME::ObjectTreeModel::RemoveOperation::RemoveOperation(), KDSME::ObjectTreeModel::ReparentOperation::ReparentOperation(), KDSME::StateMachineScene::isItemSelected(), KDSME::DeleteElementCommand::redo(), KDSME::StateMachineScene::setCurrentItem(), and KDSME::StateMachineScene::setItemSelected().
|
override |
Definition at line 286 of file objecttreemodel.cpp.
References index(), and parent().
Referenced by KDSME::ObjectTreeModel::AppendOperation::AppendOperation(), columnCount(), index(), parent(), and rowCount().
|
override |
Definition at line 173 of file objecttreemodel.cpp.
References ObjectIdRole, ObjectRole, and roleNames().
Referenced by roleNames().
QList< QObject * > ObjectTreeModel::rootObjects | ( | ) | const |
Definition at line 194 of file objecttreemodel.cpp.
Referenced by KDSME::ObjectTreeModel::RemoveOperation::RemoveOperation(), setRootObjects(), and KDSME::StateModel::state().
|
override |
Definition at line 252 of file objecttreemodel.cpp.
References parent().
Referenced by KDSME::ObjectTreeModel::AppendOperation::AppendOperation(), KDSME::ObjectTreeModel::ReparentOperation::ReparentOperation(), and index().
void ObjectTreeModel::setRootObject | ( | QObject * | rootObject | ) |
Definition at line 200 of file objecttreemodel.cpp.
References setRootObjects().
Referenced by KDSME::StateModel::setState().
void ObjectTreeModel::setRootObjects | ( | const QList< QObject * > & | rootObjects | ) |
Definition at line 205 of file objecttreemodel.cpp.
References rootObjects().
Referenced by setRootObject().
|
protected |
Definition at line 99 of file objecttreemodel.h.
Referenced by ~ObjectTreeModel().