137 } |
137 } |
138 } |
138 } |
139 |
139 |
140 void GameUIConfig::reloadVideosValues(void) |
140 void GameUIConfig::reloadVideosValues(void) |
141 { |
141 { |
142 Form->ui.pageVideos->framerateBox->setValue(value("videorec/fps",25).toUInt()); |
142 Form->ui.pageOptions->framerateBox->setValue(value("videorec/fps",25).toUInt()); |
143 Form->ui.pageVideos->bitrateBox->setValue(value("videorec/bitrate",400).toUInt()); |
143 Form->ui.pageOptions->bitrateBox->setValue(value("videorec/bitrate",400).toUInt()); |
144 bool useGameRes = value("videorec/usegameres",true).toBool(); |
144 bool useGameRes = value("videorec/usegameres",true).toBool(); |
145 if (useGameRes) |
145 if (useGameRes) |
146 { |
146 { |
147 QRect res = vid_Resolution(); |
147 QRect res = vid_Resolution(); |
148 Form->ui.pageVideos->widthEdit->setText(QString::number(res.width())); |
148 Form->ui.pageOptions->widthEdit->setText(QString::number(res.width())); |
149 Form->ui.pageVideos->heightEdit->setText(QString::number(res.height())); |
149 Form->ui.pageOptions->heightEdit->setText(QString::number(res.height())); |
150 } |
150 } |
151 else |
151 else |
152 { |
152 { |
153 Form->ui.pageVideos->widthEdit->setText(value("videorec/width","800").toString()); |
153 Form->ui.pageOptions->widthEdit->setText(value("videorec/width","800").toString()); |
154 Form->ui.pageVideos->heightEdit->setText(value("videorec/height","600").toString()); |
154 Form->ui.pageOptions->heightEdit->setText(value("videorec/height","600").toString()); |
155 } |
155 } |
156 Form->ui.pageVideos->checkUseGameRes->setChecked(useGameRes); |
156 Form->ui.pageOptions->checkUseGameRes->setChecked(useGameRes); |
157 Form->ui.pageVideos->checkRecordAudio->setChecked(value("videorec/audio",true).toBool()); |
157 Form->ui.pageOptions->checkRecordAudio->setChecked(value("videorec/audio",true).toBool()); |
158 if (!Form->ui.pageVideos->tryCodecs(value("videorec/format","no").toString(), |
158 if (!Form->ui.pageOptions->tryCodecs(value("videorec/format","no").toString(), |
159 value("videorec/videocodec","no").toString(), |
159 value("videorec/videocodec","no").toString(), |
160 value("videorec/audiocodec","no").toString())) |
160 value("videorec/audiocodec","no").toString())) |
161 Form->ui.pageVideos->setDefaultCodecs(); |
161 Form->ui.pageOptions->setDefaultCodecs(); |
162 } |
162 } |
163 |
163 |
164 QStringList GameUIConfig::GetTeamsList() |
164 QStringList GameUIConfig::GetTeamsList() |
165 { |
165 { |
166 QDir teamdir; |
166 QDir teamdir; |
281 setValue("videorec/audiocodec", audioCodec()); |
281 setValue("videorec/audiocodec", audioCodec()); |
282 setValue("videorec/fps", rec_Framerate()); |
282 setValue("videorec/fps", rec_Framerate()); |
283 setValue("videorec/bitrate", rec_Bitrate()); |
283 setValue("videorec/bitrate", rec_Bitrate()); |
284 setValue("videorec/width", res.width()); |
284 setValue("videorec/width", res.width()); |
285 setValue("videorec/height", res.height()); |
285 setValue("videorec/height", res.height()); |
286 setValue("videorec/usegameres", Form->ui.pageVideos->checkUseGameRes->isChecked()); |
286 setValue("videorec/usegameres", Form->ui.pageOptions->checkUseGameRes->isChecked()); |
287 setValue("videorec/audio", recordAudio()); |
287 setValue("videorec/audio", recordAudio()); |
288 |
288 |
289 Form->gameSettings->sync(); |
289 Form->gameSettings->sync(); |
290 } |
290 } |
291 |
291 |
485 return Form->ui.pageOptions->volumeBox->value() * 128 / 100; |
485 return Form->ui.pageOptions->volumeBox->value() * 128 / 100; |
486 } |
486 } |
487 |
487 |
488 QString GameUIConfig::AVFormat() |
488 QString GameUIConfig::AVFormat() |
489 { |
489 { |
490 return Form->ui.pageVideos->format(); |
490 return Form->ui.pageOptions->format(); |
491 } |
491 } |
492 |
492 |
493 QString GameUIConfig::videoCodec() |
493 QString GameUIConfig::videoCodec() |
494 { |
494 { |
495 return Form->ui.pageVideos->videoCodec(); |
495 return Form->ui.pageOptions->videoCodec(); |
496 } |
496 } |
497 |
497 |
498 QString GameUIConfig::audioCodec() |
498 QString GameUIConfig::audioCodec() |
499 { |
499 { |
500 return Form->ui.pageVideos->audioCodec(); |
500 return Form->ui.pageOptions->audioCodec(); |
501 } |
501 } |
502 |
502 |
503 QRect GameUIConfig::rec_Resolution() |
503 QRect GameUIConfig::rec_Resolution() |
504 { |
504 { |
505 if (Form->ui.pageVideos->checkUseGameRes->isChecked()) |
505 if (Form->ui.pageOptions->checkUseGameRes->isChecked()) |
506 return vid_Resolution(); |
506 return vid_Resolution(); |
507 QRect res(0,0,0,0); |
507 QRect res(0,0,0,0); |
508 res.setWidth(Form->ui.pageVideos->widthEdit->text().toUInt()); |
508 res.setWidth(Form->ui.pageOptions->widthEdit->text().toUInt()); |
509 res.setHeight(Form->ui.pageVideos->heightEdit->text().toUInt()); |
509 res.setHeight(Form->ui.pageOptions->heightEdit->text().toUInt()); |
510 return res; |
510 return res; |
511 } |
511 } |
512 |
512 |
513 int GameUIConfig::rec_Framerate() |
513 int GameUIConfig::rec_Framerate() |
514 { |
514 { |
515 return Form->ui.pageVideos->framerateBox->value(); |
515 return Form->ui.pageOptions->framerateBox->value(); |
516 } |
516 } |
517 |
517 |
518 int GameUIConfig::rec_Bitrate() |
518 int GameUIConfig::rec_Bitrate() |
519 { |
519 { |
520 return Form->ui.pageVideos->bitrateBox->value(); |
520 return Form->ui.pageOptions->bitrateBox->value(); |
521 } |
521 } |
522 |
522 |
523 bool GameUIConfig::recordAudio() |
523 bool GameUIConfig::recordAudio() |
524 { |
524 { |
525 return Form->ui.pageVideos->checkRecordAudio->isChecked(); |
525 return Form->ui.pageOptions->checkRecordAudio->isChecked(); |
526 } |
526 } |