RumPi Linux Client 1.0
A wxWidgets desktop dashboard that visualizes a RumPi robot's live sensor data as a condition-reactive scene
ComponentPanel Class Reference

A dashboard tile for a single component: shows its icon, name, enabled status, and current data, auto-sizing the data field to fit its text. More...

#include <ComponentPanel.h>

Inheritance diagram for ComponentPanel:
[legend]
Collaboration diagram for ComponentPanel:
[legend]

Public Member Functions

 ComponentPanel (wxWindow *theParentWindow, const ComponentData &theComponentData)
 Builds the component tile: stores the component data and lays out the icon and the name/status/data text fields in a vertical sizer. More...
 
void UpdateUI ()
 Refreshes the tile's controls from the current component data (icon, name, enabled/disabled status, data) and re-sizes the data field to fit. More...
 
ComponentDataGetComponentData ()
 Gets the component data this panel displays. More...
 

Protected Member Functions

void AdjustDataFieldHeight ()
 Adjusts the height of the data field so all the text can be shown, then re-lays out this panel and its parent. More...
 

Protected Attributes

ComponentData myComponentData
 The component this panel displays. More...
 
wxStaticBitmap * myComponentIconField
 The icon control. More...
 
wxTextCtrl * myDeviceNameField
 The device-name control. More...
 
wxTextCtrl * myStatusField
 The enabled/disabled status control. More...
 
wxTextCtrl * myDataField
 The data-display control. More...
 

Detailed Description

A dashboard tile for a single component: shows its icon, name, enabled status, and current data, auto-sizing the data field to fit its text.

Author
Eddie O'Hagan
Date
8/13/2026

Constructor & Destructor Documentation

◆ ComponentPanel()

ComponentPanel::ComponentPanel ( wxWindow *  theParentWindow,
const ComponentData theComponentData 
)

Builds the component tile: stores the component data and lays out the icon and the name/status/data text fields in a vertical sizer.

Author
Eddie O'Hagan
Date
8/13/2026
ComponentPanel* panel = new ComponentPanel(parent, componentData);
A dashboard tile for a single component: shows its icon, name, enabled status, and current data,...
Definition: ComponentPanel.h:16
ComponentPanel(wxWindow *theParentWindow, const ComponentData &theComponentData)
Builds the component tile: stores the component data and lays out the icon and the name/status/data t...
Definition: ComponentPanel.cpp:20
Parameters
[in]theParentWindowThe parent window.
[in]theComponentDataThe component this panel displays.

Member Function Documentation

◆ AdjustDataFieldHeight()

void ComponentPanel::AdjustDataFieldHeight ( )
protected

Adjusts the height of the data field so all the text can be shown, then re-lays out this panel and its parent.

Author
Eddie O'Hagan
Date
8/13/2026
//Called by UpdateUI() after the data field's text changes.

◆ GetComponentData()

ComponentData & ComponentPanel::GetComponentData ( )

Gets the component data this panel displays.

Author
Eddie O'Hagan
Date
8/13/2026
ComponentData& data = panel.GetComponentData();
View-model for a single component tile on the dashboard: its icon, type, name, current data string,...
Definition: ComponentData.h:14
Returns
A reference to the panel's component data.

◆ UpdateUI()

void ComponentPanel::UpdateUI ( )

Refreshes the tile's controls from the current component data (icon, name, enabled/disabled status, data) and re-sizes the data field to fit.

Author
Eddie O'Hagan
Date
8/13/2026
panel.UpdateUI();

Member Data Documentation

◆ myComponentData

ComponentData ComponentPanel::myComponentData
protected

The component this panel displays.

◆ myComponentIconField

wxStaticBitmap* ComponentPanel::myComponentIconField
protected

The icon control.

◆ myDataField

wxTextCtrl* ComponentPanel::myDataField
protected

The data-display control.

◆ myDeviceNameField

wxTextCtrl* ComponentPanel::myDeviceNameField
protected

The device-name control.

◆ myStatusField

wxTextCtrl* ComponentPanel::myStatusField
protected

The enabled/disabled status control.


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