Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
16
17#include "CarManager.hpp"
18#include "enums.hpp"
19#include <QApplication>
20#include <QDebug>
21#include <csignal>
22
28void handleSigint(int) {
29 // qDebug() << "[Main] SIGINT received. Quitting application.";
30 QCoreApplication::quit();
31}
32
40int main(int argc, char *argv[]) {
41 qDebug() << "[Main] HotWheels Cluster starting...";
42
43 if (std::signal(SIGINT, handleSigint) == SIG_ERR) {
44 qDebug() << "[Main] Error setting up signal handler.";
45 return 1;
46 }
47
48 // Register enums
49 qRegisterMetaType<ComponentStatus>("ComponentStatus");
50 qRegisterMetaType<DrivingMode>("DrivingMode");
51 qRegisterMetaType<ClusterTheme>("ClusterTheme");
52 qRegisterMetaType<ClusterMetrics>("ClusterMetrics");
53 qRegisterMetaType<CarDirection>("CarDirection");
54
55 QApplication a(argc, argv);
56
57 CarManager w(argc, argv);
58
59 w.showFullScreen();
60
61 int exitCode = a.exec();
62 qDebug() << "[Main] HotWheels Cluster shutting down...";
63 return exitCode;
64}
Definition of the CarManager class.
void handleSigint(int)
SIGINT signal handler.
Definition main.cpp:27
int main(int argc, char *argv[])
Entry point for the car controls service.
Definition main.cpp:43
Class that manages the car manager application. QMainWindow.