author | nemo |
Sun, 04 Sep 2011 12:06:10 -0400 | |
changeset 5763 | d7a887c7e2d0 |
parent 4976 | 088d40d8aba2 |
permissions | -rw-r--r-- |
184 | 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> |
|
184 | 5 |
* |
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 |
|
9 |
* |
|
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. |
|
14 |
* |
|
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 |
|
18 |
*/ |
|
19 |
||
20 |
#ifndef _TEAMSEL_HELPER_INCLUDED |
|
21 |
#define _TEAMSEL_HELPER_INCLUDED |
|
22 |
||
23 |
#include <QLabel> |
|
24 |
#include <QWidget> |
|
25 |
#include <QString> |
|
207 | 26 |
#include <QPushButton> |
184 | 27 |
|
28 |
#include "teamselect.h" |
|
29 |
#include "hedgehogerWidget.h" |
|
30 |
||
31 |
class TeamLabel : public QLabel |
|
32 |
{ |
|
33 |
Q_OBJECT |
|
34 |
||
35 |
public: |
|
36 |
TeamLabel(const QString& inp_str) : QLabel(inp_str) {}; |
|
37 |
||
38 |
signals: |
|
39 |
void teamActivated(QString team_name); |
|
40 |
||
41 |
public slots: |
|
42 |
void teamButtonClicked(); |
|
43 |
||
44 |
}; |
|
45 |
||
46 |
class TeamShowWidget : public QWidget |
|
47 |
{ |
|
48 |
Q_OBJECT |
|
49 |
||
372 | 50 |
public slots: |
51 |
void changeTeamColor(QColor color=QColor()); |
|
523
eddcef907b28
num hedgehogs while new team addition (dirty) fixed
displacer
parents:
486
diff
changeset
|
52 |
void hhNumChanged(); |
372 | 53 |
|
184 | 54 |
private slots: |
55 |
void activateTeam(); |
|
56 |
||
57 |
public: |
|
58 |
TeamShowWidget(HWTeam team, bool isPlaying, QWidget * parent); |
|
59 |
void setPlaying(bool isPlaying); |
|
352 | 60 |
void setHHNum(unsigned int num); |
1475
bab5650fc894
- Fix ConfigAsked not sending full config (leads to team divide checkbox inconsistency)
unc0rr
parents:
1171
diff
changeset
|
61 |
void setInteractivity(bool interactive); |
372 | 62 |
HWTeam getTeam() const; |
341 | 63 |
|
184 | 64 |
private: |
65 |
TeamShowWidget(); |
|
66 |
QHBoxLayout mainLayout; |
|
67 |
HWTeam m_team; |
|
68 |
bool m_isPlaying; |
|
69 |
CHedgehogerWidget* phhoger; |
|
207 | 70 |
QPushButton* colorButt; |
362
b28e0dd48269
hedgehogs num modification now allowed to chief client only
displacer
parents:
352
diff
changeset
|
71 |
QPushButton* butt; |
1171 | 72 |
// QPushButton* bText; |
184 | 73 |
|
74 |
signals: |
|
75 |
void teamStatusChanged(HWTeam team); |
|
352 | 76 |
void hhNmChanged(const HWTeam&); |
372 | 77 |
void teamColorChanged(const HWTeam&); |
184 | 78 |
}; |
79 |
||
80 |
#endif // _TEAMSEL_HELPER_INCLUDED |