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>
|
63
|
24 |
class QFrame;
|
50
|
25 |
|
|
26 |
#include <list>
|
|
27 |
#include <map>
|
|
28 |
|
117
|
29 |
#include "team.h"
|
|
30 |
|
63
|
31 |
class TeamSelWidget;
|
|
32 |
class FrameTeams;
|
|
33 |
|
50
|
34 |
using namespace std;
|
|
35 |
|
240
|
36 |
class TeamSelWidget : public QGroupBox
|
50
|
37 |
{
|
|
38 |
Q_OBJECT
|
240
|
39 |
|
50
|
40 |
public:
|
61
|
41 |
TeamSelWidget(QWidget* parent=0);
|
117
|
42 |
void addTeam(HWTeam team);
|
|
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 |
|
|
49 |
private slots:
|
117
|
50 |
void changeTeamStatus(HWTeam team);
|
50
|
51 |
|
|
52 |
private:
|
63
|
53 |
void addScrArea(FrameTeams* pfteams, QColor color);
|
|
54 |
FrameTeams* frameDontPlaying;
|
|
55 |
FrameTeams* framePlaying;
|
61
|
56 |
|
63
|
57 |
QVBoxLayout mainLayout;
|
50
|
58 |
|
117
|
59 |
list<HWTeam> curPlayingTeams;
|
|
60 |
list<HWTeam> curDontPlayingTeams;
|
50
|
61 |
};
|
|
62 |
|
|
63 |
#endif // _TEAM_SELECT_INCLUDED
|