QTfrontend/pages.h
author unc0rr
Wed, 16 Aug 2006 11:41:00 +0000
changeset 111 30ca06092a64
parent 94 c6eec0bdb630
child 133 c79cb5e5b24a
permissions -rw-r--r--
- 'net nickname' and 'server address' options are on PageNet - Don't set bots process thread pointer to nil
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;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   125
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   126
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   127
class PagePlayDemo : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   128
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   129
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   130
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   131
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   132
	PagePlayDemo(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   133
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   134
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   135
	QPushButton *BtnPlayDemo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   136
	QListWidget *DemosList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   137
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   138
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   139
class PageOptions : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   140
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   141
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   142
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   143
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   144
	PageOptions(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   145
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   146
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   147
	QGroupBox *groupBox;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   148
	QPushButton *BtnNewTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   149
	QPushButton *BtnEditTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   150
	QComboBox *CBTeamName;
94
c6eec0bdb630 +1 layouted page
unc0rr
parents: 93
diff changeset
   151
	QGroupBox *AGGroupBox;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   152
	QComboBox *CBResolution;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   153
	QCheckBox *CBEnableSound;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   154
	QCheckBox *CBFullscreen;
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;
111
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   167
	QGroupBox *NNGroupBox;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   168
	QLabel *labelNN;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   169
	QLineEdit *editNetNick;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   170
	QLabel *labelIP;
30ca06092a64 - 'net nickname' and 'server address' options are on PageNet
unc0rr
parents: 94
diff changeset
   171
	QLineEdit * editIP;
87
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   172
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   173
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   174
class PageNetChat : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   175
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   176
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   177
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   178
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   179
	PageNetChat(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   180
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   181
	QPushButton *BtnDisconnect;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   182
	QListWidget *ChannelsList;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   183
	QPushButton *BtnJoin;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   184
	QPushButton *BtnCreate;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   185
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   186
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   187
class PageNetGame : public QWidget
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   188
{
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   189
	Q_OBJECT
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   190
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   191
public:
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   192
	PageNetGame(QWidget* parent = 0);
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   193
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   194
	QPushButton *BtnBack;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   195
	QPushButton *BtnAddTeam;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   196
	QPushButton *BtnGo;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   197
	QListWidget *listNetTeams;
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   198
};
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   199
ff213e443336 Convert all pages to classes
unc0rr
parents:
diff changeset
   200
#endif // PAGES_H