QTfrontend/frameTeam.h
changeset 207 287077789132
parent 184 f97a7a3dc8f6
child 240 c7f0a4f7a54a
equal deleted inserted replaced
206:32fa6282efe2 207:287077789132
    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