QTfrontend/team.h
changeset 6024 d38da7c19e43
parent 6015 daffc14a518a
child 6223 cc3eb9b7230f
equal deleted inserted replaced
6022:8ed6e810051a 6024:d38da7c19e43
    50         HWTeam(const QString & teamname);
    50         HWTeam(const QString & teamname);
    51         HWTeam(const QStringList& strLst);
    51         HWTeam(const QStringList& strLst);
    52         HWTeam();
    52         HWTeam();
    53 
    53 
    54         // file operations
    54         // file operations
       
    55         static HWTeam loadFromFile(const QString & teamName);
    55         bool loadFromFile();
    56         bool loadFromFile();
    56         bool deleteFile();
    57         bool deleteFile();
    57         bool saveToFile();
    58         bool saveToFile();
    58         bool fileExists();
    59         bool fileExists();
    59 
    60 
    64               QString flag() const;
    65               QString flag() const;
    65               QString fort() const;
    66               QString fort() const;
    66               QString grave() const;
    67               QString grave() const;
    67         const HWHog & hedgehog(unsigned int idx) const;
    68         const HWHog & hedgehog(unsigned int idx) const;
    68                  bool isNetTeam() const;
    69                  bool isNetTeam() const;
       
    70               QString keyBind(unsigned int idx) const;
    69               QString name() const;
    71               QString name() const;
    70         unsigned char numHedgehogs() const;
    72         unsigned char numHedgehogs() const;
    71               QString owner() const;
    73               QString owner() const;
    72               QString voicepack() const;
    74               QString voicepack() const;
    73 
    75 
    74         // attribute setters
    76         // attribute setters
       
    77         void bindKey(unsigned int idx, const QString & key);
    75         void setColor(const QColor & color);
    78         void setColor(const QColor & color);
    76         void setDifficulty(unsigned int level);
    79         void setDifficulty(unsigned int level);
    77         void setFlag(const QString & flag);
    80         void setFlag(const QString & flag);
    78         void setFort(const QString & fort);
    81         void setFort(const QString & fort);
    79         void setGrave(const QString & grave);
    82         void setGrave(const QString & grave);
    80         void setHedgehog(unsigned int idx, const HWHog & hh);
    83         void setHedgehog(unsigned int idx, HWHog hh);
    81         void setName(const QString & name);
    84         void setName(const QString & name);
    82         void setNumHedgehogs(unsigned char num);
    85         void setNumHedgehogs(unsigned char num);
    83         void setVoicepack(const QString & voicepack);
    86         void setVoicepack(const QString & voicepack);
    84 
    87 
    85         // increments for statistical info
    88         // increments for statistical info
    86         void incRounds();
    89         void incRounds();
    87         void incWins();
    90         void incWins();
    88 
       
    89         // pages... wait... wth is THIS doing in this class? FIXME!!!!
       
    90         void SetToPage(HWForm * hwform);
       
    91         void GetFromPage(HWForm * hwform);
       
    92 
    91 
    93         // convert team info into strings for further computation
    92         // convert team info into strings for further computation
    94         QStringList teamGameConfig(quint32 InitHealth) const;
    93         QStringList teamGameConfig(quint32 InitHealth) const;
    95 
    94 
    96         // comparison operators
    95         // comparison operators
   109         QString m_fort;
   108         QString m_fort;
   110         QString m_flag;
   109         QString m_flag;
   111         QString m_voicepack;
   110         QString m_voicepack;
   112         HWHog m_hedgehogs[HEDGEHOGS_PER_TEAM];
   111         HWHog m_hedgehogs[HEDGEHOGS_PER_TEAM];
   113         unsigned int m_difficulty;
   112         unsigned int m_difficulty;
   114         BindAction binds[BINDS_NUMBER];
   113         BindAction m_binds[BINDS_NUMBER];
   115 
   114 
   116         // class members that contain info for the current game setup
   115         // class members that contain info for the current game setup
   117         unsigned char m_numHedgehogs;
   116         unsigned char m_numHedgehogs;
   118         QColor m_color;
   117         QColor m_color;
   119         bool m_isNetTeam;
   118         bool m_isNetTeam;