50
|
1 |
#ifndef _TEAM_SELECT_INCLUDED
|
|
2 |
#define _TEAM_SELECT_INCLUDED
|
|
3 |
|
|
4 |
#include <QWidget>
|
|
5 |
#include <QVBoxLayout>
|
63
|
6 |
class QFrame;
|
50
|
7 |
|
|
8 |
#include <list>
|
|
9 |
#include <map>
|
|
10 |
|
63
|
11 |
class TeamSelWidget;
|
|
12 |
class FrameTeams;
|
|
13 |
|
50
|
14 |
using namespace std;
|
|
15 |
|
|
16 |
struct tmprop
|
|
17 |
{
|
63
|
18 |
tmprop(QString nm) : teamName(nm) {};
|
50
|
19 |
QString teamName;
|
|
20 |
QString pixmapFileName;
|
|
21 |
bool operator==(const tmprop& t1) const {
|
|
22 |
return teamName==t1.teamName;
|
|
23 |
};
|
|
24 |
bool operator<(const tmprop& t1) const {
|
|
25 |
return teamName<t1.teamName;
|
|
26 |
};
|
|
27 |
};
|
|
28 |
|
|
29 |
class TeamSelWidget : public QWidget
|
|
30 |
{
|
|
31 |
Q_OBJECT
|
|
32 |
|
|
33 |
public:
|
61
|
34 |
TeamSelWidget(QWidget* parent=0);
|
50
|
35 |
void addTeam(tmprop team);
|
|
36 |
void removeTeam(tmprop team);
|
|
37 |
|
|
38 |
private slots:
|
|
39 |
void changeTeamStatus(tmprop team);
|
|
40 |
|
|
41 |
private:
|
63
|
42 |
void addScrArea(FrameTeams* pfteams, QColor color);
|
|
43 |
FrameTeams* frameDontPlaying;
|
|
44 |
FrameTeams* framePlaying;
|
61
|
45 |
|
63
|
46 |
QVBoxLayout mainLayout;
|
50
|
47 |
|
|
48 |
list<tmprop> curPlayingTeams;
|
|
49 |
list<tmprop> curDontPlayingTeams;
|
|
50 |
};
|
|
51 |
|
|
52 |
#endif // _TEAM_SELECT_INCLUDED
|