ResourceModel Class Reference
Provides a model by which the resource spawner qml plugin pulls and updates from. More...
#include <ResourceSpawner.hh>
Public Member Functions | |
ResourceModel () | |
Constructor. More... | |
~ResourceModel () override=default | |
Destructor. More... | |
void | AddResource (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 |
Detailed Description
Provides a model by which the resource spawner qml plugin pulls and updates from.
Constructor & Destructor Documentation
◆ ResourceModel()
|
explicit |
Constructor.
◆ ~ResourceModel()
|
overridedefault |
Destructor.
Member Function Documentation
◆ AddResource()
void AddResource | ( | 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()
|
override |
◆ UpdateResourceModel()
void UpdateResourceModel | ( | int | index, |
Resource & | _resource | ||
) |
Updates the resource at the provided index with the values in the passed in resource.
- Parameters
-
[in] index The index of the resources within the resource model [in] _resource The resource values with which to update the existing resource
Member Data Documentation
◆ gridIndex
int gridIndex = 0 |
The documentation for this class was generated from the following file: