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