153
|
1 |
/*
|
|
2 |
* Hedgewars, a worms-like game
|
|
3 |
* Copyright (c) 2006 Ulyanov Igor <iulyanov@gmail.com>
|
|
4 |
*
|
184
|
5 |
* This program is free software; you can redistribute it and/or modify
|
|
6 |
* it under the terms of the GNU General Public License as published by
|
|
7 |
* the Free Software Foundation; version 2 of the License
|
153
|
8 |
*
|
184
|
9 |
* This program is distributed in the hope that it will be useful,
|
|
10 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12 |
* GNU General Public License for more details.
|
153
|
13 |
*
|
184
|
14 |
* You should have received a copy of the GNU General Public License
|
|
15 |
* along with this program; if not, write to the Free Software
|
|
16 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
153
|
17 |
*/
|
|
18 |
|
50
|
19 |
#ifndef _TEAM_SELECT_INCLUDED
|
|
20 |
#define _TEAM_SELECT_INCLUDED
|
|
21 |
|
240
|
22 |
#include <QGroupBox>
|
50
|
23 |
#include <QVBoxLayout>
|
|
24 |
|
|
25 |
#include <list>
|
|
26 |
#include <map>
|
|
27 |
|
117
|
28 |
#include "team.h"
|
|
29 |
|
63
|
30 |
class TeamSelWidget;
|
|
31 |
class FrameTeams;
|
311
|
32 |
class QFrame;
|
|
33 |
class QPushButton;
|
63
|
34 |
|
50
|
35 |
using namespace std;
|
|
36 |
|
240
|
37 |
class TeamSelWidget : public QGroupBox
|
50
|
38 |
{
|
|
39 |
Q_OBJECT
|
240
|
40 |
|
50
|
41 |
public:
|
61
|
42 |
TeamSelWidget(QWidget* parent=0);
|
117
|
43 |
//void removeTeam(HWTeam team);
|
231
|
44 |
void resetPlayingTeams(const QList<HWTeam>& teamslist);
|
152
|
45 |
bool isPlaying(HWTeam team) const;
|
207
|
46 |
HWTeamTempParams getTeamParams(HWTeam team) const;
|
152
|
47 |
list<HWTeam> getPlayingTeams() const;
|
50
|
48 |
|
322
|
49 |
public slots:
|
|
50 |
void addTeam(HWTeam team, bool netTeam=false);
|
311
|
51 |
|
322
|
52 |
signals:
|
|
53 |
void NewTeam();
|
|
54 |
void teamWillPlay(HWTeam team);
|
|
55 |
|
|
56 |
private slots:
|
117
|
57 |
void changeTeamStatus(HWTeam team);
|
311
|
58 |
void newTeamClicked();
|
50
|
59 |
|
|
60 |
private:
|
311
|
61 |
void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight);
|
63
|
62 |
FrameTeams* frameDontPlaying;
|
|
63 |
FrameTeams* framePlaying;
|
61
|
64 |
|
63
|
65 |
QVBoxLayout mainLayout;
|
311
|
66 |
QPushButton * newTeam;
|
50
|
67 |
|
117
|
68 |
list<HWTeam> curPlayingTeams;
|
|
69 |
list<HWTeam> curDontPlayingTeams;
|
50
|
70 |
};
|
|
71 |
|
|
72 |
#endif // _TEAM_SELECT_INCLUDED
|