Gazebo Gazebo

API Reference

3.15.2

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

Public Member Functions

 ResourceModel ()
 Constructor. More...
 
 ~ResourceModel () override=default
 Destructor. More...
 
void AddResource (const Resource &_resource)
 Add a resource to the grid view. param[in] _resource The local resource to be added. More...
 
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. More...
 
void Clear ()
 Clear the current resource model. More...
 
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. More...
 

Public Attributes

int gridIndex = 0
 

Properties

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

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: