QTfrontend/gameuiconfig.cpp
branchflibqtfrontend
changeset 8246 6859b1afcbd4
parent 8216 4a7535d17d57
child 8266 927da572bcdc
equal deleted inserted replaced
8244:0f8893faeb00 8246:6859b1afcbd4
    48 {
    48 {
    49     Form = FormWidgets;
    49     Form = FormWidgets;
    50 
    50 
    51     setIniCodec("UTF-8");
    51     setIniCodec("UTF-8");
    52 
    52 
    53     connect(Form->ui.pageOptions->CBEnableFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
    53     connect(Form->ui.pageOptions->CBFrontendMusic, SIGNAL(toggled(bool)), Form, SLOT(Music(bool)));
    54 
    54 
    55     //Form->resize(value("frontend/width", 640).toUInt(), value("frontend/height", 450).toUInt());
    55     //Form->resize(value("frontend/width", 640).toUInt(), value("frontend/height", 450).toUInt());
    56     resizeToConfigValues();
    56     resizeToConfigValues();
    57 
    57 
    58     reloadValues();
    58     reloadValues();
    78     Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
    78     Form->ui.pageOptions->CBFrontendFullscreen->setChecked(ffscr);
    79 
    79 
    80     Form->ui.pageOptions->SLQuality->setValue(value("video/quality", 5).toUInt());
    80     Form->ui.pageOptions->SLQuality->setValue(value("video/quality", 5).toUInt());
    81     Form->ui.pageOptions->CBStereoMode->setCurrentIndex(value("video/stereo", 0).toUInt());
    81     Form->ui.pageOptions->CBStereoMode->setCurrentIndex(value("video/stereo", 0).toUInt());
    82     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
    82     Form->ui.pageOptions->CBFrontendEffects->setChecked(value("frontend/effects", true).toBool());
    83     Form->ui.pageOptions->CBEnableSound->setChecked(value("audio/sound", true).toBool());
    83     Form->ui.pageOptions->CBSound->setChecked(value("audio/sound", true).toBool());
    84     Form->ui.pageOptions->CBEnableFrontendSound->setChecked(value("frontend/sound", true).toBool());
    84     Form->ui.pageOptions->CBFrontendSound->setChecked(value("frontend/sound", true).toBool());
    85     Form->ui.pageOptions->CBEnableMusic->setChecked(value("audio/music", true).toBool());
    85     Form->ui.pageOptions->CBMusic->setChecked(value("audio/music", true).toBool());
    86     Form->ui.pageOptions->CBEnableFrontendMusic->setChecked(value("frontend/music", true).toBool());
    86     Form->ui.pageOptions->CBFrontendMusic->setChecked(value("frontend/music", true).toBool());
    87     Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
    87     Form->ui.pageOptions->volumeBox->setValue(value("audio/volume", 100).toUInt());
    88 
    88 
    89     QString netNick = value("net/nick", "").toString();
    89     QString netNick = value("net/nick", "").toString();
    90     Form->ui.pageOptions->editNetNick->setText(netNick);
    90     Form->ui.pageOptions->editNetNick->setText(netNick);
    91     bool savePwd = value("net/savepassword",true).toBool();
    91     bool savePwd = value("net/savepassword",true).toBool();
   395     return Form->ui.pageOptions->CBFrontendFullscreen->isChecked();
   395     return Form->ui.pageOptions->CBFrontendFullscreen->isChecked();
   396 }
   396 }
   397 
   397 
   398 bool GameUIConfig::isSoundEnabled()
   398 bool GameUIConfig::isSoundEnabled()
   399 {
   399 {
   400     return Form->ui.pageOptions->CBEnableSound->isChecked();
   400     return Form->ui.pageOptions->CBSound->isChecked();
   401 }
   401 }
   402 bool GameUIConfig::isFrontendSoundEnabled()
   402 bool GameUIConfig::isFrontendSoundEnabled()
   403 {
   403 {
   404     return Form->ui.pageOptions->CBEnableFrontendSound->isChecked();
   404     return Form->ui.pageOptions->CBFrontendSound->isChecked();
   405 }
   405 }
   406 
   406 
   407 bool GameUIConfig::isMusicEnabled()
   407 bool GameUIConfig::isMusicEnabled()
   408 {
   408 {
   409     return Form->ui.pageOptions->CBEnableMusic->isChecked();
   409     return Form->ui.pageOptions->CBMusic->isChecked();
   410 }
   410 }
   411 bool GameUIConfig::isFrontendMusicEnabled()
   411 bool GameUIConfig::isFrontendMusicEnabled()
   412 {
   412 {
   413     return Form->ui.pageOptions->CBEnableFrontendMusic->isChecked();
   413     return Form->ui.pageOptions->CBFrontendMusic->isChecked();
   414 }
   414 }
   415 
   415 
   416 bool GameUIConfig::isShowFPSEnabled()
   416 bool GameUIConfig::isShowFPSEnabled()
   417 {
   417 {
   418     return Form->ui.pageOptions->CBShowFPS->isChecked();
   418     return Form->ui.pageOptions->CBShowFPS->isChecked();