feather/src/wizard/PageNetworkProxy.cpp
2024-01-01 18:07:58 +01:00

43 lines
No EOL
1 KiB
C++

// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2020-2024 The Monero Project
#include "PageNetworkProxy.h"
#include "ui_PageNetworkProxy.h"
#include "WalletWizard.h"
#include <QSysInfo>
PageNetworkProxy::PageNetworkProxy(QWidget *parent)
: QWizardPage(parent)
, ui(new Ui::PageNetworkProxy)
{
ui->setupUi(this);
connect(ui->radio_configureManually, &QRadioButton::toggled, [this](bool checked){
ui->frame_privacyLevel->setVisible(checked);
this->adjustSize();
this->updateGeometry();
});
ui->proxyWidget->setDisableTorLogs();
}
void PageNetworkProxy::initializePage() {
// Fuck you Qt. No squish.
QTimer::singleShot(1, [this]{
ui->frame_privacyLevel->setVisible(false);
});
}
int PageNetworkProxy::nextId() const {
return WalletWizard::Page_NetworkWebsocket;
}
bool PageNetworkProxy::validatePage() {
if (ui->proxyWidget->isProxySettingsChanged()) {
ui->proxyWidget->setProxySettings();
}
emit initialNetworkConfigured();
return true;
}