1 |
|
2 |
#include <qwidget.h> |
3 |
#include <qscrollview.h> |
4 |
#include <qdialog.h> |
5 |
#include <qlistbox.h> |
6 |
#include <qlineedit.h> |
7 |
#include <qcombobox.h> |
8 |
#include <qlabel.h> |
9 |
#include <qcheckbox.h> |
10 |
#include <qpopupmenu.h> |
11 |
|
12 |
class QMyConnectionItem |
13 |
{ |
14 |
public: |
15 |
QString ServerName; |
16 |
QString UserName; |
17 |
QString ServerIP; |
18 |
int Width; |
19 |
int Height; |
20 |
int FullScreen; |
21 |
}; |
22 |
|
23 |
class QMyDialog: public QDialog |
24 |
{ |
25 |
Q_OBJECT |
26 |
public: |
27 |
QMyDialog(QWidget*); |
28 |
~QMyDialog(); |
29 |
public: |
30 |
QListBox* ListBox; |
31 |
QPushButton* OKButton; |
32 |
QPushButton* CancelButton; |
33 |
QLabel* Label1; |
34 |
QLineEdit* ServerNameEdit; |
35 |
QLabel* Label2; |
36 |
QLineEdit* UserNameEdit; |
37 |
QLabel* Label3; |
38 |
QLineEdit* IPEdit; |
39 |
QLineEdit* WidthEdit; |
40 |
QLineEdit* HeightEdit; |
41 |
QComboBox* WidthHeightBox; |
42 |
QPushButton* AddButton; |
43 |
QPushButton* EditButton; |
44 |
QPushButton* SaveButton; |
45 |
QPushButton* RemoveButton; |
46 |
QCheckBox* FullScreenCheckBox; |
47 |
public slots: |
48 |
void ComboChanged(int); |
49 |
void OKClicked(); |
50 |
void CancelClicked(); |
51 |
void AddClicked(); |
52 |
void EditClicked(); |
53 |
void SaveClicked(); |
54 |
void RemoveClicked(); |
55 |
void ListBoxChanged(); |
56 |
void ListBoxSelected(int); |
57 |
public: |
58 |
QString ServerName; |
59 |
QString UserName; |
60 |
QString ServerIP; |
61 |
int Width; |
62 |
int Height; |
63 |
int FullScreen; |
64 |
QMyConnectionItem* ConnectionList[10]; |
65 |
}; |
66 |
|
67 |
class QMyScrollView: public QScrollView |
68 |
{ |
69 |
Q_OBJECT |
70 |
public: |
71 |
QMyScrollView(); |
72 |
~QMyScrollView(); |
73 |
void keyPressEvent(QKeyEvent*); |
74 |
void keyReleaseEvent(QKeyEvent*); |
75 |
void showEvent(QShowEvent*); |
76 |
void show(); |
77 |
void polish(); |
78 |
void timerEvent(QTimerEvent*); |
79 |
public: |
80 |
int timer_id; |
81 |
int sound_timer_id; |
82 |
}; |
83 |
|
84 |
class QMyMainWindow: public QWidget |
85 |
{ |
86 |
Q_OBJECT |
87 |
public: |
88 |
QMyMainWindow(); |
89 |
~QMyMainWindow(); |
90 |
void paintEvent(QPaintEvent*); |
91 |
void mouseMoveEvent(QMouseEvent*); |
92 |
void mousePressEvent(QMouseEvent*); |
93 |
void mouseReleaseEvent(QMouseEvent*); |
94 |
void wheelEvent(QWheelEvent*); |
95 |
void closeEvent(QCloseEvent*); |
96 |
void timerEvent(QTimerEvent*); |
97 |
public slots: |
98 |
void dataReceived(); |
99 |
void soundSend(); |
100 |
void MemuClicked(int); |
101 |
public: |
102 |
QPopupMenu* PopupMenu; |
103 |
int timer_id; |
104 |
int mx; |
105 |
int my; |
106 |
}; |
107 |
|