QTfrontend/ui/page/pageoptions.h
branchwebgl
changeset 8444 75db7bb8dce8
parent 8387 f9d1191476ce
child 8902 a94c074fd483
equal deleted inserted replaced
8340:46a9fde631f4 8444:75db7bb8dce8
    17  */
    17  */
    18 
    18 
    19 #ifndef PAGE_OPTIONS_H
    19 #ifndef PAGE_OPTIONS_H
    20 #define PAGE_OPTIONS_H
    20 #define PAGE_OPTIONS_H
    21 
    21 
       
    22 #include "igbox.h"
    22 #include "AbstractPage.h"
    23 #include "AbstractPage.h"
       
    24 
       
    25 #include <QString>
    23 
    26 
    24 class GameUIConfig;
    27 class GameUIConfig;
    25 class FPSEdit;
    28 class FPSEdit;
    26 class IconedGroupBox;
       
    27 class QSignalMapper;
    29 class QSignalMapper;
       
    30 class KeyBinder;
       
    31 class QGridLayout;
       
    32 
       
    33 // Let's stay D-R-Y
       
    34 class OptionGroupBox : public IconedGroupBox
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38     public:
       
    39         OptionGroupBox(const QString & iconName,
       
    40                        const QString & title,
       
    41                        QWidget * parent = 0);
       
    42         QGridLayout * layout();
       
    43         void addDivider();
       
    44 
       
    45     private:
       
    46         QGridLayout * m_layout;
       
    47 };
    28 
    48 
    29 class PageOptions : public AbstractPage
    49 class PageOptions : public AbstractPage
    30 {
    50 {
    31         Q_OBJECT
    51         Q_OBJECT
    32 
    52 
    55         IconedGroupBox *teamsBox;
    75         IconedGroupBox *teamsBox;
    56         QPushButton *BtnAssociateFiles;
    76         QPushButton *BtnAssociateFiles;
    57         QComboBox *CBTeamName;
    77         QComboBox *CBTeamName;
    58         IconedGroupBox *AGGroupBox;
    78         IconedGroupBox *AGGroupBox;
    59         QComboBox *CBResolution;
    79         QComboBox *CBResolution;
       
    80         QLineEdit *windowWidthEdit;
       
    81         QLineEdit *windowHeightEdit;
    60         QComboBox *CBStereoMode;
    82         QComboBox *CBStereoMode;
    61         QCheckBox *CBFrontendSound;
    83         QCheckBox *CBFrontendSound;
    62         QCheckBox *CBFrontendMusic;
    84         QCheckBox *CBFrontendMusic;
    63         QCheckBox *CBSound;
    85         QCheckBox *CBSound;
    64         QCheckBox *CBMusic;
    86         QCheckBox *CBMusic;
    73         QPushButton *BtnUpdateNow;
    95         QPushButton *BtnUpdateNow;
    74 #endif
    96 #endif
    75 
    97 
    76         FPSEdit *fpsedit;
    98         FPSEdit *fpsedit;
    77         QLabel *labelNN;
    99         QLabel *labelNN;
    78         QSpinBox * volumeBox;
   100         QSlider *SLVolume;
       
   101         QLabel *lblVolumeLevel;
    79         QLineEdit *editNetNick;
   102         QLineEdit *editNetNick;
    80         QLineEdit *editNetPassword;
   103         QLineEdit *editNetPassword;
    81         QSlider *SLQuality;
   104         QSlider *SLQuality;
    82         QCheckBox *CBFrontendEffects;
   105         QCheckBox *CBFrontendEffects;
    83         QComboBox * cbProxyType;
   106         QComboBox * cbProxyType;
   116 
   139 
   117     private:
   140     private:
   118         QLayout * bodyLayoutDefinition();
   141         QLayout * bodyLayoutDefinition();
   119         QLayout * footerLayoutDefinition();
   142         QLayout * footerLayoutDefinition();
   120         void connectSignals();
   143         void connectSignals();
       
   144         int resetBindToDefault(int bindID);
       
   145         void setupTabPage(QWidget * tabpage, QVBoxLayout ** leftColumn, QVBoxLayout ** rightColumn);
   121 
   146 
   122         bool previousFullscreenValue;
   147         bool previousFullscreenValue;
   123         int previousResolutionIndex;
   148         int previousResolutionIndex;
   124         int previousQuality;
   149         int previousQuality;
   125         QLabel *LblNoEditTeam;
   150         QLabel *LblNoEditTeam;
   132         QComboBox *comboVideoCodecs;
   157         QComboBox *comboVideoCodecs;
   133         QComboBox *comboAudioCodecs;
   158         QComboBox *comboAudioCodecs;
   134         QPushButton *btnDefaults;
   159         QPushButton *btnDefaults;
   135         QPushButton *btnUpdateNow;
   160         QPushButton *btnUpdateNow;
   136         GameUIConfig * config;
   161         GameUIConfig * config;
       
   162         KeyBinder * binder;
       
   163         int currentTab;
       
   164         int binderTab;
       
   165 
       
   166         QLabel * lblFullScreenRes;
       
   167         QLabel * lblWinScreenRes;
       
   168         QWidget * winResContainer;
   137 
   169 
   138     private slots:
   170     private slots:
   139         void forceFullscreen(int index);
   171         void forceFullscreen(int index);
   140         void setFullscreen(int state);
   172         void setFullscreen(int state);
   141         void setResolution(int state);
   173         void setResolution(int state);
   149         void onProxyTypeChanged();
   181         void onProxyTypeChanged();
   150         void changeAVFormat(int index);
   182         void changeAVFormat(int index);
   151         void changeUseGameRes(int state);
   183         void changeUseGameRes(int state);
   152         void changeRecordAudio(int state);
   184         void changeRecordAudio(int state);
   153         void checkForUpdates();
   185         void checkForUpdates();
       
   186         void tabIndexChanged(int);
       
   187         void bindUpdated(int bindID);
       
   188         void resetAllBinds();
       
   189         void setVolume(int);
   154 
   190 
   155     public slots:
   191     public slots:
   156         void setDefaultOptions();
   192         void setDefaultOptions();
   157 };
   193 };
   158 
   194