-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
28 lines (19 loc) · 1.08 KB
/
Copy pathmain.cpp
File metadata and controls
28 lines (19 loc) · 1.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <QApplication>
#include "Gui/mainwindow.h"
#include "appcontroller.h"
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
AppController appController;
MainWindow w;
QObject::connect(&app, &QCoreApplication::aboutToQuit, &appController, &AppController::quit);
QObject::connect(&w, &MainWindow::sigCloseEvent, &app, &QCoreApplication::quit);
QObject::connect(&w, &MainWindow::sigTestModeChanged, &appController, &AppController::slotSetTestMode);
QObject::connect(&w, &MainWindow::sigConnectionTypeChanged, &appController, &AppController::slotChangeConnector);
QObject::connect(&w, &MainWindow::sigConnectionInfoChanged, &appController, &AppController::slotChangeConnectionInfo);
QObject::connect(&w, &MainWindow::sigWsServerPortChanged, &appController, &AppController::slotChangeWsPort);
QObject::connect(&w, &MainWindow::sigNewStreamData, &appController, &AppController::slotSendStream);
QObject::connect(&appController, &AppController::sigStreamReaded, &w, &MainWindow::slotNewStreamData);
w.show();
return app.exec();
}