Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
DisplayManager Class Reference

Class that manages the display of the car manager. QObject. More...

#include <DisplayManager.hpp>

Public Slots

void updateCanBusData (float speed, int rpm)
 Updates the CAN bus data on the display.
 
void updateEngineData (CarDirection direction, int steeringAngle)
 Updates the engine data on the display.
 
void updateSystemTime (const QString &currentDate, const QString &currentTime, const QString &currentDay)
 Updates the system time on the display.
 
void updateWifiStatus (const QString &status, const QString &wifiName)
 Updates the WiFi status on the display.
 
void updateTemperature (const QString &temperature)
 Updates the temperature on the display.
 
void updateBatteryPercentage (float batteryPercentage)
 Updates the battery percentage on the display.
 
void updateIpAddress (const QString &ipAddress)
 Updates the IP address on the display.
 
void updateMileage (double mileage)
 Updates the mileage on the display.
 
void updateDrivingMode (DrivingMode newMode)
 Updates the driving mode on the display.
 
void updateClusterTheme (ClusterTheme newTheme)
 Updates the cluster theme on the display.
 
void updateClusterMetrics (ClusterMetrics newMetrics)
 Updates the cluster metrics on the display.
 

Signals

void drivingModeToggled ()
 Signal emitted when the driving mode is toggled.
 
void clusterThemeToggled ()
 Signal emitted when the cluster theme is toggled.
 
void clusterMetricsToggled ()
 Signal emitted when the cluster metrics are toggled.
 

Public Member Functions

 DisplayManager (Ui::CarManager *ui, QObject *parent=nullptr)
 Construct a new DisplayManager object.
 

Private Attributes

Ui::CarManager * m_ui
 Pointer to the UI object.
 

Detailed Description

Class that manages the display of the car manager. QObject.

Definition at line 28 of file DisplayManager.hpp.

Constructor & Destructor Documentation

◆ DisplayManager()

DisplayManager::DisplayManager ( Ui::CarManager * ui,
QObject * parent = nullptr )
explicit

Construct a new DisplayManager object.

Parameters
uiThe UI form for the cluster.
parentThe parent QObject.

This constructor initializes the DisplayManager object with the specified UI form.

Definition at line 31 of file DisplayManager.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ clusterMetricsToggled

void DisplayManager::clusterMetricsToggled ( )
signal

Signal emitted when the cluster metrics are toggled.

Here is the caller graph for this function:

◆ clusterThemeToggled

void DisplayManager::clusterThemeToggled ( )
signal

Signal emitted when the cluster theme is toggled.

Here is the caller graph for this function:

◆ drivingModeToggled

void DisplayManager::drivingModeToggled ( )
signal

Signal emitted when the driving mode is toggled.

Here is the caller graph for this function:

◆ updateBatteryPercentage

void DisplayManager::updateBatteryPercentage ( float batteryPercentage)
slot

Updates the battery percentage on the display.

This function updates the battery percentage label and low battery warning based on the current battery percentage.

Parameters
batteryPercentageThe current battery percentage.

Definition at line 158 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateCanBusData

void DisplayManager::updateCanBusData ( float speed,
int rpm )
slot

Updates the CAN bus data on the display.

This function updates the speed and RPM labels based on the CAN bus data.

Parameters
speedThe current speed of the car.
rpmThe current RPM of the car.

Definition at line 68 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateClusterMetrics

void DisplayManager::updateClusterMetrics ( ClusterMetrics newMetrics)
slot

Updates the cluster metrics on the display.

This function updates the cluster metrics label and speed metrics label based on the current cluster metrics.

Parameters
newMetricsThe new cluster metrics.

Definition at line 231 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateClusterTheme

void DisplayManager::updateClusterTheme ( ClusterTheme newTheme)
slot

Updates the cluster theme on the display.

This function updates the cluster theme label based on the current cluster theme.

Parameters
newThemeThe new cluster theme.

Definition at line 212 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateDrivingMode

void DisplayManager::updateDrivingMode ( DrivingMode newMode)
slot

Updates the driving mode on the display.

This function updates the driving mode label based on the current driving mode.

Parameters
newModeThe new driving mode.

Definition at line 193 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateEngineData

void DisplayManager::updateEngineData ( CarDirection direction,
int steeringAngle )
slot

Updates the engine data on the display.

This function updates the direction label and blinker visibility based on the engine data.

Parameters
directionThe current direction of the car.
steeringAngleThe current steering angle of the car.

Definition at line 81 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateIpAddress

void DisplayManager::updateIpAddress ( const QString & ipAddress)
slot

Updates the IP address on the display.

This function updates the IP address label based on the current IP address.

Parameters
ipAddressThe current IP address.

Definition at line 183 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateMileage

void DisplayManager::updateMileage ( double mileage)
slot

Updates the mileage on the display.

This function updates the mileage label based on the current mileage.

Parameters
mileageThe current mileage.

Definition at line 172 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateSystemTime

void DisplayManager::updateSystemTime ( const QString & currentDate,
const QString & currentTime,
const QString & currentDay )
slot

Updates the system time on the display.

This function updates the date, time, and weekday labels based on the current system time.

Parameters
currentDateThe current date.
currentTimeThe current time.
currentDayThe current day of the week.

Definition at line 118 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateTemperature

void DisplayManager::updateTemperature ( const QString & temperature)
slot

Updates the temperature on the display.

This function updates the temperature label based on the current temperature.

Parameters
temperatureThe current temperature.

Definition at line 148 of file DisplayManager.cpp.

Here is the caller graph for this function:

◆ updateWifiStatus

void DisplayManager::updateWifiStatus ( const QString & status,
const QString & wifiName )
slot

Updates the WiFi status on the display.

This function updates the WiFi status label based on the current WiFi status and name.

Parameters
statusThe current WiFi status.
wifiNameThe name of the connected WiFi network.

Definition at line 133 of file DisplayManager.cpp.

Here is the caller graph for this function:

Field Documentation

◆ m_ui

Ui::CarManager* DisplayManager::m_ui
private

Pointer to the UI object.

Definition at line 58 of file DisplayManager.hpp.


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