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