blob: 7a2110bd37af7dc28bf1f09e0b03fbed03cbb45b (
plain)
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
97
98
99
100
101
102
103
|
#include <qwidget.h>
#include <qscrollview.h>
#include <qdialog.h>
#include <qlistbox.h>
#include <qlineedit.h>
#include <qcombobox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qpopupmenu.h>
class QMyConnectionItem
{
public:
QString ServerName;
QString UserName;
QString ServerIP;
int Width;
int Height;
int FullScreen;
};
class QMyDialog: public QDialog
{
Q_OBJECT
public:
QMyDialog(QWidget*);
~QMyDialog();
public:
QListBox* ListBox;
QLabel* Label1;
QLineEdit* ServerNameEdit;
QLabel* Label2;
QLineEdit* UserNameEdit;
QLabel* Label3;
QLineEdit* IPEdit;
QLineEdit* WidthEdit;
QLineEdit* HeightEdit;
QComboBox* WidthHeightBox;
QPushButton* AddButton;
QPushButton* EditButton;
QPushButton* SaveButton;
QPushButton* RemoveButton;
QCheckBox* FullScreenCheckBox;
public slots:
void ComboChanged(int);
void AddClicked();
void EditClicked();
void SaveClicked();
void RemoveClicked();
void ListBoxChanged();
void ListBoxSelected(int);
public:
QString ServerName;
QString UserName;
QString ServerIP;
int Width;
int Height;
int FullScreen;
QMyConnectionItem* ConnectionList[10];
protected slots:
void accept();
};
class QMyScrollView: public QScrollView
{
Q_OBJECT
public:
QMyScrollView();
~QMyScrollView();
void keyPressEvent(QKeyEvent*);
void keyReleaseEvent(QKeyEvent*);
void showEvent(QShowEvent*);
void show();
void polish();
void timerEvent(QTimerEvent*);
public:
int timer_id;
};
class QMyMainWindow: public QWidget
{
Q_OBJECT
public:
QMyMainWindow();
~QMyMainWindow();
void paintEvent(QPaintEvent*);
void mouseMoveEvent(QMouseEvent*);
void mousePressEvent(QMouseEvent*);
void mouseReleaseEvent(QMouseEvent*);
void wheelEvent(QWheelEvent*);
void closeEvent(QCloseEvent*);
void timerEvent(QTimerEvent*);
public slots:
void dataReceived();
void MemuClicked(int);
public:
QPopupMenu* PopupMenu;
int timer_id;
int mx;
int my;
};
|