34 |
34 |
35 using namespace std; |
35 using namespace std; |
36 |
36 |
37 class TeamSelWidget : public QGroupBox |
37 class TeamSelWidget : public QGroupBox |
38 { |
38 { |
39 Q_OBJECT |
39 Q_OBJECT |
40 |
40 |
41 public: |
41 public: |
42 TeamSelWidget(QWidget* parent); |
42 TeamSelWidget(QWidget* parent); |
43 void setAcceptOuter(bool acceptOuter); |
43 void setAcceptOuter(bool acceptOuter); |
44 void removeNetTeam(const HWTeam& team); |
44 void removeNetTeam(const HWTeam& team); |
45 void resetPlayingTeams(const QList<HWTeam>& teamslist); |
45 void resetPlayingTeams(const QList<HWTeam>& teamslist); |
46 bool isPlaying(HWTeam team) const; |
46 bool isPlaying(HWTeam team) const; |
47 QList<HWTeam> getPlayingTeams() const; |
47 QList<HWTeam> getPlayingTeams() const; |
48 QList<HWTeam> getNotPlayingTeams() const; |
48 QList<HWTeam> getNotPlayingTeams() const; |
49 void setInteractivity(bool interactive); |
49 void setInteractivity(bool interactive); |
50 |
50 |
51 public slots: |
51 public slots: |
52 void addTeam(HWTeam team); |
52 void addTeam(HWTeam team); |
53 void netTeamStatusChanged(const HWTeam& team); |
53 void netTeamStatusChanged(const HWTeam& team); |
54 void changeHHNum(const HWTeam&); |
54 void changeHHNum(const HWTeam&); |
55 void changeTeamColor(const HWTeam&); |
55 void changeTeamColor(const HWTeam&); |
56 void changeTeamStatus(HWTeam team); |
56 void changeTeamStatus(HWTeam team); |
57 |
57 |
58 signals: |
58 signals: |
59 void setEnabledGameStart(bool); |
59 void setEnabledGameStart(bool); |
60 void teamWillPlay(HWTeam team); |
60 void teamWillPlay(HWTeam team); |
61 void teamNotPlaying(const HWTeam& team); |
61 void teamNotPlaying(const HWTeam& team); |
62 void hhogsNumChanged(const HWTeam&); |
62 void hhogsNumChanged(const HWTeam&); |
63 void teamColorChanged(const HWTeam&); |
63 void teamColorChanged(const HWTeam&); |
64 void acceptRequested(HWTeam team); |
64 void acceptRequested(HWTeam team); |
65 |
65 |
66 private slots: |
66 private slots: |
67 void pre_changeTeamStatus(HWTeam); |
67 void pre_changeTeamStatus(HWTeam); |
68 void hhNumChanged(const HWTeam& team); |
68 void hhNumChanged(const HWTeam& team); |
69 void proxyTeamColorChanged(const HWTeam& team); |
69 void proxyTeamColorChanged(const HWTeam& team); |
70 |
70 |
71 private: |
71 private: |
72 void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
72 void addScrArea(FrameTeams* pfteams, QColor color, int maxHeight); |
73 FrameTeams* frameDontPlaying; |
73 FrameTeams* frameDontPlaying; |
74 FrameTeams* framePlaying; |
74 FrameTeams* framePlaying; |
75 |
75 |
76 QVBoxLayout mainLayout; |
76 QVBoxLayout mainLayout; |
77 bool m_acceptOuter; |
77 bool m_acceptOuter; |
78 |
78 |
79 QList<HWTeam> curPlayingTeams; |
79 QList<HWTeam> curPlayingTeams; |
80 QList<HWTeam> m_curNotPlayingTeams; |
80 QList<HWTeam> m_curNotPlayingTeams; |
81 }; |
81 }; |
82 |
82 |
83 #endif // _TEAM_SELECT_INCLUDED |
83 #endif // _TEAM_SELECT_INCLUDED |