QTfrontend/pages.h
author unc0rr
Thu, 17 Jan 2008 11:23:37 +0000
changeset 707 0a00c16022ca
parent 693 32a546d1eb3e
child 718 f93a38d2c982
permissions -rw-r--r--
Try to fix SDL problem
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     1
/*
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     2
 * Hedgewars, a worms-like game
486
7ea71cd3acd5 - Change proto version to 4
unc0rr
parents: 471
diff changeset
     3
 * Copyright (c) 2006, 2007 Andrey Korotaev <unC0Rr@gmail.com>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     4
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     5
 * This program is free software; you can redistribute it and/or modify
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     6
 * it under the terms of the GNU General Public License as published by
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     7
 * the Free Software Foundation; version 2 of the License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     8
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     9
 * This program is distributed in the hope that it will be useful,
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    12
 * GNU General Public License for more details.
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    13
 *
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    14
 * You should have received a copy of the GNU General Public License
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    15
 * along with this program; if not, write to the Free Software
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    16
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    17
 */
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    18
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    19
#ifndef PAGES_H
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    20
#define PAGES_H
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    21
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    22
#include <QWidget>
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    23
#include <QPushButton>
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    24
#include <QFont>
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    25
#include <QGridLayout>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    26
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    27
#include "binds.h"
322
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
    28
#include "mapContainer.h"
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    29
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    30
class QPushButton;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    31
class QGroupBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    32
class QComboBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    33
class QLabel;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    34
class QToolBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    35
class QLineEdit;
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    36
class QListWidget;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    37
class QCheckBox;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    38
class QSpinBox;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    39
class QTextEdit;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    40
class QRadioButton;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    41
class QTableView;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    42
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    43
class GameCFGWidget;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    44
class TeamSelWidget;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    45
class DemosList;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    46
class SquareLabel;
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
    47
class About;
297
279e10ec31b4 'Show FPS' and 'FPS limit' options
unc0rr
parents: 231
diff changeset
    48
class FPSEdit;
461
105af110b0e6 chatWidget with layout
displacer
parents: 452
diff changeset
    49
class HWChatWidget;
612
333d095319de abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents: 600
diff changeset
    50
