18 |
18 |
19 #ifndef _FRAME_TEAM_INCLUDED |
19 #ifndef _FRAME_TEAM_INCLUDED |
20 #define _FRAME_TEAM_INCLUDED |
20 #define _FRAME_TEAM_INCLUDED |
21 |
21 |
22 #include <QWidget> |
22 #include <QWidget> |
|
23 #include <QList> |
|
24 #include <QColor> |
23 |
25 |
24 #include "teamselect.h" |
26 #include "teamselect.h" |
25 #include <map> |
27 #include <map> |
26 |
28 |
27 class FrameTeams : public QWidget |
29 class FrameTeams : public QWidget |
28 { |
30 { |
29 Q_OBJECT |
31 Q_OBJECT |
30 |
32 |
31 friend class CHedgehogerWidget; |
33 friend class CHedgehogerWidget; |
|
34 friend class TeamShowWidget; |
32 |
35 |
33 public: |
36 public: |
34 FrameTeams(QWidget* parent=0); |
37 FrameTeams(QWidget* parent=0); |
35 QWidget* getTeamWidget(HWTeam team); |
38 QWidget* getTeamWidget(HWTeam team); |
36 bool isFullTeams() const; |
39 bool isFullTeams() const; |
|
40 void resetColors(); |
37 |
41 |
38 public slots: |
42 public slots: |
39 void addTeam(HWTeam team, bool willPlay); |
43 void addTeam(HWTeam team, bool willPlay); |
40 void removeTeam(HWTeam team); |
44 void removeTeam(HWTeam team); |
41 |
45 |
42 private: |
46 private: |
43 const int maxHedgehogsPerGame; |
47 const int maxHedgehogsPerGame; |
44 int overallHedgehogs; |
48 int overallHedgehogs; |
|
49 QList<QColor> availableColors; |
|
50 QList<QColor>::Iterator currentColor; |
|
51 |
45 QVBoxLayout mainLayout; |
52 QVBoxLayout mainLayout; |
46 typedef map<HWTeam, QWidget*> tmapTeamToWidget; |
53 typedef map<HWTeam, QWidget*> tmapTeamToWidget; |
47 tmapTeamToWidget teamToWidget; |
54 tmapTeamToWidget teamToWidget; |
48 }; |
55 }; |
49 |
56 |