KDStateMachineEditor API Documentation 2.1
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Attributes | List of all members
KDSME::ObjectTreeModel Class Reference

#include <objecttreemodel.h>

Inheritance diagram for KDSME::ObjectTreeModel:
Inheritance graph
[legend]
Collaboration diagram for KDSME::ObjectTreeModel:
Collaboration graph
[legend]

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
 

Detailed Description

Definition at line 27 of file objecttreemodel.h.

Member Enumeration Documentation

◆ Roles

Enumerator
ObjectRole 

return QObject*

ObjectIdRole 

return quint64

UserRole 

Definition at line 72 of file objecttreemodel.h.

Constructor & Destructor Documentation

◆ ObjectTreeModel()

ObjectTreeModel::ObjectTreeModel ( QObject *  parent = nullptr)
explicit

Definition at line 162 of file objecttreemodel.cpp.

◆ ~ObjectTreeModel()

ObjectTreeModel::~ObjectTreeModel ( )

Definition at line 168 of file objecttreemodel.cpp.

References d_ptr.

Member Function Documentation

◆ appendRootObject()

void ObjectTreeModel::appendRootObject ( QObject *  object)

Definition at line 181 of file objecttreemodel.cpp.

◆ clear()

void ObjectTreeModel::clear ( )

Definition at line 217 of file objecttreemodel.cpp.

◆ columnCount()

int ObjectTreeModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
override

Definition at line 246 of file objecttreemodel.cpp.

References parent().

Referenced by index().

◆ data()

QVariant ObjectTreeModel::data ( const QModelIndex &  index,
int  role = Qt::DisplayRole 
) const
override

Definition at line 225 of file objecttreemodel.cpp.

References index(), ObjectIdRole, and ObjectRole.

Referenced by KDSME::StateModel::data().

◆ index()

QModelIndex ObjectTreeModel::index ( int  row,
int  column,
const QModelIndex &  parent = {} 
) const
override

◆ indexForObject()

QModelIndex ObjectTreeModel::indexForObject ( QObject *  object) const

◆ parent()

QModelIndex ObjectTreeModel::parent ( const QModelIndex &  index) const
override

◆ roleNames()

QHash< int, QByteArray > ObjectTreeModel::roleNames ( ) const
override

Definition at line 173 of file objecttreemodel.cpp.

References ObjectIdRole, ObjectRole, and roleNames().

Referenced by roleNames().

◆ rootObjects()

QList< QObject * > ObjectTreeModel::rootObjects ( ) const

◆ rowCount()

int ObjectTreeModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
override

◆ setRootObject()

void ObjectTreeModel::setRootObject ( QObject *  rootObject)

Definition at line 200 of file objecttreemodel.cpp.

References setRootObjects().

Referenced by KDSME::StateModel::setState().

◆ setRootObjects()

void ObjectTreeModel::setRootObjects ( const QList< QObject * > &  rootObjects)

Definition at line 205 of file objecttreemodel.cpp.

References rootObjects().

Referenced by setRootObject().

Member Data Documentation

◆ d_ptr

ObjectTreeModelPrivate* const KDSME::ObjectTreeModel::d_ptr
protected

Definition at line 99 of file objecttreemodel.h.

Referenced by ~ObjectTreeModel().


The documentation for this class was generated from the following files:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDStateMachineEditor
Create Qt State Machine metacode using a graphical user interface
https://github.com/KDAB/KDStateMachineEditor
Generated on Tue Jul 15 2025 15:21:47 for KDStateMachineEditor API Documentation by doxygen 1.9.8