author | nemo |
Tue, 02 Nov 2010 09:10:53 -0400 | |
changeset 4094 | 8bb301767c9f |
parent 1475 | bab5650fc894 |
child 4410 | f9e38ce1e813 |
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); |
535
a14eaf35cf4b
"Setup" button instead of "New team", exclude playing teams from setup
displacer
parents:
492
diff
changeset
|
59 |
void SetupClicked(); |
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; |
80 |
QList<HWTeam> curDontPlayingTeams; |
|
50 | 81 |
}; |
82 |
||
83 |
#endif // _TEAM_SELECT_INCLUDED |