QTfrontend/ui/page/pageoptions.h
branchwebgl
changeset 8330 aaefa587e277
parent 8284 a874d00df4a4
child 8343 aa4ea3cade3c
child 8346 3443e0de2c9d
equal deleted inserted replaced
8116:d24257910f8d 8330:aaefa587e277
    19 #ifndef PAGE_OPTIONS_H
    19 #ifndef PAGE_OPTIONS_H
    20 #define PAGE_OPTIONS_H
    20 #define PAGE_OPTIONS_H
    21 
    21 
    22 #include "AbstractPage.h"
    22 #include "AbstractPage.h"
    23 
    23 
       
    24 class GameUIConfig;
    24 class FPSEdit;
    25 class FPSEdit;
    25 class IconedGroupBox;
    26 class IconedGroupBox;
    26 class QSignalMapper;
    27 class QSignalMapper;
    27 
    28 
    28 class PageOptions : public AbstractPage
    29 class PageOptions : public AbstractPage
    55         QPushButton *BtnAssociateFiles;
    56         QPushButton *BtnAssociateFiles;
    56         QComboBox *CBTeamName;
    57         QComboBox *CBTeamName;
    57         IconedGroupBox *AGGroupBox;
    58         IconedGroupBox *AGGroupBox;
    58         QComboBox *CBResolution;
    59         QComboBox *CBResolution;
    59         QComboBox *CBStereoMode;
    60         QComboBox *CBStereoMode;
    60         QCheckBox *CBEnableSound;
    61         QCheckBox *CBFrontendSound;
    61         QCheckBox *CBEnableFrontendSound;
    62         QCheckBox *CBFrontendMusic;
    62         QCheckBox *CBEnableMusic;
    63         QCheckBox *CBSound;
    63         QCheckBox *CBEnableFrontendMusic;
    64         QCheckBox *CBMusic;
    64         QCheckBox *CBFullscreen;
    65         QCheckBox *CBFullscreen;
    65         QCheckBox *CBFrontendFullscreen;
    66         QCheckBox *CBFrontendFullscreen;
    66         QCheckBox *CBShowFPS;
    67         QCheckBox *CBShowFPS;
    67         QCheckBox *CBSavePassword;
    68         QCheckBox *CBSavePassword;
    68         QCheckBox *CBAltDamage;
    69         QCheckBox *CBAltDamage;
    69         QCheckBox *CBNameWithDate;
    70         QCheckBox *CBNameWithDate;
    70 #ifdef __APPLE__
    71 #ifdef __APPLE__
    71         QCheckBox *CBAutoUpdate;
    72         QCheckBox *CBAutoUpdate;
       
    73         QPushButton *BtnUpdateNow;
    72 #endif
    74 #endif
    73 
    75 
    74         FPSEdit *fpsedit;
    76         FPSEdit *fpsedit;
    75         QLabel *labelNN;
    77         QLabel *labelNN;
    76         QSpinBox * volumeBox;
    78         QSpinBox * volumeBox;
    81         QComboBox * cbProxyType;
    83         QComboBox * cbProxyType;
    82         QSpinBox * sbProxyPort;
    84         QSpinBox * sbProxyPort;
    83         QLineEdit * leProxy;
    85         QLineEdit * leProxy;
    84         QLineEdit * leProxyLogin;
    86         QLineEdit * leProxyLogin;
    85         QLineEdit * leProxyPassword;
    87         QLineEdit * leProxyPassword;
       
    88 
       
    89         QComboBox  *framerateBox;
       
    90         QSpinBox  *bitrateBox;
       
    91         QLineEdit *widthEdit;
       
    92         QLineEdit *heightEdit;
       
    93         QCheckBox *checkUseGameRes;
       
    94         QCheckBox *checkRecordAudio;
       
    95 
       
    96         QString format()
       
    97         { return comboAVFormats->itemData(comboAVFormats->currentIndex()).toString(); }
       
    98 
       
    99         QString videoCodec()
       
   100         { return comboVideoCodecs->itemData(comboVideoCodecs->currentIndex()).toString(); }
       
   101 
       
   102         QString audioCodec()
       
   103         { return comboAudioCodecs->itemData(comboAudioCodecs->currentIndex()).toString(); }
       
   104 
       
   105         void setDefaultCodecs();
       
   106         bool tryCodecs(const QString & format, const QString & vcodec, const QString & acodec);
       
   107         void setConfig(GameUIConfig * config);
    86 
   108 
    87         void setTeamOptionsEnabled(bool enabled);
   109         void setTeamOptionsEnabled(bool enabled);
    88 
   110 
    89     signals:
   111     signals:
    90         void newTeamRequested();
   112         void newTeamRequested();
   104         QPushButton *BtnNewTeam;
   126         QPushButton *BtnNewTeam;
   105         QPushButton *BtnEditTeam;
   127         QPushButton *BtnEditTeam;
   106         QPushButton *BtnDeleteTeam;
   128         QPushButton *BtnDeleteTeam;
   107         QList<QPushButton *> m_colorButtons;
   129         QList<QPushButton *> m_colorButtons;
   108 
   130 
       
   131         QComboBox *comboAVFormats;
       
   132         QComboBox *comboVideoCodecs;
       
   133         QComboBox *comboAudioCodecs;
       
   134         QPushButton *btnDefaults;
       
   135         QPushButton *btnUpdateNow;
       
   136         GameUIConfig * config;
       
   137 
   109     private slots:
   138     private slots:
   110         void forceFullscreen(int index);
   139         void forceFullscreen(int index);
   111         void setFullscreen(int state);
   140         void setFullscreen(int state);
   112         void setResolution(int state);
   141         void setResolution(int state);
   113         void setQuality(int value);
   142         void setQuality(int value);
   116         void requestDeleteSelectedTeam();
   145         void requestDeleteSelectedTeam();
   117         void savePwdChanged(int state);
   146         void savePwdChanged(int state);
   118         void colorButtonClicked(int i);
   147         void colorButtonClicked(int i);
   119         void onColorModelDataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
   148         void onColorModelDataChanged(const QModelIndex & topLeft, const QModelIndex & bottomRight);
   120         void onProxyTypeChanged();
   149         void onProxyTypeChanged();
       
   150         void changeAVFormat(int index);
       
   151         void changeUseGameRes(int state);
       
   152         void changeRecordAudio(int state);
       
   153         void checkForUpdates();
       
   154 
       
   155     public slots:
       
   156         void setDefaultOptions();
   121 };
   157 };
   122 
   158 
   123 #endif
   159 #endif
   124 
   160