author | displacer |
Tue, 20 Feb 2007 18:51:05 +0000 | |
changeset 463 | 353c2f830888 |
parent 382 | e7220e48ead1 |
child 471 | e1eb64ba5e9c |
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> |
382
e7220e48ead1
colors changing config fully working (still need disabling in slaves)
displacer
parents:
373
diff
changeset
|
24 |
#include <QColor> |
50 | 25 |
|
26 |
#include <list> |
|
27 |
#include <map> |
|
28 |
||
117 | 29 |
#include "team.h" |
30 |
||
63 | 31 |
class TeamSelWidget; |
32 |
class FrameTeams; |
|
311 | 33 |
class QFrame; |
34 |
class QPushButton; |
|
63 | 35 |
|
50 | 36 |
using namespace std; |
37 |
||
240 | 38 |
class TeamSelWidget : public QGroupBox |
50 | 39 |
{ |
40 |
Q_OBJECT |
|
240 | 41 |
|
50 | 42 |
public: |
373 | 43 |
TeamSelWidget(QWidget* parent); |
44 |
void setAcceptOuter(bool acceptOuter); |
|
347 | 45 |
void removeNetTeam(const HWTeam& team); |
231 | 46 |
void resetPlayingTeams(const QList<HWTeam>& teamslist); |
152 | 47 |
bool isPlaying(HWTeam team) const; |
352 | 48 |
QList<HWTeam> getPlayingTeams() const; |
362
b28e0dd48269
hedgehogs num modification now allowed to chief client only
displacer
parents:
352
diff
changeset
|
49 |
void setNonInteractive(); |
50 | 50 |
|
322 | 51 |
public slots: |
339
7535ab6c3820
Run game message added, team and config info provided for net game
displacer
parents:
322
diff
changeset
|
52 |
void addTeam(HWTeam team); |
347 | 53 |
void netTeamStatusChanged(const HWTeam& team); |
352 | 54 |
void changeHHNum(const HWTeam&); |
372 | 55 |
void changeTeamColor(const HWTeam&); |
373 | 56 |
void changeTeamStatus(HWTeam team); |
347 | 57 |
|
322 | 58 |
signals: |
59 |
void NewTeam(); |
|
60 |
void teamWillPlay(HWTeam team); |
|
347 | 61 |
void teamNotPlaying(const HWTeam& team); |
352 | 62 |
void hhogsNumChanged(const HWTeam&); |
372 | 63 |
void teamColorChanged(const HWTeam&); |
373 | 64 |
void acceptRequested(HWTeam team); |
347 | 65 |
|
322 | 66 |
private slots: |
373 | 67 |
void pre_changeTeamStatus(HWTeam); |
311 | 68 |
void newTeamClicked(); |
352 | 69 |
void hhNumChanged(const HWTeam& team); |
372 | 70 |
void proxyTeamColorChanged(const HWTeam& team); |
50 | 71 |
|
72 |
private: |
|
311 | 73 |
void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
63 | 74 |
FrameTeams* frameDontPlaying; |
75 |
FrameTeams* framePlaying; |
|
61 | 76 |
|
63 | 77 |
QVBoxLayout mainLayout; |
373 | 78 |
bool m_acceptOuter; |
311 | 79 |
QPushButton * newTeam; |
50 | 80 |
|
352 | 81 |
QList<HWTeam> curPlayingTeams; |
82 |
QList<HWTeam> curDontPlayingTeams; |
|
50 | 83 |
}; |
84 |
||
85 |
#endif // _TEAM_SELECT_INCLUDED |