Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
DataManager.hpp
Go to the documentation of this file.
1
15
16#ifndef DATAMANAGER_HPP
17#define DATAMANAGER_HPP
18
19#include "enums.hpp"
20#include <QObject>
21#include <QString>
23#include "SystemDataManager.hpp"
25#include "enums.hpp"
26
31class DataManager : public QObject {
32 Q_OBJECT
33
34public:
35 explicit DataManager(QObject *parent = nullptr);
37
41
42public slots:
43 // Forwarded slots from subclasses
44 void handleRpmData(int rawRpm);
45 void handleSpeedData(float rawSpeed);
46 void handleSteeringData(int rawAngle);
47 void handleDirectionData(CarDirection rawDirection);
48 void handleTimeData(const QString &currentDate,
49 const QString &currentTime,
50 const QString &currentDay);
51 void handleWifiData(const QString &status, const QString &wifiName);
52 void handleTemperatureData(const QString &temperature);
53 void handleIpAddressData(const QString &ipAddress);
54 void handleBatteryPercentage(float batteryPercentage);
55 void handleMileageUpdate(double mileage);
56 void toggleDrivingMode();
57 void toggleClusterTheme();
59
60signals:
61 // Forwarded signals from subclasses
62 void canDataProcessed(float processedSpeed, int processedRpm);
63 void engineDataProcessed(CarDirection processedDirection, int processedAngle);
64 void systemTimeUpdated(const QString &currentDate,
65 const QString &currentTime,
66 const QString &currentDay);
67 void systemWifiUpdated(const QString &status, const QString &wifiName);
68 void systemTemperatureUpdated(const QString &temperature);
69 void ipAddressUpdated(const QString &ipAddress);
70 void batteryPercentageUpdated(float batteryPercentage);
71 void mileageUpdated(double mileage);
75
76private:
80};
81
82#endif // DATAMANAGER_HPP
File containing the ClusterSettingsManager class.
Definition of the SystemDataManager class.
Definition of the VehicleDataManager class.
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
Class that manages the cluster settings.
void handleTimeData(const QString &currentDate, const QString &currentTime, const QString &currentDay)
Handle Time data.
void batteryPercentageUpdated(float batteryPercentage)
void toggleClusterMetrics()
Toggle the cluster metrics.
void handleIpAddressData(const QString &ipAddress)
Handle IP Address data.
VehicleDataManager * m_vehicleDataManager
void engineDataProcessed(CarDirection processedDirection, int processedAngle)
~DataManager()
Destroy the DataManager::DataManager object.
SystemDataManager * m_systemDataManager
void mileageUpdated(double mileage)
ClusterSettingsManager * getClusterSettingsManager()
SystemDataManager * getSystemDataManager()
void ipAddressUpdated(const QString &ipAddress)
void drivingModeUpdated(DrivingMode newMode)
void canDataProcessed(float processedSpeed, int processedRpm)
void toggleDrivingMode()
Toggle the driving mode.
void handleTemperatureData(const QString &temperature)
Handle Temperature data.
ClusterSettingsManager * m_clusterSettingsManager
void toggleClusterTheme()
Toggle the cluster theme.
void handleSteeringData(int rawAngle)
Handle Steering data.
void handleRpmData(int rawRpm)
Handle CAN data.
void handleSpeedData(float rawSpeed)
Handle Speed data.
void handleMileageUpdate(double mileage)
Handle Engine data.
void handleWifiData(const QString &status, const QString &wifiName)
Handle WiFi data.
void systemTimeUpdated(const QString &currentDate, const QString &currentTime, const QString &currentDay)
void handleBatteryPercentage(float batteryPercentage)
Handle Battery Percentage data.
void clusterThemeUpdated(ClusterTheme newTheme)
VehicleDataManager * getVehicleDataManager()
void clusterMetricsUpdated(ClusterMetrics newMetrics)
void systemTemperatureUpdated(const QString &temperature)
void systemWifiUpdated(const QString &status, const QString &wifiName)
void handleDirectionData(CarDirection rawDirection)
Handle Direction data.
DataManager(QObject *parent=nullptr)
Construct a new DataManager::DataManager object.
Class that manages the data received from the car's systems. QObject.
Class that manages the data received from the car's systems. QObject.
Definition of the enums used in the application.