3#include <wx/dataview.h>
4#include <RumPi/Components/BaseComponent.h>
50 ComponentData(
const RumPi::EComponentType componentType,
const wxString& name,
const wxString& data,
const bool isEnabled);
105 const wxString&
GetName()
const;
119 const wxString&
GetData()
const;
147 void SetIcon(
const wxBitmapBundle& icon);
175 void SetName(
const wxString& name);
189 void SetData(
const wxString& data);
View-model for a single component tile on the dashboard: its icon, type, name, current data string,...
Definition: ComponentData.h:14
bool GetIsEnabled() const
Gets whether the component is currently enabled.
Definition: ComponentData.cpp:126
wxBitmapBundle GetIcon() const
Gets the component's icon.
Definition: ComponentData.cpp:58
wxString myData
The current data string to display.
Definition: ComponentData.h:19
bool myIsEnabled
Whether the component is currently enabled.
Definition: ComponentData.h:20
void SetData(const wxString &data)
Sets the component's current data string.
Definition: ComponentData.cpp:194
void SetIcon(const wxBitmapBundle &icon)
Sets the component's icon.
Definition: ComponentData.cpp:143
ComponentData()
Builds an empty component tile with an unknown type and disabled state.
Definition: ComponentData.cpp:14
wxBitmapBundle myIcon
The component's icon (derived from its type).
Definition: ComponentData.h:16
const wxString & GetName() const
Gets the component's unique instance name.
Definition: ComponentData.cpp:92
virtual ~ComponentData()=default
Defaulted destructor.
void SetComponentType(const RumPi::EComponentType componentType)
Sets the component's type.
Definition: ComponentData.cpp:160
void SetIsEnabled(const bool isEnabled)
Sets whether the component is currently enabled.
Definition: ComponentData.cpp:211
RumPi::EComponentType GetComponentType() const
Gets the component's type.
Definition: ComponentData.cpp:75
const wxString & GetData() const
Gets the component's current data string.
Definition: ComponentData.cpp:109
void SetName(const wxString &name)
Sets the component's unique instance name.
Definition: ComponentData.cpp:177
wxString myName
The component's unique instance name, shown as its label.
Definition: ComponentData.h:18
RumPi::EComponentType myComponentType
The component's type.
Definition: ComponentData.h:17