-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
37 lines (33 loc) · 1.25 KB
/
main.cpp
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
29
30
31
32
33
34
35
36
37
#include "MainWindow.h"
#include <QApplication>
#include "TestingModule.h"
#include "server/TestServer.h"
#include "register_shit.h"
#include "test_css.h"
int main(int argc, char *argv[])
{
//run_test();
if(should_run_test()) {
run_test();
return 0;
}
QApplication app(argc, argv);
MainWindow w;
w.show();
TestingModule mod(&app);
register_shit();
mod.start();
mod.startListening();
// Start threaded server
TestServer pokus(6660);
QObject::connect(&pokus, &TestServer::command, &mod, &TestingModule::command);
//QObject::connect(&pokus, SIGNAL(command(const QString&,const QString&)),
// &mod, SLOT(command(const QString&,const QString&)), Qt::QueuedConnection);
QObject::connect(&mod, SIGNAL(message(const QString)),
&pokus, SLOT(message(const QString)));
QObject::connect(&mod, SIGNAL(message(const QString, const QString)),
&pokus, SLOT(message(const QString, const QString)));
//QObject::connect(&mod, &TestingModule::message, &pokus, &TestServer::message, Qt::QueuedConnection);
//QObject::connect(&w, &MainWindow::clickWidgetRequest, &mod, &TestingModule::clickWidgetByName, Qt::QueuedConnection);
return app.exec();
}