diff options
author | bunnei <bunneidev@gmail.com> | 2017-08-23 05:36:57 +0200 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2017-08-26 05:10:01 +0200 |
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 yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.gz yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.bz2 yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.lz yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.xz yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.tar.zst yuzu-fb17e866aa58db05d4d16ba861b1150e6187592e.zip |
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 @@ +// Copyright 2017 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#include "citra_qt/configuration/configure_web.h" +#include "core/settings.h" +#include "ui_configure_web.h" + +ConfigureWeb::ConfigureWeb(QWidget* parent) + : QWidget(parent), ui(std::make_unique<Ui::ConfigureWeb>()) { + ui->setupUi(this); + this->setConfiguration(); +} + +ConfigureWeb::~ConfigureWeb() {} + +void ConfigureWeb::setConfiguration() { + ui->web_credentials_disclaimer->setWordWrap(true); + ui->telemetry_learn_more->setOpenExternalLinks(true); + ui->telemetry_learn_more->setText("<a " + "href='https://citra-emu.org/entry/" + "telemetry-and-why-thats-a-good-thing/'>Learn more</a>"); + + ui->web_signup_link->setOpenExternalLinks(true); + ui->web_signup_link->setText("<a href='https://services.citra-emu.org/'>Sign up</a>"); + ui->web_token_info_link->setOpenExternalLinks(true); + ui->web_token_info_link->setText( + "<a href='https://citra-emu.org/wiki/citra-web-service/'>What is my token?</a>"); + + ui->toggle_telemetry->setChecked(Settings::values.enable_telemetry); + ui->edit_username->setText(QString::fromStdString(Settings::values.citra_username)); + ui->edit_token->setText(QString::fromStdString(Settings::values.citra_token)); + + updateWeb(); +} + +void ConfigureWeb::applyConfiguration() { + Settings::values.enable_telemetry = ui->toggle_telemetry->isChecked(); + Settings::values.citra_username = ui->edit_username->text().toStdString(); + Settings::values.citra_token = ui->edit_token->text().toStdString(); + Settings::Apply(); +} + +void ConfigureWeb::updateWeb() {} |