QTfrontend/pages.h
author unc0rr
Wed, 27 Sep 2006 20:52:22 +0000
changeset 175 d226d976d836
parent 133 c79cb5e5b24a
child 183 57c2ef19f719
permissions -rw-r--r--
- Some improvements to volume control - Simplified captions
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
 *
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     5
 * Distributed under the terms of the BSD-modified licence:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     6
 *
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     7
 * Permission is hereby granted, free of charge, to any person obtaining a copy
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     8
 * of this software and associated documentation files (the "Software"), to deal
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
     9
 * with the Software without restriction, including without limitation the
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    10
 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    11
 * sell copies of the Software, and to permit persons to whom the Software is
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    12
 * furnished to do so, subject to the following conditions:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    13
 *
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    14
 * 1. Redistributions of source code must retain the above copyright notice,
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    15
 *    this list of conditions and the following disclaimer.
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    16
 * 2. Redistributions in binary form must reproduce the above copyright notice,
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    17
 *    this list of conditions and the following disclaimer in the documentation
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    18
 *    and/or other materials provided with the distribution.
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    19
 * 3. The name of the author may not be used to endorse or promote products
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    20
 *    derived from this software without specific prior written permission.
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    21
 *
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    22
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    23
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    24
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    25
 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    26
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    27
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    28
 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    29
 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    30
 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    31
 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    32
 */
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    33
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    34
#ifndef PAGES_H
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    35
#define PAGES_H
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    36
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    37
#include <QWidget>
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    38
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    39
#include "binds.h"
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    40
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    41
class GameCFGWidget;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    42
class QPushButton;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    43
class QGroupBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    44
class QComboBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    45
class QLabel;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    46
class QToolBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    47
class QLineEdit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    48
class TeamSelWidget;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    49
class DemosList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    50
class QListWidget;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    51
class QCheckBox;
93
c21ff3af56cf - small fix to translation
unc0rr
parents: 87
diff changeset
    52
class SquareLabel;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    53
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    54
class PageMain : 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
	PageMain(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 *BtnSinglePlayer;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    62
	QPushButton *BtnMultiplayer;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    63
	QPushButton *BtnNet;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    64
	QPushButton *BtnSetup;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    65
	QPushButton *BtnDemos;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    66
	QPushButton *BtnExit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    67
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    68
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    69
class PageLocalGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    70
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    71
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    72
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    73
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    74
	PageLocalGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    75
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    76
	QPushButton *BtnSimpleGame;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    77
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    78
	GameCFGWidget *gameCFG;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    79
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    80
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    81
class PageEditTeam : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    82
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    83
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    84
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    85
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    86
	PageEditTeam(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    87
	QGroupBox *GBoxHedgehogs;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    88
	QGroupBox *GBoxTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    89
	QGroupBox *GBoxFort;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    90
	QComboBox *CBFort;
93
c21ff3af56cf - small fix to translation
unc0rr
parents: 87
diff changeset
    91
	SquareLabel *FortPreview;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    92
	QGroupBox *GBoxGrave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    93
	QComboBox *CBGrave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    94
	QLabel *GravePreview;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    95
	QGroupBox *GBoxBinds;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    96
	QToolBox *BindsBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    97
	QWidget *page_A;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    98
	QWidget *page_W;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    99
	QWidget *page_WP;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   100
	QWidget *page_O;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   101
	QPushButton *BtnTeamDiscard;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   102
	QPushButton *BtnTeamSave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   103
	QLineEdit * TeamNameEdit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   104
	QLineEdit * HHNameEdit[8];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   105
	QComboBox * CBBind[BINDS_NUMBER];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   106
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   107
public slots:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   108
	void CBGrave_activated(const QString & gravename);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   109
	void CBFort_activated(const QString & gravename);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   110
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   111
private:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   112
	QLabel * LBind[BINDS_NUMBER];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   113
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   114
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   115
class PageMultiplayer : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   116
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   117
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   118
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   119
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   120
	PageMultiplayer(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   121
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   122
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   123
	GameCFGWidget *gameCFG;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   124
	TeamSelWidget *teamsSelect;
133
c79cb5e5b24a - Multiplayer game start button
unc0rr
parents: 111
diff changeset
   125
	QPushButton *BtnStartMPGame;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   126
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   127
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   128
class PagePlayDemo : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   129
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   130
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   131
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   132
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   133
	PagePlayDemo(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   134
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   135
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   136
	QPushButton *BtnPlayDemo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   137
	QListWidget *DemosList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   138
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   139
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   140
class PageOptions : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   141
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   142
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   143
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   144
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   145
	PageOptions(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   146
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   147
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   148
	QGroupBox *groupBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   149
	QPushButton *BtnNewTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   150
	QPushButton *BtnEditTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   151
	QComboBox *CBTeamName;
94
c6eec0bdb630 +1 layouted page
unc0rr
parents: 93
diff changeset
   152
	QGroupBox *AGGroupBox;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   153
	QComboBox *CBResolution;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   154
	QCheckBox *CBEnableSound;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   155
	QCheckBox *CBFullscreen;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   156
	QPushButton *BtnSaveOptions;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   157
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   158
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   159
class PageNet : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   160
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   161
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   162
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   163
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   164
	PageNet(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   165
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   166
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   167
	QPushButton *BtnNetConnect;
111
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   168
	QGroupBox *NNGroupBox;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   169
	QLabel *labelNN;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   170
	QLineEdit *editNetNick;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   171
	QLabel *labelIP;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   172
	QLineEdit * editIP;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   173
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   174
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   175
class PageNetChat : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   176
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   177
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   178
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   179
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   180
	PageNetChat(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   181
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   182
	QPushButton *BtnDisconnect;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   183
	QListWidget *ChannelsList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   184
	QPushButton *BtnJoin;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   185
	QPushButton *BtnCreate;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   186
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   187
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   188
class PageNetGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   189
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   190
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   191
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   192
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   193
	PageNetGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   194
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   195
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   196
	QPushButton *BtnAddTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   197
	QPushButton *BtnGo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   198
	QListWidget *listNetTeams;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   199
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   200
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   201
#endif // PAGES_H