You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
88 lines
1.6 KiB
88 lines
1.6 KiB
/*
|
|
* $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__ */
|