QTfrontend/hwform.h
branchwebgl
changeset 8330 aaefa587e277
parent 8328 03684c667664
child 8444 75db7bb8dce8
equal deleted inserted replaced
8116:d24257910f8d 8330:aaefa587e277
    59 
    59 
    60     public:
    60     public:
    61         HWForm(QWidget *parent = 0, QString styleSheet = "");
    61         HWForm(QWidget *parent = 0, QString styleSheet = "");
    62         Ui_HWForm ui;
    62         Ui_HWForm ui;
    63         static GameUIConfig * config;
    63         static GameUIConfig * config;
    64         static QSettings * gameSettings; // Same file GameUIConfig points to but without the baggage.  Needs sync() calls if you want to get GameUIConfig changes though
       
    65         void updateXfire();
    64         void updateXfire();
    66         void PlayDemoQuick(const QString & demofilename);
    65         void PlayDemoQuick(const QString & demofilename);
    67         void exit();
    66         void exit();
    68         void setButtonDescription(QString desc);
    67         void setButtonDescription(QString desc);
    69         void backDescription();
    68         void backDescription();
   104         void NetConnected();
   103         void NetConnected();
   105         void NetError(const QString & errmsg);
   104         void NetError(const QString & errmsg);
   106         void NetWarning(const QString & wrnmsg);
   105         void NetWarning(const QString & wrnmsg);
   107         void NetGameEnter();
   106         void NetGameEnter();
   108         void NetPassword(const QString & nick);
   107         void NetPassword(const QString & nick);
       
   108         void NetNickRegistered(const QString & nick);
       
   109         void NetNickNotRegistered(const QString & nick);
   109         void NetNickTaken(const QString & nick);
   110         void NetNickTaken(const QString & nick);
   110         void NetAuthFailed();
   111         void NetAuthFailed();
       
   112     bool RetryDialog(const QString & title, const QString & label);
   111         void NetTeamAccepted(const QString& team);
   113         void NetTeamAccepted(const QString& team);
   112         void AddNetTeam(const HWTeam& team);
   114         void AddNetTeam(const HWTeam& team);
   113         void RemoveNetTeam(const HWTeam& team);
   115         void RemoveNetTeam(const HWTeam& team);
   114         void StartMPGame();
   116         void StartMPGame();
   115         void GameStateChanged(GameState gameState);
   117         void GameStateChanged(GameState gameState);
   124         void UpdateCampaignPage(int index);
   126         void UpdateCampaignPage(int index);
   125         void UpdateCampaignPageProgress(int index);
   127         void UpdateCampaignPageProgress(int index);
   126         void InitCampaignPage();
   128         void InitCampaignPage();
   127         //Starts the transmission process for the feedback
   129         //Starts the transmission process for the feedback
   128         void SendFeedback();
   130         void SendFeedback();
   129         //Make a xml representation of the issue to be created
   131         //Called after submitting new feedback
   130         bool CreateIssueXml();
       
   131         //Called the first time when receiving authorization token from google,
       
   132         //second time when receiving the response after posting the issue
       
   133         void finishedSlot(QNetworkReply* reply);
   132         void finishedSlot(QNetworkReply* reply);
   134         //Filter the auth token from the reply from google
       
   135         bool getAuthToken(QString str);
       
   136 
   133 
   137         void NetGameChangeStatus(bool isMaster);
   134         void NetGameChangeStatus(bool isMaster);
   138         void NetGameMaster();
   135         void NetGameMaster();
   139         void NetGameSlave();
   136         void NetGameSlave();
   140 
   137 
   144 
   141 
   145         void saveDemoWithCustomName();
   142         void saveDemoWithCustomName();
   146 
   143 
   147     private:
   144     private:
   148         void _NetConnect(const QString & hostName, quint16 port, QString nick);
   145         void _NetConnect(const QString & hostName, quint16 port, QString nick);
   149         void UpdateTeamsLists(const QStringList* editable_teams=0);
   146         void UpdateTeamsLists();
   150         void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo);
   147         void CreateGame(GameCFGWidget * gamecfg, TeamSelWidget* pTeamSelWidget, QString ammo);
   151         void closeEvent(QCloseEvent *event);
   148         void closeEvent(QCloseEvent *event);
   152         void CustomizePalettes();
   149         void CustomizePalettes();
   153         void resizeEvent(QResizeEvent * event);
   150         void resizeEvent(QResizeEvent * event);
   154         //void keyReleaseEvent(QKeyEvent *event);
   151         //void keyReleaseEvent(QKeyEvent *event);
   171             ID_PAGE_INGAME         ,
   168             ID_PAGE_INGAME         ,
   172             ID_PAGE_ROOMSLIST      ,
   169             ID_PAGE_ROOMSLIST      ,
   173             ID_PAGE_CONNECTING     ,
   170             ID_PAGE_CONNECTING     ,
   174             ID_PAGE_SCHEME         ,
   171             ID_PAGE_SCHEME         ,
   175             ID_PAGE_ADMIN          ,
   172             ID_PAGE_ADMIN          ,
   176             ID_PAGE_NETTYPE        ,
       
   177             ID_PAGE_CAMPAIGN       ,
   173             ID_PAGE_CAMPAIGN       ,
   178             ID_PAGE_DRAWMAP        ,
   174             ID_PAGE_DRAWMAP        ,
   179             ID_PAGE_DATADOWNLOAD   ,
   175             ID_PAGE_DATADOWNLOAD   ,
   180             ID_PAGE_FEEDBACK	   ,
   176             ID_PAGE_FEEDBACK       ,
   181             ID_PAGE_VIDEOS,
   177             ID_PAGE_VIDEOS     ,
   182 	    MAX_PAGE
   178             MAX_PAGE
   183         };
   179         };
   184         QPointer<HWGame> game;
   180         QPointer<HWGame> game;
   185         QPointer<HWNetServer> pnetserver;
   181         QPointer<HWNetServer> pnetserver;
   186         QPointer<HWNetRegisterServer> pRegisterServer;
   182         QPointer<HWNetRegisterServer> pRegisterServer;
   187         QPointer<HWTeam> editedTeam;
   183         QPointer<HWTeam> editedTeam;
   192         QTime eggTimer;
   188         QTime eggTimer;
   193         BGWidget * wBackground;
   189         BGWidget * wBackground;
   194         QSignalMapper * pageSwitchMapper;
   190         QSignalMapper * pageSwitchMapper;
   195         QByteArray m_lastDemo;
   191         QByteArray m_lastDemo;
   196         QNetworkAccessManager * nam;
   192         QNetworkAccessManager * nam;
   197         QString issueXml;
       
   198         QString authToken;
       
   199 
   193 
   200         QPropertyAnimation *animationNewSlide;
   194         QPropertyAnimation *animationNewSlide;
   201         QPropertyAnimation *animationOldSlide;
   195         QPropertyAnimation *animationOldSlide;
   202         QPropertyAnimation *animationNewOpacity;
   196         QPropertyAnimation *animationNewOpacity;
   203         QPropertyAnimation *animationOldOpacity;
   197         QPropertyAnimation *animationOldOpacity;