blob: 45a7f5630133a608d47159bcef49f5b823e0e844 (
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
|
/*
* $Id: mainwindow.h,v 0.1 2005/01/08 12:20:13 denis Exp $
*
* Author: Denis Kozadaev (denis@tambov.ru)
* Description:
*
* See also: style(9)
*
* Hacked by:
*/
#ifndef __MAIN_WINDOW_H__
#define __MAIN_WINDOW_H__
#include <ntqmainwindow.h>
#include <ntqpopupmenu.h>
#include <ntqworkspace.h>
#include <ntqdialog.h>
#include <ntqlabel.h>
#include <ntqcombobox.h>
#include <ntqbuttongroup.h>
#include <ntqradiobutton.h>
#include <ntqgroupbox.h>
#include <ntqpushbutton.h>
#include <stdlib.h>
#include "gamesocket.h"
#include "gameboard.h"
class MainWindow:public TQMainWindow
{
Q_OBJECT
public:
MainWindow(TQWidget *parent = NULL, const char *name = NULL);
~MainWindow();
bool sockOk()const{return (sock->ok());}
private:
int id;
TQString ready_txt;
TQPopupMenu *game, *help;
TQWorkspace *wrk;
GameSocket *sock;
TQStringList hosts;
private slots:
void showStatus(const TQString&);
void newGame();
void newGame(int);
void about();
void activated(TQWidget *);
void saveImage();
};
//-----------------------------------------------------------------------------
class SelectGame:public TQDialog
{
Q_OBJECT
public:
SelectGame(TQWidget *parent = NULL, const char *name = NULL);
~SelectGame();
void setHosts(const TQStringList &);
TQString host();
TQStringList hosts();
GameBoard::GameType gameType();
private:
TQLabel *l1;
TQComboBox *hst;
TQButtonGroup *btn;
TQRadioButton *wg, *bg;
TQGroupBox *box;
TQPushButton *Ok, *Cancel;
protected:
void resizeEvent(TQResizeEvent *);
private slots:
void checkParams();
void checkParams(const TQString&);
};
#endif /* __MAIN_WINDOW_H__ */
|