author | nemo |
Wed, 22 Dec 2010 21:33:46 -0500 | |
changeset 4637 | 0f22a53c4c1d |
parent 4410 | f9e38ce1e813 |
child 4976 | 088d40d8aba2 |
permissions | -rw-r--r-- |
153 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy 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; |
535
a14eaf35cf4b
"Setup" button instead of "New team", exclude playing teams from setup
displacer
parents:
492
diff
changeset
|
47 |
QList<HWTeam> getDontPlayingTeams() const; |
1475
bab5650fc894
- Fix ConfigAsked not sending full config (leads to team divide checkbox inconsistency)
unc0rr
parents:
1066
diff
changeset
|
48 |
void setInteractivity(bool interactive); |
50 | 49 |
|
322 | 50 |
public slots: |
339
7535ab6c3820
Run game message added, team and config info provided for net game
displacer
parents:
322
diff
changeset
|
51 |
void addTeam(HWTeam team); |
347 | 52 |
void netTeamStatusChanged(const HWTeam& team); |
352 | 53 |
void changeHHNum(const HWTeam&); |
372 | 54 |
void changeTeamColor(const HWTeam&); |
373 | 55 |
void changeTeamStatus(HWTeam team); |
471 | 56 |
|
322 | 57 |
signals: |
492 | 58 |
void setEnabledGameStart(bool); |
322 | 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); |
352 | 67 |
void hhNumChanged(const HWTeam& team); |
372 | 68 |
void proxyTeamColorChanged(const HWTeam& team); |
50 | 69 |
|
70 |
private: |
|
311 | 71 |
void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
63 | 72 |
FrameTeams* frameDontPlaying; |
73 |
FrameTeams* framePlaying; |
|
61 | 74 |
|
63 | 75 |
QVBoxLayout mainLayout; |
373 | 76 |
bool m_acceptOuter; |
50 | 77 |
|
352 | 78 |
QList<HWTeam> curPlayingTeams; |
79 |
QList<HWTeam> curDontPlayingTeams; |
|
50 | 80 |
}; |
81 |
||
82 |
#endif // _TEAM_SELECT_INCLUDED |