author | unc0rr |
Fri, 26 Jan 2007 18:39:40 +0000 | |
changeset 368 | fe71e55d2d7b |
parent 362 | b28e0dd48269 |
child 372 | 4bac77f8cd38 |
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; |
362
b28e0dd48269
hedgehogs num modification now allowed to chief client only
displacer
parents:
352
diff
changeset
|
47 |
void setNonInteractive(); |
50 | 48 |
|
322 | 49 |
public slots: |
339
7535ab6c3820
Run game message added, team and config info provided for net game
displacer
parents:
322
diff
changeset
|
50 |
void addTeam(HWTeam team); |
347 | 51 |
void netTeamStatusChanged(const HWTeam& team); |
352 | 52 |
void changeHHNum(const HWTeam&); |
347 | 53 |
|
322 | 54 |
signals: |
55 |
void NewTeam(); |
|
56 |
void teamWillPlay(HWTeam team); |
|
347 | 57 |
void teamNotPlaying(const HWTeam& team); |
352 | 58 |
void hhogsNumChanged(const HWTeam&); |
347 | 59 |
|
322 | 60 |
private slots: |
117 | 61 |
void changeTeamStatus(HWTeam team); |
311 | 62 |
void newTeamClicked(); |
352 | 63 |
void hhNumChanged(const HWTeam& team); |
50 | 64 |
|
65 |
private: |
|
311 | 66 |
void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
63 | 67 |
FrameTeams* frameDontPlaying; |
68 |
FrameTeams* framePlaying; |
|
61 | 69 |
|
63 | 70 |
QVBoxLayout mainLayout; |
311 | 71 |
QPushButton * newTeam; |
50 | 72 |
|
352 | 73 |
QList<HWTeam> curPlayingTeams; |
74 |
QList<HWTeam> curDontPlayingTeams; |
|
50 | 75 |
}; |
76 |
||
77 |
#endif // _TEAM_SELECT_INCLUDED |