diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-29 20:03:47 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-29 20:03:47 +0100 |
| commit | 7610e3139408a8947795140a14a6bd396d4e0f71 (patch) | |
| tree | ec329fd049debd8f71e278ebba3280c6fe2270ce /src/settingsdialogworkarounds.cpp | |
| parent | d0796b4ab23122d5f01378743d93f8c75b19c35c (diff) | |
Reorganize settingsdialog classes to match UI.
Diffstat (limited to 'src/settingsdialogworkarounds.cpp')
| -rw-r--r-- | src/settingsdialogworkarounds.cpp | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/src/settingsdialogworkarounds.cpp b/src/settingsdialogworkarounds.cpp index 5a4b15ca..17b2259b 100644 --- a/src/settingsdialogworkarounds.cpp +++ b/src/settingsdialogworkarounds.cpp @@ -8,12 +8,26 @@ WorkaroundsSettingsTab::WorkaroundsSettingsTab(Settings& s, SettingsDialog& d) : SettingsTab(s, d) { - ui->appIDEdit->setText(settings().steam().appID()); - + // options ui->forceEnableBox->setChecked(settings().game().forceEnableCoreFiles()); ui->lockGUIBox->setChecked(settings().interface().lockGUI()); ui->enableArchiveParsingBox->setChecked(settings().archiveParsing()); + // steam + QString username, password; + settings().steam().login(username, password); + + ui->appIDEdit->setText(settings().steam().appID()); + ui->steamUserEdit->setText(username); + ui->steamPassEdit->setText(password); + + // network + ui->offlineBox->setChecked(settings().network().offlineMode()); + ui->proxyBox->setChecked(settings().network().useProxy()); + ui->useCustomBrowser->setChecked(settings().network().useCustomBrowser()); + ui->browserCommand->setText(settings().network().customBrowserCommand()); + + // buttons m_ExecutableBlacklist = settings().executablesBlacklist(); QObject::connect(ui->bsaDateBtn, &QPushButton::clicked, [&]{ on_bsaDateBtn_clicked(); }); @@ -23,15 +37,26 @@ WorkaroundsSettingsTab::WorkaroundsSettingsTab(Settings& s, SettingsDialog& d) void WorkaroundsSettingsTab::update() { + // options + settings().game().setForceEnableCoreFiles(ui->forceEnableBox->isChecked()); + settings().interface().setLockGUI(ui->lockGUIBox->isChecked()); + settings().setArchiveParsing(ui->enableArchiveParsingBox->isChecked()); + + // steam if (ui->appIDEdit->text() != settings().game().plugin()->steamAPPId()) { settings().steam().setAppID(ui->appIDEdit->text()); } else { settings().steam().setAppID(""); } + settings().steam().setLogin(ui->steamUserEdit->text(), ui->steamPassEdit->text()); - settings().game().setForceEnableCoreFiles(ui->forceEnableBox->isChecked()); - settings().interface().setLockGUI(ui->lockGUIBox->isChecked()); - settings().setArchiveParsing(ui->enableArchiveParsingBox->isChecked()); + // network + settings().network().setOfflineMode(ui->offlineBox->isChecked()); + settings().network().setUseProxy(ui->proxyBox->isChecked()); + settings().network().setUseCustomBrowser(ui->useCustomBrowser->isChecked()); + settings().network().setCustomBrowserCommand(ui->browserCommand->text()); + + // buttons settings().setExecutablesBlacklist(m_ExecutableBlacklist); } |
