author | displacer |
Sun, 21 Jan 2007 19:53:25 +0000 | |
changeset 352 | 4665bfe25470 |
parent 347 | 6521e1b2cd40 |
child 362 | b28e0dd48269 |
permissions | -rw-r--r-- |
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); |
347 | 43 |
void removeNetTeam(const HWTeam& team); |
231 | 44 |
void resetPlayingTeams(const QList<HWTeam>& teamslist); |
152 | 45 |
bool isPlaying(HWTeam team) const; |
352 | 46 |
QList<HWTeam> getPlayingTeams() const; |
50 | 47 |
|
322 | 48 |
public slots: |
339
7535ab6c3820
Run game message added, team and config info provided for net game
displacer
parents:
322
diff
changeset
|
49 |
void addTeam(HWTeam team); |
347 | 50 |
void netTeamStatusChanged(const HWTeam& team); |
352 | 51 |
void changeHHNum(const HWTeam&); |
347 | 52 |
|
322 | 53 |
signals: |
54 |
void NewTeam(); |
|
55 |
void teamWillPlay(HWTeam team); |
|
347 | 56 |
void teamNotPlaying(const HWTeam& team); |
352 | 57 |
void hhogsNumChanged(const HWTeam&); |
347 | 58 |
|
322 | 59 |
private slots: |
117 | 60 |
void changeTeamStatus(HWTeam team); |
311 | 61 |
void newTeamClicked(); |
352 | 62 |
void hhNumChanged(const HWTeam& team); |
50 | 63 |
|
64 |
private: |
|
311 | 65 |
void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
63 | 66 |
FrameTeams* frameDontPlaying; |
67 |
FrameTeams* framePlaying; |
|
61 | 68 |
|
63 | 69 |
QVBoxLayout mainLayout; |
311 | 70 |
QPushButton * newTeam; |
50 | 71 |
|
352 | 72 |
QList<HWTeam> curPlayingTeams; |
73 |
QList<HWTeam> curDontPlayingTeams; |
|
50 | 74 |
}; |
75 |
||
76 |
#endif // _TEAM_SELECT_INCLUDED |