QTfrontend/pages.h
author unc0rr
Thu, 05 Oct 2006 16:33:18 +0000
changeset 183 57c2ef19f719
parent 133 c79cb5e5b24a
child 184 f97a7a3dc8f6
permissions -rw-r--r--
Relicense to GPL
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     1
/*
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     2
 * Hedgewars, a worms-like game
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     3
 * Copyright (c) 2006 Andrey Korotaev <unC0Rr@gmail.com>
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     4
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     8
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    12
 * GNU General Public License for more details.
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    13
 *
183
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    14
 * You should have received a copy of the GNU General Public License
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    15
 * along with this program; if not, write to the Free Software
57c2ef19f719 Relicense to GPL
unc0rr
parents: 133
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    17
 */
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    18
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    19
#ifndef PAGES_H
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    20
#define PAGES_H
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    21
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    22
#include <QWidget>
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    23
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    24
#include "binds.h"
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    25
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    26
class GameCFGWidget;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    27
class QPushButton;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    28
class QGroupBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    29
class QComboBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    30
class QLabel;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    31
class QToolBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    32
class QLineEdit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    33
class TeamSelWidget;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    34
class DemosList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    35
class QListWidget;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    36
class QCheckBox;
93
c21ff3af56cf - small fix to translation
unc0rr
parents: 87
diff changeset
    37
class SquareLabel;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    38
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    39
class PageMain : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    40
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    41
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    42
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    43
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    44
	PageMain(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    45
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    46
	QPushButton *BtnSinglePlayer;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    47
	QPushButton *BtnMultiplayer;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    48
	QPushButton *BtnNet;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    49
	QPushButton *BtnSetup;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    50
	QPushButton *BtnDemos;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    51
	QPushButton *BtnExit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    52
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    53
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    54
class PageLocalGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    55
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    56
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    57
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    58
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    59
	PageLocalGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    60
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    61
	QPushButton *BtnSimpleGame;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    62
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    63
	GameCFGWidget *gameCFG;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    64
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    65
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    66
class PageEditTeam : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    67
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    68
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    69
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    70
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    71
	PageEditTeam(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    72
	QGroupBox *GBoxHedgehogs;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    73
	QGroupBox *GBoxTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    74
	QGroupBox *GBoxFort;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    75
	QComboBox *CBFort;
93
c21ff3af56cf - small fix to translation
unc0rr
parents: 87
diff changeset
    76
	SquareLabel *FortPreview;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    77
	QGroupBox *GBoxGrave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    78
	QComboBox *CBGrave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    79
	QLabel *GravePreview;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    80
	QGroupBox *GBoxBinds;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    81
	QToolBox *BindsBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    82
	QWidget *page_A;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    83
	QWidget *page_W;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    84
	QWidget *page_WP;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    85
	QWidget *page_O;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    86
	QPushButton *BtnTeamDiscard;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    87
	QPushButton *BtnTeamSave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    88
	QLineEdit * TeamNameEdit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    89
	QLineEdit * HHNameEdit[8];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    90
	QComboBox * CBBind[BINDS_NUMBER];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    91
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    92
public slots:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    93
	void CBGrave_activated(const QString & gravename);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    94
	void CBFort_activated(const QString & gravename);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    95
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    96
private:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    97
	QLabel * LBind[BINDS_NUMBER];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    98
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    99
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   100
class PageMultiplayer : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   101
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   102
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   103
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   104
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   105
	PageMultiplayer(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   106
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   107
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   108
	GameCFGWidget *gameCFG;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   109
	TeamSelWidget *teamsSelect;
133
c79cb5e5b24a - Multiplayer game start button
unc0rr
parents: 111
diff changeset
   110
	QPushButton *BtnStartMPGame;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   111
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   112
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   113
class PagePlayDemo : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   114
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   115
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   116
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   117
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   118
	PagePlayDemo(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   119
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   120
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   121
	QPushButton *BtnPlayDemo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   122
	QListWidget *DemosList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   123
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   124
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   125
class PageOptions : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   126
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   127
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   128
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   129
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   130
	PageOptions(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   131
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   132
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   133
	QGroupBox *groupBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   134
	QPushButton *BtnNewTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   135
	QPushButton *BtnEditTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   136
	QComboBox *CBTeamName;
94
c6eec0bdb630 +1 layouted page
unc0rr
parents: 93
diff changeset
   137
	QGroupBox *AGGroupBox;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   138
	QComboBox *CBResolution;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   139
	QCheckBox *CBEnableSound;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   140
	QCheckBox *CBFullscreen;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   141
	QPushButton *BtnSaveOptions;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   142
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   143
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   144
class PageNet : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   145
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   146
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   147
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   148
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   149
	PageNet(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   150
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   151
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   152
	QPushButton *BtnNetConnect;
111
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   153
	QGroupBox *NNGroupBox;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   154
	QLabel *labelNN;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   155
	QLineEdit *editNetNick;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   156
	QLabel *labelIP;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   157
	QLineEdit * editIP;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   158
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   159
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   160
class PageNetChat : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   161
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   162
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   163
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   164
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   165
	PageNetChat(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   166
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   167
	QPushButton *BtnDisconnect;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   168
	QListWidget *ChannelsList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   169
	QPushButton *BtnJoin;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   170
	QPushButton *BtnCreate;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   171
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   172
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   173
class PageNetGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   174
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   175
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   176
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   177
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   178
	PageNetGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   179
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   180
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   181
	QPushButton *BtnAddTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   182
	QPushButton *BtnGo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   183
	QListWidget *listNetTeams;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   184
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   185
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   186
#endif // PAGES_H