Gazebo Sim

API Reference

9.0.0~pre1

Provides a model by which the resource spawner qml plugin pulls and updates from. More...

#include <ResourceSpawner.hh>

Signals

void sizeChanged ()
 Signal used with the totalCount property.
 

Public Member Functions

 ResourceModel ()
 Constructor.
 
 ~ResourceModel () override=default
 Destructor.
 
void AddResource (const Resource &_resource)
 Add a resource to the grid view. param[in] _resource The local resource to be added.
 
void AddResources (std::vector< Resource > &_resources)
 Add a vector of resources to the grid view. param[in] _resource The vector of local resources to be added.
 
void Clear ()
 Clear the current resource model.
 
QHash< int, QByteArray > roleNames () const override
 
void UpdateResourceModel (int index, Resource &_resource)
 Updates the resource at the provided index with the values in the passed in resource.
 

Public Attributes

int gridIndex = 0
 

Properties

int totalCount
 Property used to display the total number of resources associated with an owner.
 

Detailed Description

Provides a model by which the resource spawner qml plugin pulls and updates from.

Constructor & Destructor Documentation

◆ ResourceModel()

ResourceModel ( )
explicit

Constructor.

◆ ~ResourceModel()

~ResourceModel ( )
overridedefault

Destructor.

Member Function Documentation

◆ AddResource()

void AddResource ( const Resource _resource)

Add a resource to the grid view. param[in] _resource The local resource to be added.

◆ AddResources()

void AddResources ( std::vector< Resource > &  _resources)

Add a vector of resources to the grid view. param[in] _resource The vector of local resources to be added.

◆ Clear()

void Clear ( )

Clear the current resource model.

◆ roleNames()

QHash< int, QByteArray > roleNames ( ) const
override

◆ sizeChanged

void sizeChanged ( )
signal

Signal used with the totalCount property.

◆ UpdateResourceModel()

void UpdateResourceModel ( int  index,
Resource _resource 
)

Updates the resource at the provided index with the values in the passed in resource.

Parameters
[in]indexThe index of the resources within the resource model
[in]_resourceThe resource values with which to update the existing resource

Member Data Documentation

◆ gridIndex

int gridIndex = 0

Property Documentation

◆ totalCount

int totalCount

Property used to display the total number of resources associated with an owner.


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