Gazebo Gazebo

API Reference

6.16.0

TODO. More...

#include <EntityTree.hh>

Public Slots

void AddEntity (Entity _entity, const QString &_entityName, Entity _parentEntity=kNullEntity, const QString &_type=QString())
 Add an entity to the tree. More...
 
void RemoveEntity (Entity _entity)
 Remove an entity from the tree. More...
 

Public Member Functions

 TreeModel ()
 Constructor. More...
 
 ~TreeModel () override=default
 Destructor. More...
 
Q_INVOKABLE Entity 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 ( Entity  _entity,
const QString &  _entityName,
Entity  _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 Entity 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 ( Entity  _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: