QTfrontend/teamselect.h
changeset 117 d21a48200772
parent 63 27e2b5bb6d4b
child 140 50ccde437ea1
equal deleted inserted replaced
116:00d3d6d2e699 117:d21a48200772
     6 class QFrame;
     6 class QFrame;
     7 
     7 
     8 #include <list>
     8 #include <list>
     9 #include <map>
     9 #include <map>
    10 
    10 
       
    11 #include "team.h"
       
    12 
    11 class TeamSelWidget;
    13 class TeamSelWidget;
    12 class FrameTeams;
    14 class FrameTeams;
    13 
    15 
    14 using namespace std;
    16 using namespace std;
    15 
       
    16 struct tmprop
       
    17 {
       
    18   tmprop(QString nm) : teamName(nm) {};
       
    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 
    17 
    29 class TeamSelWidget : public QWidget
    18 class TeamSelWidget : public QWidget
    30 {
    19 {
    31   Q_OBJECT
    20   Q_OBJECT
    32  
    21  
    33  public:
    22  public:
    34   TeamSelWidget(QWidget* parent=0);
    23   TeamSelWidget(QWidget* parent=0);
    35   void addTeam(tmprop team);
    24   void addTeam(HWTeam team);
    36   void removeTeam(tmprop team);
    25   //void removeTeam(HWTeam team);
    37 
    26 
    38 private slots:
    27 private slots:
    39   void changeTeamStatus(tmprop team);
    28   void changeTeamStatus(HWTeam team);
    40 
    29 
    41  private:
    30  private:
    42   void addScrArea(FrameTeams* pfteams, QColor color);
    31   void addScrArea(FrameTeams* pfteams, QColor color);
    43   FrameTeams* frameDontPlaying;
    32   FrameTeams* frameDontPlaying;
    44   FrameTeams* framePlaying;
    33   FrameTeams* framePlaying;
    45 
    34 
    46   QVBoxLayout mainLayout;
    35   QVBoxLayout mainLayout;
    47 
    36 
    48   list<tmprop> curPlayingTeams;
    37   list<HWTeam> curPlayingTeams;
    49   list<tmprop> curDontPlayingTeams;
    38   list<HWTeam> curDontPlayingTeams;
    50 };
    39 };
    51 
    40 
    52 #endif // _TEAM_SELECT_INCLUDED
    41 #endif // _TEAM_SELECT_INCLUDED