QTfrontend/pages.h
author unc0rr
Mon, 01 Jun 2009 20:38:45 +0000
changeset 2142 48ed98cfd119
parent 2098 c977d7f2aa09
child 2155 d897222d3339
permissions -rw-r--r--
Make code suck less
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
     1
/*
1066
1f1b3686a2b0 Update copyright headers a bit
unc0rr
parents: 788
diff changeset
     2
 * Hedgewars, a free turn based strategy game
1395
46fd70de89e2 Add "Join official server" button
unc0rr
parents: 1377
diff changeset
     3
 * Copyright (c) 2006-2008 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>
1840
4747f0232b88 ttsmj2's random teams patch
unc0rr
parents: 1812
diff changeset
    26
#include <QSignalMapper>
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    27
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    28
#include "binds.h"
322
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
    29
#include "mapContainer.h"
1932
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
    30
#include "togglebutton.h"
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    31
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    32
class QPushButton;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    33
class QGroupBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    34
class QComboBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    35
class QLabel;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    36
class QToolBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    37
class QLineEdit;
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    38
class QListWidget;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    39
class QCheckBox;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    40
class QSpinBox;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    41
class QTextEdit;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    42
class QRadioButton;
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    43
class QTableView;
1377
a9e768739345 - Customize QTextBrowser look
unc0rr
parents: 1315
diff changeset
    44
class QTextBrowser;
1399
ada2411c1d60 Show additional info in rooms list
unc0rr
parents: 1395
diff changeset
    45
class QTableWidget;
1409
d1cbe4a57ebf Add button for controlling room options (no usefull yet)
unc0rr
parents: 1399
diff changeset
    46
class QAction;
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
    47
class QDataWidgetMapper;
1887
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
    48
class QAbstractItemModel;
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    49
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
    50
class GameCFGWidget;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    51
class TeamSelWidget;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    52
class DemosList;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    53
class SquareLabel;
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
    54
class About;
297
279e10ec31b4 'Show FPS' and 'FPS limit' options
unc0rr
parents: 231
diff changeset
    55
class FPSEdit;
461
105af110b0e6 chatWidget with layout
displacer
parents: 452
diff changeset
    56
class HWChatWidget;
612
333d095319de abstract class for items container (hedgehogs num, bullets, etc.)
displacer
parents: 600
diff changeset
    57
class SelWeaponWidget;
1192
63b7961f68de Add iconed groupbox class
unc0rr
parents: 1168
diff changeset
    58
class IconedGroupBox;
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
    59
class FreqSpinBox;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
    60
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    61
class AbstractPage : public QWidget
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    62
{
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
    63
	Q_OBJECT
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
    64
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    65
 public:
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    66
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    67
 protected:
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    68
  AbstractPage(QWidget* parent = 0) {
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    69
    font14 = new QFont("MS Shell Dlg", 14);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    70
  }
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    71
  virtual ~AbstractPage() {};
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    72
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    73
  QPushButton* addButton(QString btname, QGridLayout* grid, int wy, int wx, bool iconed = false) {
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    74
    QPushButton* butt = new QPushButton(this);
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    75
    if (!iconed) {
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    76
      butt->setFont(*font14);
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    77
      butt->setText(btname);
1409
d1cbe4a57ebf Add button for controlling room options (no usefull yet)
unc0rr
parents: 1399
diff changeset
    78
      //butt->setStyleSheet("background-color: #0d0544");
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    79
    } else {
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    80
      const QIcon& lp=QIcon(btname);
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    81
      QSize sz = lp.actualSize(QSize(65535, 65535));
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    82
      butt->setIcon(lp);
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    83
      butt->setFixedSize(sz);
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    84
      butt->setIconSize(sz);
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    85
      butt->setFlat(true);
1149
c2d3b4f71836 transparent background for buttons at main page
displacer
parents: 1148
diff changeset
    86
      butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    87
    }
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    88
    grid->addWidget(butt, wy, wx);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    89
    return butt;
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    90
  };
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
    91
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    92
  QPushButton* addButton(QString btname, QGridLayout* grid, int wy, int wx, int rowSpan, int columnSpan, bool iconed = false) {
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
    93
    QPushButton* butt = new QPushButton(this);
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    94
    if (!iconed) {
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    95
      butt->setFont(*font14);
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    96
      butt->setText(btname);
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    97
    } else {
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
    98
      const QIcon& lp=QIcon(btname);
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
    99
      QSize sz = lp.actualSize(QSize(65535, 65535));
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
   100
      butt->setIcon(lp);
1152
c72b939c00df Make buttons border have different colors when mouse is over or it is pressed
unc0rr
parents: 1150
diff changeset
   101
      butt->setFixedSize(sz);
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
   102
      butt->setIconSize(sz);
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
   103
      butt->setFlat(true);
1149
c2d3b4f71836 transparent background for buttons at main page
displacer
parents: 1148
diff changeset
   104
      butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
1148
e44de3416af4 images at main page
displacer
parents: 1129
diff changeset
   105
    }
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   106
    grid->addWidget(butt, wy, wx, rowSpan, columnSpan);
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   107
    return butt;
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   108
  };
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   109
1443
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   110
  QPushButton* addButton(QString btname, QBoxLayout* box, int where, bool iconed = false) {
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   111
    QPushButton* butt = new QPushButton(this);
1443
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   112
    if (!iconed) {
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   113
      butt->setFont(*font14);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   114
      butt->setText(btname);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   115
    } else {
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   116
      const QIcon& lp=QIcon(btname);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   117
      QSize sz = lp.actualSize(QSize(65535, 65535));
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   118
      butt->setIcon(lp);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   119
      butt->setFixedSize(sz);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   120
      butt->setIconSize(sz);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   121
      butt->setFlat(true);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   122
      butt->setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed);
e79e4b48c771 Reorganize single player menu
unc0rr
parents: 1409
diff changeset
   123
    }
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   124
    box->addWidget(butt, where);
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   125
    return butt;
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   126
  };
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   127
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   128
  QFont * font14;
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   129
};
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   130
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   131
class PageMain : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   132
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   133
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   134
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   135
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   136
	PageMain(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   137
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   138
	QPushButton *BtnSinglePlayer;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   139
	QPushButton *BtnNet;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   140
	QPushButton *BtnSetup;
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   141
	QPushButton *BtnInfo;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   142
	QPushButton *BtnExit;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   143
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   144
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   145
class PageEditTeam : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   146
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   147
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   148
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   149
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   150
	PageEditTeam(QWidget* parent = 0);
1840
4747f0232b88 ttsmj2's random teams patch
unc0rr
parents: 1812
diff changeset
   151
	QSignalMapper* signalMapper;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   152
	QGroupBox *GBoxHedgehogs;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   153
	QGroupBox *GBoxTeam;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   154
	QGroupBox *GBoxFort;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   155
	QComboBox *CBFort;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   156
	SquareLabel *FortPreview;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   157
	QComboBox *CBGrave;
336
82d654db133d Team level at new place on team config page
unc0rr
parents: 329
diff changeset
   158
	QComboBox *CBTeamLvl;
1659
fd593a5e71fb Team class now supports voicepacks
unc0rr
parents: 1649
diff changeset
   159
	QComboBox *CBVoicepack;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   160
	QGroupBox *GBoxBinds;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   161
	QToolBox *BindsBox;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   162
	QWidget *page_A;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   163
	QWidget *page_W;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   164
	QWidget *page_WP;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   165
	QWidget *page_O;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   166
	QPushButton *BtnTeamDiscard;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   167
	QPushButton *BtnTeamSave;
1684
b3f4ec08f0a4 A button for checking voicepack (doesn't work yet)
unc0rr
parents: 1659
diff changeset
   168
	QPushButton * BtnTestSound;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   169
	QLineEdit * TeamNameEdit;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   170
	QLineEdit * HHNameEdit[8];
1236
f9110fd03754 Add stubs for hats implementation
unc0rr
parents: 1199
diff changeset
   171
	QComboBox * HHHats[8];
1840
4747f0232b88 ttsmj2's random teams patch
unc0rr
parents: 1812
diff changeset
   172
	QPushButton * randButton[8];
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   173
	QComboBox * CBBind[BINDS_NUMBER];
1840
4747f0232b88 ttsmj2's random teams patch
unc0rr
parents: 1812
diff changeset
   174
	QPushButton * randTeamButton;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   175
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   176
public slots:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   177
	void CBFort_activated(const QString & gravename);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   178
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   179
private:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   180
	QLabel * LBind[BINDS_NUMBER];
1684
b3f4ec08f0a4 A button for checking voicepack (doesn't work yet)
unc0rr
parents: 1659
diff changeset
   181
b3f4ec08f0a4 A button for checking voicepack (doesn't work yet)
unc0rr
parents: 1659
diff changeset
   182
private slots:
b3f4ec08f0a4 A button for checking voicepack (doesn't work yet)
unc0rr
parents: 1659
diff changeset
   183
	void testSound();
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   184
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   185
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   186
class PageMultiplayer : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   187
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   188
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   189
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   190
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   191
	PageMultiplayer(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   192
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   193
	QPushButton *BtnBack;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   194
	GameCFGWidget *gameCFG;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   195
	TeamSelWidget *teamsSelect;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   196
	QPushButton *BtnStartMPGame;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   197
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   198
692
07787e748831 code size reduse
displacer
parents: 686
diff changeset
   199
class PageOptions : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   200
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   201
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   202
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   203
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   204
	PageOptions(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   205
597
ec5f057ab268 kdevelop project add, initial weapons scheme button
displacer
parents: 587
diff changeset
   206
	QPushButton* WeaponsButt;
693
32a546d1eb3e prepare weapons combo
displacer
parents: 692
diff changeset
   207
	QPushButton* WeaponEdit;
32a546d1eb3e prepare weapons combo
displacer
parents: 692
diff changeset
   208
	QComboBox* WeaponsName;
32a546d1eb3e prepare weapons combo
displacer
parents: 692
diff changeset
   209
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   210
	QPushButton *BtnBack;
1194
32e854874df2 Iconize more groupboxes
unc0rr
parents: 1193
diff changeset
   211
	IconedGroupBox *teamsBox;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   212
	QPushButton *BtnNewTeam;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   213
	QPushButton *BtnEditTeam;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   214
	QComboBox *CBTeamName;
1193
2911384169b4 Finish iconed groupbox implementation
unc0rr
parents: 1192
diff changeset
   215
	IconedGroupBox *AGGroupBox;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   216
	QComboBox *CBResolution;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   217
	QCheckBox *CBEnableSound;
1129
b74ffca22762 Add a checkbox in frontend to turn music off
unc0rr
parents: 1066
diff changeset
   218
	QCheckBox *CBEnableMusic;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   219
	QCheckBox *CBFullscreen;
1162
91bf5e3e558d Frontend Fullscreen mode added
displacer
parents: 1153
diff changeset
   220
	QCheckBox *CBFrontendFullscreen;
297
279e10ec31b4 'Show FPS' and 'FPS limit' options
unc0rr
parents: 231
diff changeset
   221
	QCheckBox *CBShowFPS;
529
812682c1ab62 Option for alternative damage tags
unc0rr
parents: 486
diff changeset
   222
	QCheckBox *CBAltDamage;
1487
b4cc59a6d50a Add an option to name records with current date and time
unc0rr
parents: 1443
diff changeset
   223
	QCheckBox *CBNameWithDate;
297
279e10ec31b4 'Show FPS' and 'FPS limit' options
unc0rr
parents: 231
diff changeset
   224
	FPSEdit *fpsedit;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   225
	QPushButton *BtnSaveOptions;
647
798c7dbf8bb8 Move nick edit to PageOptions
unc0rr
parents: 646
diff changeset
   226
	QLabel *labelNN;
1777
88674c291331 Implement initial sound volume option
unc0rr
parents: 1684
diff changeset
   227
	QSpinBox * volumeBox;
647
798c7dbf8bb8 Move nick edit to PageOptions
unc0rr
parents: 646
diff changeset
   228
	QLineEdit *editNetNick;
1812
3d4692e825e7 'Reduce quality' patch by nemo
unc0rr
parents: 1800
diff changeset
   229
	QCheckBox *CBReduceQuality;
2098
c977d7f2aa09 Toggle for stars ("frontend effects") - also turns off optimisations for stars that were causing problems onone machine
nemo
parents: 2031
diff changeset
   230
	QCheckBox *CBFrontendEffects;
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   231
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   232
1153
825931b81ad4 Iconed "Back" button everywhere
unc0rr
parents: 1152
diff changeset
   233
class PageNet : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   234
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   235
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   236
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   237
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   238
	PageNet(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   239
632
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   240
	QPushButton* BtnUpdateSList;
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
   241
	QTableView * tvServersList;
653
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   242
	QPushButton * BtnBack;
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   243
	QPushButton * BtnNetConnect;
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   244
	QPushButton * BtnNetSvrStart;
4f44fc06ca45 Class to ask host/port to connect to ('Specify' button on PageNet)
unc0rr
parents: 647
diff changeset
   245
	QPushButton * BtnSpecifyServer;
632
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   246
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   247
private:
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   248
	QGroupBox * ConnGroupBox;
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   249
	QGridLayout * GBClayout;
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   250
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   251
private slots:
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   252
	void slotConnect();
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   253
632
5e09ae25729f Half implement possibility for different backends of servers list
unc0rr
parents: 612
diff changeset
   254
public slots:
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   255
	void updateServersList();
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   256
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   257
signals:
665
5c7bfc8bac6a Start move from custom widgets to custom models
unc0rr
parents: 657
diff changeset
   258
	void connectClicked(const QString & host, quint16 port);
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   259
};
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   260
1153
825931b81ad4 Iconed "Back" button everywhere
unc0rr
parents: 1152
diff changeset
   261
class PageNetServer : public AbstractPage
646
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   262
{
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   263
	Q_OBJECT
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   264
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   265
public:
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   266
	PageNetServer(QWidget* parent = 0);
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   267
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   268
	QPushButton *BtnBack;
ed610c2cd0a4 Some work on network widgets
unc0rr
parents: 636
diff changeset
   269
	QPushButton *BtnStart;
657
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   270
	QPushButton *BtnDefault;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   271
	QLabel *labelSD;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   272
	QLineEdit *leServerDescr;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   273
	QLabel *labelPort;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   274
	QSpinBox *sbPort;
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   275
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   276
private slots:
b34fc518a48a Basic concept for net server options page (subject to change)
unc0rr
parents: 653
diff changeset
   277
	void setDefaultPort();
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   278
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   279
1153
825931b81ad4 Iconed "Back" button everywhere
unc0rr
parents: 1152
diff changeset
   280
class PageNetGame : public AbstractPage
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   281
{
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   282
	Q_OBJECT
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   283
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   284
public:
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   285
	PageNetGame(QWidget* parent = 0);
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   286
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   287
	QPushButton *BtnBack;
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   288
	QPushButton *BtnGo;
1409
d1cbe4a57ebf Add button for controlling room options (no usefull yet)
unc0rr
parents: 1399
diff changeset
   289
	QPushButton *BtnMaster;
1951
47f38d84ac72 Move game starting action outside menu
unc0rr
parents: 1950
diff changeset
   290
	QPushButton *BtnStart;
1409
d1cbe4a57ebf Add button for controlling room options (no usefull yet)
unc0rr
parents: 1399
diff changeset
   291
	
d1cbe4a57ebf Add button for controlling room options (no usefull yet)
unc0rr
parents: 1399
diff changeset
   292
	QAction * restrictJoins;
d1cbe4a57ebf Add button for controlling room options (no usefull yet)
unc0rr
parents: 1399
diff changeset
   293
	QAction * restrictTeamAdds;
461
105af110b0e6 chatWidget with layout
displacer
parents: 452
diff changeset
   294
105af110b0e6 chatWidget with layout
displacer
parents: 452
diff changeset
   295
	HWChatWidget* pChatWidget;
322
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
   296
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
   297
	TeamSelWidget* pNetTeamsWidget;
e7175ae57945 first new widgets added to net game
displacer
parents: 314
diff changeset
   298
	GameCFGWidget* pGameCFG;
1648
32d99a3c7998 Draw ready status icon on ready button
unc0rr
parents: 1621
diff changeset
   299
32d99a3c7998 Draw ready status icon on ready button
unc0rr
parents: 1621
diff changeset
   300
public slots:
32d99a3c7998 Draw ready status icon on ready button
unc0rr
parents: 1621
diff changeset
   301
	void setReadyStatus(bool isReady);
1649
938a0fda0206 Some button reorganization on net game page
unc0rr
parents: 1648
diff changeset
   302
	void setMasterMode(bool isMaster);
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   303
};
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   304
1153
825931b81ad4 Iconed "Back" button everywhere
unc0rr
parents: 1152
diff changeset
   305
class PageInfo : public AbstractPage
187
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   306
{
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   307
	Q_OBJECT
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   308
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   309
public:
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   310
	PageInfo(QWidget* parent = 0);
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   311
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   312
	QPushButton *BtnBack;
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   313
	About *about;
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   314
};
96c3154efee5 "About" page, not yet filled with content
unc0rr
parents: 184
diff changeset
   315
1150
ae86e36dad2e - Make look better
unc0rr
parents: 1149
diff changeset
   316
class PageSinglePlayer : public AbstractPage
586
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   317
{
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   318
	Q_OBJECT
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   319
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   320
public:
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   321
	PageSinglePlayer(QWidget* parent = 0);
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   322
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   323
	QPushButton *BtnSimpleGamePage;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   324
	QPushButton *BtnTrainPage;
1150
ae86e36dad2e - Make look better
unc0rr
parents: 1149
diff changeset
   325
	QPushButton *BtnMultiplayer;
ae86e36dad2e - Make look better
unc0rr
parents: 1149
diff changeset
   326
	QPushButton *BtnLoad;
ae86e36dad2e - Make look better
unc0rr
parents: 1149
diff changeset
   327
	QPushButton *BtnDemos;
586
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   328
	QPushButton *BtnBack;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   329
	GameCFGWidget *gameCFG;
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   330
};
ecb6347dfeca Prepare to new page 'Training'
unc0rr
parents: 585
diff changeset
   331
1153
825931b81ad4 Iconed "Back" button everywhere
unc0rr
parents: 1152
diff changeset
   332
class PageTraining : public AbstractPage
587
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   333
{
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   334
	Q_OBJECT
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   335
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   336
public:
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   337
	PageTraining(QWidget* parent = 0);
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   338
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   339
	QPushButton *BtnStartTrain;
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   340
	QPushButton *BtnBack;
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   341
};
74db4115064a More work on Training mode
unc0rr
parents: 586
diff changeset
   342
684
257444d8429f some copy/paste code removed
displacer
parents: 683
diff changeset
   343
class PageSelectWeapon : public AbstractPage
600
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   344
{
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   345
	Q_OBJECT
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   346
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   347
public:
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   348
	PageSelectWeapon(QWidget* parent = 0);
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   349
683
57d624f71e65 select default and save weapons added
displacer
parents: 665
diff changeset
   350
	QPushButton *BtnSave;
57d624f71e65 select default and save weapons added
displacer
parents: 665
diff changeset
   351
	QPushButton *BtnDefault;
718
f93a38d2c982 delete weapon button added
displacer
parents: 693
diff changeset
   352
	QPushButton *BtnDelete;
600
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   353
	QPushButton *BtnBack;
1312
0078e4f72d40 Create a page for rooms list
unc0rr
parents: 1311
diff changeset
   354
	SelWeaponWidget* pWeapons;
600
f6e5f4e122db Select weapon scheme page
unc0rr
parents: 597
diff changeset
   355
};
306
7b61834edcf6 - Better blowtorch
unc0rr
parents: 297
diff changeset
   356
686
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   357
class PageInGame : public AbstractPage
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   358
{
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   359
	Q_OBJECT
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   360
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   361
public:
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   362
	PageInGame(QWidget* parent = 0);
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   363
};
494b5880989a - Header cleanup in game.cpp
unc0rr
parents: 684
diff changeset
   364
1311
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   365
class PageRoomsList : public AbstractPage
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   366
{
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   367
	Q_OBJECT
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   368
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   369
public:
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   370
	PageRoomsList(QWidget* parent = 0);
1312
0078e4f72d40 Create a page for rooms list
unc0rr
parents: 1311
diff changeset
   371
1314
e56b178d6d62 Implement room create and join
unc0rr
parents: 1313
diff changeset
   372
	QLineEdit * roomName;
1399
ada2411c1d60 Show additional info in rooms list
unc0rr
parents: 1395
diff changeset
   373
	QTableWidget * roomsList;
1312
0078e4f72d40 Create a page for rooms list
unc0rr
parents: 1311
diff changeset
   374
	QPushButton * BtnBack;
0078e4f72d40 Create a page for rooms list
unc0rr
parents: 1311
diff changeset
   375
	QPushButton * BtnCreate;
0078e4f72d40 Create a page for rooms list
unc0rr
parents: 1311
diff changeset
   376
	QPushButton * BtnJoin;
0078e4f72d40 Create a page for rooms list
unc0rr
parents: 1311
diff changeset
   377
	QPushButton * BtnRefresh;
1856
e71dbf958c87 Enable admin button when have privilege. Button does nothing yet.
unc0rr
parents: 1840
diff changeset
   378
	QPushButton * BtnAdmin;
1522
6794cf8f1e6f Add chat widget to lobby page (not usable yet)
unc0rr
parents: 1487
diff changeset
   379
	HWChatWidget * chatWidget;
1313
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   380
	
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   381
public slots:
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   382
	void setRoomsList(const QStringList & list);
1856
e71dbf958c87 Enable admin button when have privilege. Button does nothing yet.
unc0rr
parents: 1840
diff changeset
   383
	void setAdmin(bool);
1314
e56b178d6d62 Implement room create and join
unc0rr
parents: 1313
diff changeset
   384
e56b178d6d62 Implement room create and join
unc0rr
parents: 1313
diff changeset
   385
private slots:
e56b178d6d62 Implement room create and join
unc0rr
parents: 1313
diff changeset
   386
	void onCreateClick();
e56b178d6d62 Implement room create and join
unc0rr
parents: 1313
diff changeset
   387
	void onJoinClick();
1315
c2f09811bb8c Implement rooms list refresh
unc0rr
parents: 1314
diff changeset
   388
	void onRefreshClick();
1313
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   389
	
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   390
signals:
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   391
	void askForCreateRoom(const QString &);
f4c54e9e1b8c - Introduce a bit of state miachine in client code (should be more robust and verbosive now)
unc0rr
parents: 1312
diff changeset
   392
	void askForJoinRoom(const QString &);
1315
c2f09811bb8c Implement rooms list refresh
unc0rr
parents: 1314
diff changeset
   393
	void askForRoomList();
1311
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   394
};
49beb1221c0b - Add stub page for rooms list
unc0rr
parents: 1310
diff changeset
   395
1800
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   396
class PageConnecting : public AbstractPage
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   397
{
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   398
	Q_OBJECT
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   399
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   400
public:
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   401
	PageConnecting(QWidget* parent = 0);
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   402
};
f1df2eb32a16 "connecting" page
unc0rr
parents: 1777
diff changeset
   403
1884
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   404
class PageScheme : public AbstractPage
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   405
{
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   406
	Q_OBJECT
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   407
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   408
public:
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   409
	PageScheme(QWidget* parent = 0);
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   410
1887
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
   411
	QPushButton * BtnBack;
1889
b8590b604fdd Editing schemes, creating new one works now
unc0rr
parents: 1887
diff changeset
   412
	QPushButton * BtnNew;
1902
aeadb10c2d77 Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents: 1895
diff changeset
   413
	QPushButton * BtnDelete;
1887
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
   414
	QPushButton * BtnSave;
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
   415
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
   416
	void setModel(QAbstractItemModel * model);
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   417
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   418
private:
1887
d68939b3f7f0 - Share model between test table and widgets
unc0rr
parents: 1885
diff changeset
   419
	QDataWidgetMapper * mapper;
1932
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   420
	ToggleButtonWidget * TBW_mode_Forts;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   421
	ToggleButtonWidget * TBW_teamsDivide;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   422
	ToggleButtonWidget * TBW_solid;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   423
	ToggleButtonWidget * TBW_border;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   424
	ToggleButtonWidget * TBW_lowGravity;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   425
	ToggleButtonWidget * TBW_laserSight;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   426
	ToggleButtonWidget * TBW_invulnerable;
f586d75c8b6a New schemes page look by TheXception
unc0rr
parents: 1924
diff changeset
   427
	ToggleButtonWidget * TBW_mines;
2017
7845c77c8d31 nemo's great patch:
unc0rr
parents: 1984
diff changeset
   428
	ToggleButtonWidget * TBW_vampiric;
7845c77c8d31 nemo's great patch:
unc0rr
parents: 1984
diff changeset
   429
	ToggleButtonWidget * TBW_karma;
2023
41d3afaa20c7 Artillery mode, sniper rifle, speech bubble tweaks, fix of rope bug introduced by enabling hats in jump
nemo
parents: 2017
diff changeset
   430
	ToggleButtonWidget * TBW_artillery;
1895
7ba647a88b2f More game options by nemo
unc0rr
parents: 1889
diff changeset
   431
7ba647a88b2f More game options by nemo
unc0rr
parents: 1889
diff changeset
   432
	QSpinBox * SB_DamageModifier;
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   433
	QSpinBox * SB_TurnTime;
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   434
	QSpinBox * SB_InitHealth;
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   435
	QSpinBox * SB_SuddenDeath;
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   436
	FreqSpinBox * SB_CaseProb;
2031
b6f3e56fb100 david_ac's game scheme options for mine delay/quantity, tweaks to sniper rifle
nemo
parents: 2023
diff changeset
   437
	QSpinBox * SB_MinesTime;
b6f3e56fb100 david_ac's game scheme options for mine delay/quantity, tweaks to sniper rifle
nemo
parents: 2023
diff changeset
   438
	QSpinBox * SB_Mines;
1885
75489216b5b0 Continue work on new schemes
unc0rr
parents: 1884
diff changeset
   439
	QLineEdit * LE_name;
1902
aeadb10c2d77 Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents: 1895
diff changeset
   440
	QComboBox * selectScheme;
1889
b8590b604fdd Editing schemes, creating new one works now
unc0rr
parents: 1887
diff changeset
   441
1984
955b049eb099 Disable feel of editing for built-in schemes
unc0rr
parents: 1951
diff changeset
   442
	QGroupBox * gbGameModes;
955b049eb099 Disable feel of editing for built-in schemes
unc0rr
parents: 1951
diff changeset
   443
	QGroupBox * gbBasicSettings;
955b049eb099 Disable feel of editing for built-in schemes
unc0rr
parents: 1951
diff changeset
   444
1889
b8590b604fdd Editing schemes, creating new one works now
unc0rr
parents: 1887
diff changeset
   445
private slots:
b8590b604fdd Editing schemes, creating new one works now
unc0rr
parents: 1887
diff changeset
   446
	void newRow();
1902
aeadb10c2d77 Add delete button and scheme selection combobox to scheme edit page
unc0rr
parents: 1895
diff changeset
   447
	void deleteRow();
1984
955b049eb099 Disable feel of editing for built-in schemes
unc0rr
parents: 1951
diff changeset
   448
	void schemeSelected(int);
1884
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   449
};
40e59e9f82ce Continue work on new schemes implementation
unc0rr
parents: 1856
diff changeset
   450
1905
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   451
class PageAdmin : public AbstractPage
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   452
{
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   453
	Q_OBJECT
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   454
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   455
public:
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   456
	PageAdmin(QWidget* parent = 0);
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   457
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   458
	QPushButton * BtnBack;
1924
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   459
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   460
private:
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   461
	QLineEdit * leServerMessage;
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   462
	QPushButton * pbSetSM;
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   463
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   464
private slots:
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   465
	void smChanged();
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   466
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   467
public slots:
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   468
	void serverMessage(const QString & str);
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   469
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   470
signals:
8f8fe856ce9d Prepare to add ability for admin to set MOTD
unc0rr
parents: 1905
diff changeset
   471
	void setServerMessage(const QString & str);
1905
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   472
};
b1ec8db513f2 - Use QCryptographicHash for md5
unc0rr
parents: 1902
diff changeset
   473
1950
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   474
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   475
class PageNetType : public AbstractPage
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   476
{
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   477
	Q_OBJECT
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   478
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   479
public:
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   480
	PageNetType(QWidget* parent = 0);
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   481
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   482
	QPushButton * BtnBack;
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   483
	QPushButton * BtnLAN;
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   484
	QPushButton * BtnOfficialServer;
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   485
};
09ad18a1be11 Implement two buttons
unc0rr
parents: 1932
diff changeset
   486
184
f97a7a3dc8f6 - Update more headers
unc0rr
parents: 183
diff changeset
   487
#endif // PAGES_H