diff options
Diffstat (limited to 'qnetchess/src/mainwindow.h')
-rw-r--r-- | qnetchess/src/mainwindow.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/qnetchess/src/mainwindow.h b/qnetchess/src/mainwindow.h new file mode 100644 index 00000000..45a7f563 --- /dev/null +++ b/qnetchess/src/mainwindow.h @@ -0,0 +1,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__ */ |