class SelWeaponWidget;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    51
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    52
class AbstractPage : public QWidget
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    53
{
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    54
 public:
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    55
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    56
 protected:
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    57
  AbstractPage(QWidget* parent = 0) {
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    58
    font14 = new QFont("MS Shell Dlg", 14);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    59
  }
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    60
  virtual ~AbstractPage() {};
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    61
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    62
  QPushButton* addButton(const char* btname, QGridLayout* grid, int wy, int wx) {
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    63
    QPushButton* butt = new QPushButton(this);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    64
    butt->setFont(*font14);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    65
    butt->setText(QPushButton::tr(btname));
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    66
    grid->addWidget(butt, wy, wx);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    67
    return butt;
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    68
  };
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    69
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    70
  QPushButton* addButton(const char* btname, QGridLayout* grid, int wy, int wx, int rowSpan, int columnSpan) {
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    71
    QPushButton* butt = new QPushButton(this);
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    72
    butt->setFont(*font14);
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    73
    butt->setText(QPushButton::tr(btname));
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    74
    grid->addWidget(butt, wy, wx, rowSpan, columnSpan);
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    75
    return butt;
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    76
  };
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    77
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    78
  QPushButton* addButton(const char* btname, QBoxLayout* box, int where) {
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    79
    QPushButton* butt = new QPushButton(this);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    80
    butt->setFont(*font14);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    81
    butt->setText(QPushButton::tr(btname));
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    82
    box->addWidget(butt, where);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    83
    return butt;
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    84
  };
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    85
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    86
  QFont * font14;
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    87
};
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    88
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    89
class PageMain : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    90
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    91
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    92
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    93
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    94
	PageMain(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    95
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    96
	QPushButton *BtnSinglePlayer;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    97
	QPushButton *BtnMultiplayer;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    98
	QPushButton *BtnNet;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    99
	QPushButton *BtnSetup;
579
94db15de0392 - Some changes to make build process clear
unc0rr
parents: 529
diff changeset
   100
	QPushButton *BtnLoad;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   101
	QPushButton *BtnDemos;
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   102
	QPushButton *BtnInfo;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   103
	QPushButton *BtnExit;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   104
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   105
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   106
class PageSimpleGame : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   107
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   108
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   109
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   110
public:
585
7531ae5b146e Rename PageLocalGame -> PageSimpleGame due to future changes
unc0rr
parents: 579
diff changeset
   111
	PageSimpleGame(QWidget* parent = 0);
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   112
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   113
	QPushButton *BtnSimpleGame;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   114
	QPushButton *BtnBack;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   115
	GameCFGWidget *gameCFG;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   116
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   117
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   118
class PageEditTeam : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   119
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   120
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   121
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   122
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   123
	PageEditTeam(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   124
	QGroupBox *GBoxHedgehogs;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   125
	QGroupBox *GBoxTeam;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   126
	QGroupBox *GBoxFort;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   127
	QComboBox *CBFort;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   128
	SquareLabel *FortPreview;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   129
	QGroupBox *GBoxGrave;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   130
	QComboBox *CBGrave;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   131
	QLabel *GravePreview;
336
82d654db133d Team level at new place on team config page
unc0rr
parents: 329
diff changeset
   132
	QGroupBox *GBoxTeamLvl;
82d654db133d Team level at new place on team config page
unc0rr
parents: 329
diff changeset
   133
	QComboBox *CBTeamLvl;
82d654db133d Team level at new place on team config page
unc0rr
parents: 329
diff changeset
   134
	QLabel *LevelPict;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   135
	QGroupBox *GBoxBinds;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   136
	QToolBox *BindsBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   137
	QWidget *page_A;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   138
	QWidget *page_W;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   139
	QWidget *page_WP;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   140
	QWidget *page_O;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   141
	QPushButton *BtnTeamDiscard;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   142
	QPushButton *BtnTeamSave;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   143
	QLineEdit * TeamNameEdit;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   144
	QLineEdit * HHNameEdit[8];
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   145
	QComboBox * CBBind[BINDS_NUMBER];
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   146
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   147
public slots:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   148
	void CBGrave_activated(const QString & gravename);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   149
	void CBFort_activated(const QString & gravename);
336
82d654db133d Team level at new place on team config page
unc0rr
parents: 329
diff changeset
   150
	void CBTeamLvl_activated(int id);
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   151
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   152
private:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   153
	QLabel * LBind[BINDS_NUMBER];
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   154
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   155
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   156
class PageMultiplayer : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   157
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   158
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   159
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   160
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   161
	PageMultiplayer(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   162
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   163
	QPushButton *BtnBack;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   164
	GameCFGWidget *gameCFG;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   165
	TeamSelWidget *teamsSelect;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   166
	QPushButton *BtnStartMPGame;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   167
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   168
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   169
class PageOptions : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   170
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   171
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   172
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   173
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   174
	PageOptions(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   175
597
ec5f057ab268 kdevelop project add, initial weapons scheme button
displacer
parents: 587
diff changeset
   176
	QPushButton* WeaponsButt;
693
32a546d1eb3e prepare weapons combo
displacer
parents: 692
diff changeset
   177
	QPushButton* WeaponEdit;
32a546d1eb3e prepare weapons combo
displacer
parents: 692
diff changeset
   178
	QComboBox* WeaponsName;
32a546d1eb3e prepare weapons combo
displacer
parents: 692
diff changeset
   179
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   180
	QPushButton *BtnBack;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   181
	QGroupBox *groupBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   182
	QPushButton *BtnNewTeam;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   183
	QPushButton *BtnEditTeam;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   184
	QComboBox *CBTeamName;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   185
	QGroupBox *AGGroupBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   186
	QComboBox *CBResolution;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   187
	QCheckBox *CBEnableSound;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   188
	QCheckBox *CBFullscreen;
297
279e10ec31b4 'Show FPS' and 'FPS limit' options
unc0rr
parents: 231
diff changeset
   189
	QCheckBox *CBShowFPS;
529
812682c1ab62 Option for alternative damage tags
unc0rr
parents: 486
diff changeset
   190
	QCheckBox *CBAltDamage;
297
279e10ec31b4 'Show FPS' and 'FPS limit' options
unc0rr
parents: 231
diff changeset
   191
	FPSEdit *fpsedit;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   192
	QPushButton *BtnSaveOptions;
647
798c7dbf8bb8 Move nick edit to PageOptions
unc0rr
parents: 646
diff changeset
   193
	QGroupBox *NNGroupBox;
798c7dbf8bb8 Move nick edit to PageOptions
unc0rr
parents: 646
diff changeset
   194
	QLabel *labelNN;
798c7dbf8bb8 Move nick edit to PageOptions
unc0rr
parents: 646
diff changeset
   195
	QLineEdit *editNetNick;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   196
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   197
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   198
class PageNet : public QWidget
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   199
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   200
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   201
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   202
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   203
	PageNet(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   204
632
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   205
	QPushButton* BtnUpdateSList;
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
   206
	QTableView * tvServersList;
653
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   207
	QPushButton * BtnBack;
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   208
	QPushButton * BtnNetConnect;
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   209
	QPushButton * BtnNetSvrStart;
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   210
	QPushButton * BtnSpecifyServer;
636
dc93ac775bb9 - Switch between local and internet game
unc0rr
parents: 632
diff changeset
   211
	QRadioButton * rbLocalGame;
dc93ac775bb9 - Switch between local and internet game
unc0rr
parents: 632
diff changeset
   212
	QRadioButton * rbInternetGame;
632
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   213
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   214
private:
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   215
	QGroupBox * ConnGroupBox;
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   216
	QGridLayout * GBClayout;
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   217
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   218
private slots:
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   219
	void slotConnect();
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   220
632
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   221
public slots:
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   222
	void updateServersList();
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   223
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   224
signals:
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
   225
	void connectClicked(const QString & host, quint16 port);
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   226
};
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   227
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   228
class PageNetServer : public QWidget
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   229
{
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   230
	Q_OBJECT
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   231
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   232
public:
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   233
	PageNetServer(QWidget* parent = 0);
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   234
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   235
	QPushButton *BtnBack;
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   236
	QPushButton *BtnStart;
657
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   237
	QPushButton *BtnDefault;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   238
	QLabel *labelSD;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   239
	QLineEdit *leServerDescr;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   240
	QLabel *labelPort;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   241
	QSpinBox *sbPort;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   242
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   243
private slots:
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   244
	void setDefaultPort();
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   245
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   246
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   247
class PageNetGame : public QWidget
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   248
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   249
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   250
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   251
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   252
	PageNetGame(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   253
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   254
	QPushButton *BtnBack;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   255
	QPushButton *BtnGo;
461
105af110b0e6 chatWidget with layout
displacer
parents: 452
diff changeset
   256
105af110b0e6 chatWidget with layout
displacer
parents: 452
diff changeset
   257
	HWChatWidget* pChatWidget;
322
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
   258
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
   259
	TeamSelWidget* pNetTeamsWidget;
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
   260
	GameCFGWidget* pGameCFG;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   261
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   262
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   263
class PageInfo : public QWidget
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   264
{
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   265
	Q_OBJECT
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   266
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   267
public:
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   268
	PageInfo(QWidget* parent = 0);
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   269
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   270
	QPushButton *BtnBack;
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   271
	About *about;
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   272
};
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   273
306
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   274
class PageGameStats : public QWidget
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   275
{
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   276
	Q_OBJECT
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   277
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   278
public:
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   279
	PageGameStats(QWidget* parent = 0);
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   280
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   281
	QPushButton *BtnBack;
307
96b428ac11f2 More statistics
unc0rr
parents: 306
diff changeset
   282
	QLabel *labelGameStats;
306
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   283
};
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   284
586
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   285
class PageSinglePlayer : public QWidget
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   286
{
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   287
	Q_OBJECT
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   288
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   289
public:
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   290
	PageSinglePlayer(QWidget* parent = 0);
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   291
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   292
	QPushButton *BtnSimpleGamePage;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   293
	QPushButton *BtnTrainPage;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   294
	QPushButton *BtnBack;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   295
	GameCFGWidget *gameCFG;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   296
};
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   297
587
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   298
class PageTraining : public QWidget
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   299
{
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   300
	Q_OBJECT
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   301
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   302
public:
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   303
	PageTraining(QWidget* parent = 0);
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   304
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   305
	QPushButton *BtnStartTrain;
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   306
	QPushButton *BtnBack;
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   307
};
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   308
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   309
class PageSelectWeapon : public AbstractPage
600
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   310
{
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   311
	Q_OBJECT
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   312
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   313
public:
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   314
	PageSelectWeapon(QWidget* parent = 0);
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   315
683
57d624f71e65 select default and save weapons added
displacer
parents: 665
diff changeset
   316
	QPushButton *BtnSave;
57d624f71e65 select default and save weapons added
displacer
parents: 665
diff changeset
   317
	QPushButton *BtnDefault;
600
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   318
	QPushButton *BtnBack;
612
333d095319de abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents: 600
diff changeset
   319
        SelWeaponWidget* pWeapons;
600
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   320
};
306
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   321
686
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   322
class PageInGame : public AbstractPage
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   323
{
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   324
	Q_OBJECT
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   325
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   326
public:
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   327
	PageInGame(QWidget* parent = 0);
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   328
};
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   329
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   330
#endif // PAGES_H