QTfrontend/game.h
changeset 6616 f77bb02b669f
parent 6217 ef53ba841791
child 6700 e04da46ee43c
--- a/QTfrontend/game.h	Mon Jan 30 23:20:28 2012 +0100
+++ b/QTfrontend/game.h	Mon Jan 30 17:32:18 2012 -0500
@@ -29,7 +29,8 @@
 class GameCFGWidget;
 class TeamSelWidget;
 
-enum GameState {
+enum GameState
+{
     gsNotStarted = 0,
     gsStarted  = 1,
     gsInterrupted = 2,
@@ -43,64 +44,65 @@
 
 class HWGame : public TCPBase
 {
-    Q_OBJECT
-public:
-    HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget = 0);
-    virtual ~HWGame();
-    void AddTeam(const QString & team);
-    void PlayDemo(const QString & demofilename, bool isSave);
-    void StartLocal();
-    void StartQuick();
-    void StartNet();
-    void StartTraining(const QString & file);
-    void StartCampaign(const QString & file);
-    void abort();
-    GameState gameState;
-    bool netSuspend;
+        Q_OBJECT
+    public:
+        HWGame(GameUIConfig * config, GameCFGWidget * gamecfg, QString ammo, TeamSelWidget* pTeamSelWidget = 0);
+        virtual ~HWGame();
+        void AddTeam(const QString & team);
+        void PlayDemo(const QString & demofilename, bool isSave);
+        void StartLocal();
+        void StartQuick();
+        void StartNet();
+        void StartTraining(const QString & file);
+        void StartCampaign(const QString & file);
+        void abort();
+        GameState gameState;
+        bool netSuspend;
 
- protected:
-    virtual QStringList getArguments();
-    virtual void onClientRead();
-    virtual void onClientDisconnect();
+    protected:
+        virtual QStringList getArguments();
+        virtual void onClientRead();
+        virtual void onClientDisconnect();
 
-signals:
-    void SendNet(const QByteArray & msg);
-    void SendChat(const QString & msg);
-    void SendTeamMessage(const QString & msg);
-    void GameStateChanged(GameState gameState);
-    void GameStats(char type, const QString & info);
-    void HaveRecord(bool isDemo, const QByteArray & record);
-    void ErrorMessage(const QString &);
+    signals:
+        void SendNet(const QByteArray & msg);
+        void SendChat(const QString & msg);
+        void SendTeamMessage(const QString & msg);
+        void GameStateChanged(GameState gameState);
+        void GameStats(char type, const QString & info);
+        void HaveRecord(bool isDemo, const QByteArray & record);
+        void ErrorMessage(const QString &);
 
-public slots:
-    void FromNet(const QByteArray & msg);
-    void FromNetChat(const QString & msg);
+    public slots:
+        void FromNet(const QByteArray & msg);
+        void FromNetChat(const QString & msg);
 
-private:
-    enum GameType {
-        gtLocal    = 1,
-        gtQLocal   = 2,
-        gtDemo     = 3,
-        gtNet      = 4,
-        gtTraining = 5,
-        gtCampaign = 6,
-        gtSave     = 7,
-    };
-    char msgbuf[MAXMSGCHARS];
-    QString ammostr;
-    GameUIConfig * config;
-    GameCFGWidget * gamecfg;
-    TeamSelWidget* m_pTeamSelWidget;
-    GameType gameType;
+    private:
+        enum GameType
+        {
+            gtLocal    = 1,
+            gtQLocal   = 2,
+            gtDemo     = 3,
+            gtNet      = 4,
+            gtTraining = 5,
+            gtCampaign = 6,
+            gtSave     = 7,
+        };
+        char msgbuf[MAXMSGCHARS];
+        QString ammostr;
+        GameUIConfig * config;
+        GameCFGWidget * gamecfg;
+        TeamSelWidget* m_pTeamSelWidget;
+        GameType gameType;
 
-    void commonConfig();
-    void SendConfig();
-    void SendQuickConfig();
-    void SendNetConfig();
-    void SendTrainingConfig();
-    void SendCampaignConfig();
-    void ParseMessage(const QByteArray & msg);
-    void SetGameState(GameState state);
+        void commonConfig();
+        void SendConfig();
+        void SendQuickConfig();
+        void SendNetConfig();
+        void SendTrainingConfig();
+        void SendCampaignConfig();
+        void ParseMessage(const QByteArray & msg);
+        void SetGameState(GameState state);
 };
 
 #endif