Wizard: add websocket toggle page

This commit is contained in:
tobtoht
2022-06-22 23:01:44 +02:00
parent 1c14e9789a
commit cf46f1fe58
8 changed files with 153 additions and 13 deletions
+29
View File
@@ -0,0 +1,29 @@
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2020-2022 The Monero Project
#include "PageNetworkWebsocket.h"
#include "ui_PageNetworkWebsocket.h"
#include "WalletWizard.h"
PageNetworkWebsocket::PageNetworkWebsocket(QWidget *parent)
: QWizardPage(parent)
, ui(new Ui::PageNetworkWebsocket)
{
ui->setupUi(this);
this->setCommitPage(true);
this->setButtonText(QWizard::CommitButton, "Next");
}
int PageNetworkWebsocket::nextId() const {
return WalletWizard::Page_Menu;
}
bool PageNetworkWebsocket::validatePage() {
bool disabled = ui->btn_disable->isChecked();
config()->set(Config::disableWebsocket, disabled);
emit initialNetworkConfigured();
return true;
}