author | sheepluva |
Mon, 21 Nov 2011 21:23:23 +0100 | |
branch | 0.9.17 |
changeset 6408 | 58d0195ec76e |
parent 6060 | fdfc01419815 |
child 6616 | f77bb02b669f |
permissions | -rw-r--r-- |
153 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
4976 | 3 |
* Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com> |
4 |
* Copyright (c) 2007-2011 Andrey Korotaev <unC0Rr@gmail.com> |
|
153 | 5 |
* |
184 | 6 |
* This program is free software; you can redistribute it and/or modify |
7 |
* it under the terms of the GNU General Public License as published by |
|
8 |
* the Free Software Foundation; version 2 of the License |
|
153 | 9 |
* |
184 | 10 |
* This program is distributed in the hope that it will be useful, |
11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
13 |
* GNU General Public License for more details. |
|
153 | 14 |
* |
184 | 15 |
* You should have received a copy of the GNU General Public License |
16 |
* along with this program; if not, write to the Free Software |
|
17 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA |
|
153 | 18 |
*/ |
19 |
||
50 | 20 |
#ifndef _TEAM_SELECT_INCLUDED |
21 |
#define _TEAM_SELECT_INCLUDED |
|
22 |
||
240 | 23 |
#include <QGroupBox> |
50 | 24 |
#include <QVBoxLayout> |
382
e7220e48ead1
colors changing config fully working (still need disabling in slaves)
displacer
parents:
373
diff
changeset
|
25 |
#include <QColor> |
471 | 26 |
#include <QMultiMap> |
50 | 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: |
373 | 42 |
TeamSelWidget(QWidget* parent); |
43 |
void setAcceptOuter(bool acceptOuter); |
|
347 | 44 |
void removeNetTeam(const HWTeam& team); |
231 | 45 |
void resetPlayingTeams(const QList<HWTeam>& teamslist); |
152 | 46 |
bool isPlaying(HWTeam team) const; |
352 | 47 |
QList<HWTeam> getPlayingTeams() const; |
5773 | 48 |
QList<HWTeam> getNotPlayingTeams() const; |
1475
bab5650fc894
- Fix ConfigAsked not sending full config (leads to team divide checkbox inconsistency)
unc0rr
parents:
1066
diff
changeset
|
49 |
void setInteractivity(bool interactive); |
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); |
471 | 57 |
|
322 | 58 |
signals: |
492 | 59 |
void setEnabledGameStart(bool); |
322 | 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); |
471 | 65 |
|
322 | 66 |
private slots: |
373 | 67 |
void pre_changeTeamStatus(HWTeam); |
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; |
50 | 78 |
|
352 | 79 |
QList<HWTeam> curPlayingTeams; |
5773 | 80 |
QList<HWTeam> m_curNotPlayingTeams; |
50 | 81 |
}; |
82 |
||
83 |
#endif // _TEAM_SELECT_INCLUDED |