Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
DisplayManager.hpp
Go to the documentation of this file.
1
15
16#ifndef DISPLAYMANAGER_HPP
17#define DISPLAYMANAGER_HPP
18
19#include "enums.hpp"
20#include "ui_CarManager.h"
21#include <QObject>
22#include <QString>
23
28class DisplayManager : public QObject {
29 Q_OBJECT
30
31public:
32 explicit DisplayManager(Ui::CarManager *ui, QObject *parent = nullptr);
33
34public slots:
35 void updateCanBusData(float speed, int rpm);
36 void updateEngineData(CarDirection direction, int steeringAngle);
37 void updateSystemTime(const QString &currentDate, const QString &currentTime,
38 const QString &currentDay);
39 void updateWifiStatus(const QString &status, const QString &wifiName);
40 void updateTemperature(const QString &temperature);
41 void updateBatteryPercentage(float batteryPercentage);
42 void updateIpAddress(const QString &ipAddress);
43 void updateMileage(double mileage);
44 void updateDrivingMode(DrivingMode newMode);
45 void updateClusterTheme(ClusterTheme newTheme);
46 void updateClusterMetrics(ClusterMetrics newMetrics);
47
48signals:
55
56private:
58 Ui::CarManager *m_ui;
59};
60
61#endif // DISPLAYMANAGER_HPP
DrivingMode
Enum class for the driving mode.
Definition enums.hpp:24
CarDirection
Enum class for the car direction.
Definition enums.hpp:30
ClusterTheme
Enum class for the cluster theme.
Definition enums.hpp:26
ClusterMetrics
Enum class for the cluster metrics.
Definition enums.hpp:28
void updateTemperature(const QString &temperature)
Updates the temperature 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 updateIpAddress(const QString &ipAddress)
Updates the IP address on the display.
void clusterMetricsToggled()
Signal emitted when the cluster metrics are toggled.
void clusterThemeToggled()
Signal emitted when the cluster theme is toggled.
void drivingModeToggled()
Signal emitted when the driving mode is toggled.
Ui::CarManager * m_ui
Pointer to the UI object.
void updateSystemTime(const QString &currentDate, const QString &currentTime, const QString &currentDay)
Updates the system time on the display.
void updateBatteryPercentage(float batteryPercentage)
Updates the battery percentage on the display.
void updateCanBusData(float speed, int rpm)
Updates the CAN bus data on the display.
void updateClusterMetrics(ClusterMetrics newMetrics)
Updates the cluster metrics on the display.
void updateEngineData(CarDirection direction, int steeringAngle)
Updates the engine data on the display.
DisplayManager(Ui::CarManager *ui, QObject *parent=nullptr)
Construct a new DisplayManager object.
void updateMileage(double mileage)
Updates the mileage on the display.
void updateWifiStatus(const QString &status, const QString &wifiName)
Updates the WiFi status on the display.