QTfrontend/team.h
changeset 6223 cc3eb9b7230f
parent 6024 d38da7c19e43
child 6225 505643d4c23d
equal deleted inserted replaced
6222:96d10dcd6d84 6223:cc3eb9b7230f
    40     QString Hat;
    40     QString Hat;
    41     int Rounds, Kills, Deaths, Suicides;
    41     int Rounds, Kills, Deaths, Suicides;
    42 };
    42 };
    43 
    43 
    44 // class representing a team
    44 // class representing a team
    45 class HWTeam
    45 class HWTeam : public QObject
    46 {
    46 {
       
    47 	Q_OBJECT
       
    48 
    47     public:
    49     public:
    48 
    50 
    49         // constructors
    51         // constructors
    50         HWTeam(const QString & teamname);
    52         HWTeam(const QString & teamname);
    51         HWTeam(const QStringList& strLst);
    53         HWTeam(const QStringList& strLst);
    52         HWTeam();
    54         HWTeam();
       
    55 		HWTeam(const HWTeam & other);
    53 
    56 
    54         // file operations
    57         // file operations
    55         static HWTeam loadFromFile(const QString & teamName);
    58         static HWTeam loadFromFile(const QString & teamName);
    56         bool loadFromFile();
    59         bool loadFromFile();
    57         bool deleteFile();
    60         bool deleteFile();
    91 
    94 
    92         // convert team info into strings for further computation
    95         // convert team info into strings for further computation
    93         QStringList teamGameConfig(quint32 InitHealth) const;
    96         QStringList teamGameConfig(quint32 InitHealth) const;
    94 
    97 
    95         // comparison operators
    98         // comparison operators
    96         bool operator==(const HWTeam& t1) const;
    99 		bool operator == (const HWTeam& t1) const;
    97         bool operator<(const HWTeam& t1) const;
   100 		bool operator < (const HWTeam& t1) const;
    98 
   101 		HWTeam & operator = (const HWTeam & other);
    99 
   102 
   100 
   103 
   101     private:
   104     private:
   102 
   105 
   103         QString OldTeamName;
   106         QString OldTeamName;
   107         QString m_grave;
   110         QString m_grave;
   108         QString m_fort;
   111         QString m_fort;
   109         QString m_flag;
   112         QString m_flag;
   110         QString m_voicepack;
   113         QString m_voicepack;
   111         HWHog m_hedgehogs[HEDGEHOGS_PER_TEAM];
   114         HWHog m_hedgehogs[HEDGEHOGS_PER_TEAM];
   112         unsigned int m_difficulty;
   115 		quint8 m_difficulty;
   113         BindAction m_binds[BINDS_NUMBER];
   116         BindAction m_binds[BINDS_NUMBER];
   114 
   117 
   115         // class members that contain info for the current game setup
   118         // class members that contain info for the current game setup
   116         unsigned char m_numHedgehogs;
   119 		quint8 m_numHedgehogs;
   117         QColor m_color;
   120         QColor m_color;
   118         bool m_isNetTeam;
   121         bool m_isNetTeam;
   119         QString m_owner;
   122         QString m_owner;
   120 
   123 
   121         // class members that contain statistics, etc.
   124         // class members that contain statistics, etc.
   122         unsigned int m_campaignProgress;
   125         unsigned int m_campaignProgress;
   123         unsigned int m_rounds;
   126         unsigned int m_rounds;
   124         unsigned int m_wins;
   127         unsigned int m_wins;
   125         unsigned int AchievementProgress[MAX_ACHIEVEMENTS];
   128         unsigned int AchievementProgress[MAX_ACHIEVEMENTS];
   126 
       
   127 
       
   128 };
   129 };
   129 
   130 
   130 #endif
   131 #endif