-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
36 lines (28 loc) · 1.03 KB
/
mainwindow.cpp
File metadata and controls
36 lines (28 loc) · 1.03 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
29
30
31
32
33
34
35
36
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "commandserver.h"
#include "commanddispatcher.h"
#include "multimediacommand.h"
#include "websitecommand.h"
#include "programcommand.h"
#include "clipboardcommand.h"
MainWindow::MainWindow(QClipboard* clipboard, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);
MultimediaCommand* multimediaCommand = new MultimediaCommand(parent);
WebsiteCommand* websiteCommand = new WebsiteCommand(parent);
ProgramCommand* programCommand = new ProgramCommand(parent);
ClipboardCommand* clipboardCommand = new ClipboardCommand(clipboard,parent);
CommandDispatcher::RegisterCommand(clipboardCommand);
CommandDispatcher::RegisterCommand(multimediaCommand);
CommandDispatcher::RegisterCommand(websiteCommand);
CommandDispatcher::RegisterCommand(programCommand);
CommandServer& commandServer = CommandServer::GetInstance();
commandServer.listen(QHostAddress::Any,3333);
}
MainWindow::~MainWindow()
{
delete ui;
}