-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
96 lines (83 loc) · 2.21 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#include <QtGui/QApplication>
#include "clientsocket.h"
#include <QHostAddress>
#include "resolution.h"
#include "util.h"
#include <QPixmap>
#include <QImage>
#include <QDebug>
#include <QGraphicsScene>
#include <QGraphicsView>
#include "server.h"
#include "clientsocket.h"
#include "screenviewerwidget.h"
#include "canvas.h"
#include <QThread>
#include "eventdespatcer.h"
#include <QLabel>
#include <QLayout>
#include <iostream>
#include <fstream>
#include "clientconector.h"
#include "serverinterface.h"
int main(int argc, char *argv[]){
QApplication a(argc, argv);
QCoreApplication::setApplicationName("DGRFB Client");
QCoreApplication::setOrganizationName("DGRFB");
a.setQuitOnLastWindowClosed(false);
DG::Util::_init();
//std::cout.rdbuf(std::cerr.rdbuf());
//std::cerr.rdbuf(std::cout.rdbuf());
/*
QWidget* widget = new QWidget;
QLabel* packetsSent = new QLabel;
packetsSent->setText("0");
widget->layout()->addWidget(packetsSent);
QLabel* ack = new QLabel;
ack->setText("0");
widget->layout()->addWidget(ack);
widget->show();
*/
/*
DG::ClientSocket* socket = new DG::ClientSocket;
socket->connectToHost("192.168.0.4", 5590);
*/
/*
ClientConector c;
c.initiate();
*/
/*
QByteArray currentResdolution = DG::Util::currentResolution()->pack();
QByteArray supportedResolutions = DG::Resolution::joinSupportedResolutions(DG::Util::SupportedResolutions(), ',');
qDebug() << currentResdolution;
qDebug() << supportedResolutions;
*/
/*
QGraphicsScene scene;
scene.setSceneRect(0, 0, 1024, 768);
QGraphicsView view(&scene);
//view.setSceneRect(0, 0, 100, 100);
scene.addText("Hallo World");
scene.addEllipse(20, 20, 600, 300);
view.show();
*/
/*
DG::Canvas scene;
QGraphicsView view(&scene);
view.setMouseTracking(true);
DG::Server* server = new DG::Server(&scene);
server->listen(5590);
view.show();
*/
ServerInterface s;
/*
DG::ScreenViewerWidget* widget = new DG::ScreenViewerWidget;
QScrollArea* scroller = new QScrollArea;
scroller->setWidget(widget);
DG::Server* server = new DG::Server(widget);
server->listen(5590);
scroller->show();
*/
qDebug() << "Quiting";
return a.exec();
}