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