-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathappmain.cpp
More file actions
28 lines (23 loc) · 913 Bytes
/
appmain.cpp
File metadata and controls
28 lines (23 loc) · 913 Bytes
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 "appmain.h"
#include "appcontroller.h"
#include "appview.h"
#include "tcpserver.h"
AppMain::AppMain(QObject *parent) : QObject(parent) {
createObjects();
createConnections();
appView_->show();
}
AppMain::~AppMain() {
delete appView_;
}
void AppMain::createObjects() {
appView_ = new AppView();
appController_ = new AppController(appView_);
}
void AppMain::createConnections() {
connect(appView_, SIGNAL(setAppPath(QString)), appController_, SLOT(onSetAppPath(QString)));
connect(appView_, SIGNAL(sendMessage(QString)), appController_, SIGNAL(sendMessage(QString)));
connect(appView_, SIGNAL(sendCloseApp()), appController_, SLOT(onSendCloseApp()));
connect(appController_, SIGNAL(setAppPathAccepted(bool)), appView_, SLOT(onSetAppPathAccepted(bool)));
connect(appController_, SIGNAL(gameWon()), appView_, SLOT(onGameWon()));
}