author | koda |
Sun, 10 Oct 2010 03:16:25 +0200 | |
changeset 3941 | 017b2b31e1c6 |
parent 1475 | bab5650fc894 |
child 4976 | 088d40d8aba2 |
permissions | -rw-r--r-- |
184 | 1 |
/* |
1066 | 2 |
* Hedgewars, a free turn based strategy game |
486 | 3 |
* Copyright (c) 2006, 2007 Ulyanov Igor <iulyanov@gmail.com> |
184 | 4 |
* |
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 |
|
8 |
* |
|
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. |
|
13 |
* |
|
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 |
|
17 |
*/ |
|
18 |
||
19 |
#ifndef _TEAMSEL_HELPER_INCLUDED |
|
20 |
#define _TEAMSEL_HELPER_INCLUDED |
|
21 |
||
22 |
#include <QLabel> |
|
23 |
#include <QWidget> |
|
24 |
#include <QString> |
|
207 | 25 |
#include <QPushButton> |
184 | 26 |
|
27 |
#include "teamselect.h" |
|
28 |
#include "hedgehogerWidget.h" |
|
29 |
||
30 |
class TeamLabel : public QLabel |
|
31 |
{ |
|
32 |
Q_OBJECT |
|
33 |
||
34 |
public: |
|
35 |
TeamLabel(const QString& inp_str) : QLabel(inp_str) {}; |
|
36 |
||
37 |
signals: |
|
38 |
void teamActivated(QString team_name); |
|
39 |
||
40 |
public slots: |
|
41 |
void teamButtonClicked(); |
|
42 |
||
43 |
}; |
|
44 |
||
45 |
class TeamShowWidget : public QWidget |
|
46 |
{ |
|
47 |
Q_OBJECT |
|
48 |
||
372 | 49 |
public slots: |
50 |
void changeTeamColor(QColor color=QColor()); |
|
523
eddcef907b28
num hedgehogs while new team addition (dirty) fixed
displacer
parents:
486
diff
changeset
|
51 |
void hhNumChanged(); |
372 | 52 |
|
184 | 53 |
private slots: |
54 |
void activateTeam(); |
|
55 |
||
56 |
public: |
|
57 |
TeamShowWidget(HWTeam team, bool isPlaying, QWidget * parent); |
|
58 |
void setPlaying(bool isPlaying); |
|
352 | 59 |
void setHHNum(unsigned int num); |
1475
bab5650fc894
- Fix ConfigAsked not sending full config (leads to team divide checkbox inconsistency)
unc0rr
parents:
1171
diff
changeset
|
60 |
void setInteractivity(bool interactive); |
372 | 61 |
HWTeam getTeam() const; |
341 | 62 |
|
184 | 63 |
private: |
64 |
TeamShowWidget(); |
|
65 |
QHBoxLayout mainLayout; |
|
66 |
HWTeam m_team; |
|
67 |
bool m_isPlaying; |
|
68 |
CHedgehogerWidget* phhoger; |
|
207 | 69 |
QPushButton* colorButt; |
362
b28e0dd48269
hedgehogs num modification now allowed to chief client only
displacer
parents:
352
diff
changeset
|
70 |
QPushButton* butt; |
1171 | 71 |
// QPushButton* bText; |
184 | 72 |
|
73 |
signals: |
|
74 |
void teamStatusChanged(HWTeam team); |
|
352 | 75 |
void hhNmChanged(const HWTeam&); |
372 | 76 |
void teamColorChanged(const HWTeam&); |
184 | 77 |
}; |
78 |
||
79 |
#endif // _TEAMSEL_HELPER_INCLUDED |