184
|
1 |
/*
|
|
2 |
* Hedgewars, a worms-like game
|
|
3 |
* Copyright (c) 2006 Ulyanov Igor <iulyanov@gmail.com>
|
|
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 |
|
|
49 |
private slots:
|
|
50 |
void activateTeam();
|
207
|
51 |
void changeTeamColor();
|
184
|
52 |
|
|
53 |
public:
|
|
54 |
TeamShowWidget(HWTeam team, bool isPlaying, QWidget * parent);
|
|
55 |
void setPlaying(bool isPlaying);
|
341
|
56 |
|
184
|
57 |
private:
|
|
58 |
TeamShowWidget();
|
|
59 |
QHBoxLayout mainLayout;
|
|
60 |
HWTeam m_team;
|
|
61 |
bool m_isPlaying;
|
|
62 |
CHedgehogerWidget* phhoger;
|
207
|
63 |
QPushButton* colorButt;
|
184
|
64 |
|
|
65 |
signals:
|
|
66 |
void teamStatusChanged(HWTeam team);
|
|
67 |
};
|
|
68 |
|
|
69 |
#endif // _TEAMSEL_HELPER_INCLUDED
|