TODO.
More...
#include <EntityTree.hh>
|
void | AddEntity (unsigned int _entity, const QString &_entityName, unsigned int _parentEntity=kNullEntity, const QString &_type=QString()) |
| Add an entity to the tree. More...
|
|
void | RemoveEntity (unsigned int _entity) |
| Remove an entity from the tree. More...
|
|
|
| TreeModel () |
| Constructor. More...
|
|
| ~TreeModel () override=default |
| Destructor. More...
|
|
Q_INVOKABLE unsigned int | EntityId (const QModelIndex &_index) const |
| Get the entity ID of a tree item at specified index. More...
|
|
Q_INVOKABLE QString | EntityType (const QModelIndex &_index) const |
| Get the entity type of a tree item at specified index. More...
|
|
QHash< int, QByteArray > | roleNames () const override |
|
Q_INVOKABLE QString | ScopedName (const QModelIndex &_index) const |
| Get the scoped name of a tree item at specified index. More...
|
|
◆ TreeModel()
◆ ~TreeModel()
◆ AddEntity
void AddEntity |
( |
unsigned int |
_entity, |
|
|
const QString & |
_entityName, |
|
|
unsigned int |
_parentEntity = kNullEntity , |
|
|
const QString & |
_type = QString() |
|
) |
| |
|
slot |
Add an entity to the tree.
- Parameters
-
[in] | _entity | Entity to be added |
[in] | _entityName | Name of entity to be added |
[in] | _parentEntity | Parent entity. By default, kNullEntity, which means it's a root entity. |
[in] | _type | Entity type |
◆ EntityId()
Q_INVOKABLE unsigned int EntityId |
( |
const QModelIndex & |
_index | ) |
const |
Get the entity ID of a tree item at specified index.
- Parameters
-
- Returns
- Entity ID
◆ EntityType()
Q_INVOKABLE QString EntityType |
( |
const QModelIndex & |
_index | ) |
const |
Get the entity type of a tree item at specified index.
- Parameters
-
- Returns
- Type of entity
◆ RemoveEntity
void RemoveEntity |
( |
unsigned int |
_entity | ) |
|
|
slot |
Remove an entity from the tree.
- Parameters
-
[in] | _entity | Entity to be removed |
◆ roleNames()
QHash<int, QByteArray> roleNames |
( |
| ) |
const |
|
override |
◆ ScopedName()
Q_INVOKABLE QString ScopedName |
( |
const QModelIndex & |
_index | ) |
const |
Get the scoped name of a tree item at specified index.
- Parameters
-
- Returns
- Scoped name of the entity
The documentation for this class was generated from the following file: