diff options
| author | 2017-08-22 23:36:57 -0400 | |
|---|---|---|
| committer | 2017-08-25 23:10:01 -0400 | |
| commit | fb17e866aa58db05d4d16ba861b1150e6187592e (patch) | |
| tree | 2a41d90d64913b304df6a9b4821e6ef3878efb7d /src/citra_qt/configuration/configure_web.cpp | |
| parent | web_backend: User config for username and token, support anonymous post. (diff) | |
| download | yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.gz yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.xz yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.zip | |
qt: Add web configuration tab.
Diffstat (limited to 'src/citra_qt/configuration/configure_web.cpp')
| -rw-r--r-- | src/citra_qt/configuration/configure_web.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/src/citra_qt/configuration/configure_web.cpp b/src/citra_qt/configuration/configure_web.cpp new file mode 100644 index 000000000..fff466aaa --- /dev/null +++ b/src/citra_qt/configuration/configure_web.cpp | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | // Copyright 2017 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #include "citra_qt/configuration/configure_web.h" | ||
| 6 | #include "core/settings.h" | ||
| 7 | #include "ui_configure_web.h" | ||
| 8 | |||
| 9 | ConfigureWeb::ConfigureWeb(QWidget* parent) | ||
| 10 | : QWidget(parent), ui(std::make_unique<Ui::ConfigureWeb>()) { | ||
| 11 | ui->setupUi(this); | ||
| 12 | this->setConfiguration(); | ||
| 13 | } | ||
| 14 | |||
| 15 | ConfigureWeb::~ConfigureWeb() {} | ||
| 16 | |||
| 17 | void ConfigureWeb::setConfiguration() { | ||
| 18 | ui->web_credentials_disclaimer->setWordWrap(true); | ||
| 19 | ui->telemetry_learn_more->setOpenExternalLinks(true); | ||
| 20 | ui->telemetry_learn_more->setText("<a " | ||
| 21 | "href='https://citra-emu.org/entry/" | ||
| 22 | "telemetry-and-why-thats-a-good-thing/'>Learn more</a>"); | ||
| 23 | |||
| 24 | ui->web_signup_link->setOpenExternalLinks(true); | ||
| 25 | ui->web_signup_link->setText("<a href='https://services.citra-emu.org/'>Sign up</a>"); | ||
| 26 | ui->web_token_info_link->setOpenExternalLinks(true); | ||
| 27 | ui->web_token_info_link->setText( | ||
| 28 | "<a href='https://citra-emu.org/wiki/citra-web-service/'>What is my token?</a>"); | ||
| 29 | |||
| 30 | ui->toggle_telemetry->setChecked(Settings::values.enable_telemetry); | ||
| 31 | ui->edit_username->setText(QString::fromStdString(Settings::values.citra_username)); | ||
| 32 | ui->edit_token->setText(QString::fromStdString(Settings::values.citra_token)); | ||
| 33 | |||
| 34 | updateWeb(); | ||
| 35 | } | ||
| 36 | |||
| 37 | void ConfigureWeb::applyConfiguration() { | ||
| 38 | Settings::values.enable_telemetry = ui->toggle_telemetry->isChecked(); | ||
| 39 | Settings::values.citra_username = ui->edit_username->text().toStdString(); | ||
| 40 | Settings::values.citra_token = ui->edit_token->text().toStdString(); | ||
| 41 | Settings::Apply(); | ||
| 42 | } | ||
| 43 | |||
| 44 | void ConfigureWeb::updateWeb() {} | ||