Gazebo Gazebo

API Reference

3.15.1

TODO. More...

#include <EntityTree.hh>

Public Slots

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...
 

Public Member Functions

 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...
 

Detailed Description

TODO.

Constructor & Destructor Documentation

◆ TreeModel()

TreeModel ( )
explicit

Constructor.

◆ ~TreeModel()

~TreeModel ( )
overridedefault

Destructor.

Member Function Documentation

◆ 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]_entityEntity to be added
[in]_entityNameName of entity to be added
[in]_parentEntityParent entity. By default, kNullEntity, which means it's a root entity.
[in]_typeEntity type

◆ EntityId()

Q_INVOKABLE unsigned int EntityId ( const QModelIndex &  _index) const

Get the entity ID of a tree item at specified index.

Parameters
[in]_indexModel index
Returns
Entity ID

◆ EntityType()

Q_INVOKABLE QString EntityType ( const QModelIndex &  _index) const

Get the entity type of a tree item at specified index.

Parameters
[in]_indexModel index
Returns
Type of entity

◆ RemoveEntity

void RemoveEntity ( unsigned int  _entity)
slot

Remove an entity from the tree.

Parameters
[in]_entityEntity 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
[in]_indexModel index
Returns
Scoped name of the entity

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