QTfrontend/ui/widget/frameTeam.h
changeset 6616 f77bb02b669f
parent 6060 fdfc01419815
child 6700 e04da46ee43c
equal deleted inserted replaced
6615:65602f1ef0f8 6616:f77bb02b669f
    26 
    26 
    27 #include "teamselect.h"
    27 #include "teamselect.h"
    28 
    28 
    29 class FrameTeams : public QFrame
    29 class FrameTeams : public QFrame
    30 {
    30 {
    31   Q_OBJECT
    31         Q_OBJECT
    32 
    32 
    33  friend class CHedgehogerWidget;
    33         friend class CHedgehogerWidget;
    34  friend class TeamShowWidget;
    34         friend class TeamShowWidget;
    35 
    35 
    36  public:
    36     public:
    37   FrameTeams(QWidget* parent=0);
    37         FrameTeams(QWidget* parent=0);
    38   QWidget* getTeamWidget(HWTeam team);
    38         QWidget* getTeamWidget(HWTeam team);
    39   bool isFullTeams() const;
    39         bool isFullTeams() const;
    40   void resetColors();
    40         void resetColors();
    41   void resetTeams();
    41         void resetTeams();
    42   void setHHNum(const HWTeam& team);
    42         void setHHNum(const HWTeam& team);
    43   void setTeamColor(const HWTeam& team);
    43         void setTeamColor(const HWTeam& team);
    44   void setInteractivity(bool interactive);
    44         void setInteractivity(bool interactive);
    45   QColor getNextColor() const;
    45         QColor getNextColor() const;
    46 
    46 
    47  signals:
    47     signals:
    48   void teamColorChanged(const HWTeam&);
    48         void teamColorChanged(const HWTeam&);
    49 
    49 
    50  public slots:
    50     public slots:
    51   void addTeam(HWTeam team, bool willPlay);
    51         void addTeam(HWTeam team, bool willPlay);
    52   void removeTeam(HWTeam team);
    52         void removeTeam(HWTeam team);
    53 
    53 
    54  private:
    54     private:
    55   const int maxHedgehogsPerGame;
    55         const int maxHedgehogsPerGame;
    56   int overallHedgehogs;
    56         int overallHedgehogs;
    57   QList<QColor> availableColors;
    57         QList<QColor> availableColors;
    58   QList<QColor>::Iterator currentColor;
    58         QList<QColor>::Iterator currentColor;
    59 
    59 
    60   void emitTeamColorChanged(const HWTeam& team);
    60         void emitTeamColorChanged(const HWTeam& team);
    61 
    61 
    62   QVBoxLayout mainLayout;
    62         QVBoxLayout mainLayout;
    63   typedef QMap<HWTeam, QWidget*> tmapTeamToWidget;
    63         typedef QMap<HWTeam, QWidget*> tmapTeamToWidget;
    64   tmapTeamToWidget teamToWidget;
    64         tmapTeamToWidget teamToWidget;
    65   bool nonInteractive;
    65         bool nonInteractive;
    66 };
    66 };
    67 
    67 
    68 #endif // _FRAME_TAM_INCLUDED
    68 #endif // _FRAME_TAM_INCLUDED