author | unc0rr |
Tue, 29 May 2007 21:56:35 +0000 | |
changeset 531 | 1f6c6eb0ea02 |
parent 492 | 78e80f899b59 |
child 535 | a14eaf35cf4b |
permissions | -rw-r--r-- |
153 | 1 |
/* |
2 |
* Hedgewars, a worms-like game |
|
486 | 3 |
* Copyright (c) 2006, 2007 Ulyanov Igor <iulyanov@gmail.com> |
153 | 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> |
471 | 25 |
#include <QMultiMap> |
50 | 26 |
|
117 | 27 |
#include "team.h" |
28 |
||
63 | 29 |
class TeamSelWidget; |
30 |
class FrameTeams; |
|
311 | 31 |
class QFrame; |
32 |
class QPushButton; |
|
63 | 33 |
|
50 | 34 |
using namespace std; |
35 |
||
240 | 36 |
class TeamSelWidget : public QGroupBox |
50 | 37 |
{ |
38 |
Q_OBJECT |
|
240 | 39 |
|
50 | 40 |
public: |
373 | 41 |
TeamSelWidget(QWidget* parent); |
42 |
void setAcceptOuter(bool acceptOuter); |
|
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&); |
372 | 53 |
void changeTeamColor(const HWTeam&); |
373 | 54 |
void changeTeamStatus(HWTeam team); |
471 | 55 |
|
322 | 56 |
signals: |
492 | 57 |
void setEnabledGameStart(bool); |
322 | 58 |
void NewTeam(); |
59 |
void teamWillPlay(HWTeam team); |
|
347 | 60 |
void teamNotPlaying(const HWTeam& team); |
352 | 61 |
void hhogsNumChanged(const HWTeam&); |
372 | 62 |
void teamColorChanged(const HWTeam&); |
373 | 63 |
void acceptRequested(HWTeam team); |
471 | 64 |
|
322 | 65 |
private slots: |
373 | 66 |
void pre_changeTeamStatus(HWTeam); |
311 | 67 |
void newTeamClicked(); |
352 | 68 |
void hhNumChanged(const HWTeam& team); |
372 | 69 |
void proxyTeamColorChanged(const HWTeam& team); |
50 | 70 |
|
71 |
private: |
|
311 | 72 |
void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
63 | 73 |
FrameTeams* frameDontPlaying; |
74 |
FrameTeams* framePlaying; |
|
61 | 75 |
|
63 | 76 |
QVBoxLayout mainLayout; |
373 | 77 |
bool m_acceptOuter; |
311 | 78 |
QPushButton * newTeam; |
50 | 79 |
|
352 | 80 |
QList<HWTeam> curPlayingTeams; |
81 |
QList<HWTeam> curDontPlayingTeams; |
|
50 | 82 |
}; |
83 |
||
84 |
#endif // _TEAM_SELECT_INCLUDED |