|
1 /* |
|
2 * Hedgewars, a free turn based strategy game |
|
3 * Copyright (c) 2006-2007 Igor Ulyanov <iulyanov@gmail.com> |
|
4 * Copyright (c) 2007-2011 Andrey Korotaev <unC0Rr@gmail.com> |
|
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> |
|
26 #include <QPushButton> |
|
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 |
|
50 public slots: |
|
51 void changeTeamColor(QColor color=QColor()); |
|
52 void hhNumChanged(); |
|
53 |
|
54 private slots: |
|
55 void activateTeam(); |
|
56 |
|
57 public: |
|
58 TeamShowWidget(HWTeam team, bool isPlaying, QWidget * parent); |
|
59 void setPlaying(bool isPlaying); |
|
60 void setHHNum(unsigned int num); |
|
61 void setInteractivity(bool interactive); |
|
62 HWTeam getTeam() const; |
|
63 |
|
64 private: |
|
65 TeamShowWidget(); |
|
66 QHBoxLayout mainLayout; |
|
67 HWTeam m_team; |
|
68 bool m_isPlaying; |
|
69 CHedgehogerWidget* phhoger; |
|
70 QPushButton* colorButt; |
|
71 QPushButton* butt; |
|
72 // QPushButton* bText; |
|
73 |
|
74 signals: |
|
75 void teamStatusChanged(HWTeam team); |
|
76 void hhNmChanged(const HWTeam&); |
|
77 void teamColorChanged(const HWTeam&); |
|
78 }; |
|
79 |
|
80 #endif // _TEAMSEL_HELPER_INCLUDED |