- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverinterface.cpp
More file actions
Latest commit
22 lines (19 loc) · 644 Bytes
/
Copy pathserverinterface.cpp
File metadata and controls
22 lines (19 loc) · 644 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#include"serverinterface.h"
#include<QApplication>
ServerInterface::ServerInterface(QObject *parent) : QObject(parent){
view.setScene(&scene);
view.setMouseTracking(true);
server = newDG::Server(&scene);
dialog = new ServerConnectionDialog;
QObject::connect(dialog, SIGNAL(serverStarted(int)), this, SLOT(startServer(int)));
QObject::connect(dialog, SIGNAL(serverQuit()), this, SLOT(quitSlot()));
dialog->show();
}
voidServerInterface::startServer(int port){
server->listen(5590);
view.show();
}
voidServerInterface::quitSlot(){
server->close();
QApplication::quit();
}