QTfrontend/pages.h
author unc0rr
Wed, 26 Jul 2006 12:25:48 +0000
changeset 87 ff213e443336
child 93 c21ff3af56cf
permissions -rw-r--r--
Convert all pages to classes
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;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    52
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    53
class PageMain : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    54
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    55
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    56
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    57
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    58
	PageMain(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    59
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    60
	QPushButton *BtnSinglePlayer;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    61
	QPushButton *BtnMultiplayer;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    62
	QPushButton *BtnNet;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    63
	QPushButton *BtnSetup;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    64
	QPushButton *BtnDemos;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    65
	QPushButton *BtnExit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    66
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    67
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    68
class PageLocalGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    69
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    70
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    71
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    72
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    73
	PageLocalGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    74
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    75
	QPushButton *BtnSimpleGame;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    76
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    77
	GameCFGWidget *gameCFG;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    78
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    79
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    80
class PageEditTeam : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    81
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    82
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    83
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    84
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    85
	PageEditTeam(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    86
	QGroupBox *GBoxHedgehogs;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    87
	QGroupBox *GBoxTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    88
	QGroupBox *GBoxFort;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    89
	QComboBox *CBFort;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    90
	QLabel *FortPreview;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    91
	QGroupBox *GBoxGrave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    92
	QComboBox *CBGrave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    93
	QLabel *GravePreview;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    94
	QGroupBox *GBoxBinds;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    95
	QToolBox *BindsBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    96
	QWidget *page_A;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    97
	QWidget *page_W;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    98
	QWidget *page_WP;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
    99
	QWidget *page_O;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   100
	QPushButton *BtnTeamDiscard;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   101
	QPushButton *BtnTeamSave;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   102
	QLineEdit * TeamNameEdit;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   103
	QLineEdit * HHNameEdit[8];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   104
	QComboBox * CBBind[BINDS_NUMBER];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   105
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   106
public slots:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   107
	void CBGrave_activated(const QString & gravename);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   108
	void CBFort_activated(const QString & gravename);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   109
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   110
private:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   111
	QLabel * LBind[BINDS_NUMBER];
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   112
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   113
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   114
class PageMultiplayer : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   115
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   116
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   117
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   118
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   119
	PageMultiplayer(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   120
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   121
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   122
	GameCFGWidget *gameCFG;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   123
	TeamSelWidget *teamsSelect;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   124
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   125
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   126
class PagePlayDemo : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   127
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   128
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   129
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   130
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   131
	PagePlayDemo(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   132
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   133
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   134
	QPushButton *BtnPlayDemo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   135
	QListWidget *DemosList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   136
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   137
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   138
class PageOptions : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   139
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   140
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   141
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   142
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   143
	PageOptions(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   144
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   145
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   146
	QGroupBox *groupBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   147
	QPushButton *BtnNewTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   148
	QPushButton *BtnEditTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   149
	QComboBox *CBTeamName;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   150
	QComboBox *CBResolution;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   151
	QCheckBox *CBEnableSound;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   152
	QCheckBox *CBFullscreen;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   153
	QLabel *label;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   154
	QLineEdit *editNetNick;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   155
	QPushButton *BtnSaveOptions;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   156
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   157
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   158
class PageNet : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   159
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   160
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   161
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   162
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   163
	PageNet(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   164
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   165
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   166
	QPushButton *BtnNetConnect;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   167
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   168
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   169
class PageNetChat : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   170
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   171
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   172
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   173
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   174
	PageNetChat(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   175
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   176
	QPushButton *BtnDisconnect;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   177
	QListWidget *ChannelsList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   178
	QPushButton *BtnJoin;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   179
	QPushButton *BtnCreate;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   180
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   181
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   182
class PageNetGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   183
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   184
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   185
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   186
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   187
	PageNetGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   188
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   189
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   190
	QPushButton *BtnAddTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   191
	QPushButton *BtnGo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   192
	QListWidget *listNetTeams;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   193
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   194
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   195
#endif // PAGES_H