m_statusBtnConnectionStatusIndicator = new StatusBarButton(icons()->icon("status_disconnected.svg"), "Connection status", this);
connect(m_statusBtnConnectionStatusIndicator, &StatusBarButton::clicked, [this](){
- this->onShowSettingsPage(SettingsNew::Pages::NETWORK);
+ this->onShowSettingsPage(Settings::Pages::NETWORK);
});
this->statusBar()->addPermanentWidget(m_statusBtnConnectionStatusIndicator);
this->onConnectionStatusChanged(Wallet::ConnectionStatus_Disconnected);
#include "appcontext.h"
#include "components.h"
#include "CalcWindow.h"
-#include "SettingsNewDialog.h"
+#include "SettingsDialog.h"
#include "dialog/AboutDialog.h"
#include "dialog/AccountSwitcherDialog.h"
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
-#include "SettingsNewDialog.h"
-#include "ui_SettingsNewDialog.h"
+#include "SettingsDialog.h"
+#include "ui_SettingsDialog.h"
#include <QCloseEvent>
#include <QDesktopServices>
#include "utils/WebsocketNotifier.h"
#include "widgets/NetworkProxyWidget.h"
-SettingsNew::SettingsNew(QSharedPointer<AppContext> ctx, QWidget *parent)
+Settings::Settings(QSharedPointer<AppContext> ctx, QWidget *parent)
: QDialog(parent)
- , ui(new Ui::SettingsNew)
+ , ui(new Ui::Settings)
, m_ctx(std::move(ctx))
{
ui->setupUi(this);
this->adjustSize();
}
-void SettingsNew::setupAppearanceTab() {
+void Settings::setupAppearanceTab() {
// [Theme]
this->setupThemeComboBox();
auto settingsTheme = config()->get(Config::skin).toString();
});
}
-void SettingsNew::setupNetworkTab() {
+void Settings::setupNetworkTab() {
// Node
if (m_ctx) {
ui->nodeWidget->setupUI(m_ctx->nodes);
}
// Proxy
- connect(ui->proxyWidget, &NetworkProxyWidget::proxySettingsChanged, this, &SettingsNew::onProxySettingsChanged);
+ connect(ui->proxyWidget, &NetworkProxyWidget::proxySettingsChanged, this, &Settings::onProxySettingsChanged);
// Websocket
// [Obtain third-party data]
});
}
-void SettingsNew::setupStorageTab() {
+void Settings::setupStorageTab() {
// Paths
ui->lineEdit_defaultWalletDir->setText(config()->get(Config::walletDirectory).toString());
ui->lineEdit_configDir->setText(Config::defaultConfigDir().path());
});
}
-void SettingsNew::setupDisplayTab() {
+void Settings::setupDisplayTab() {
// [Hide balance]
ui->checkBox_hideBalance->setChecked(config()->get(Config::hideBalance).toBool());
connect(ui->checkBox_hideBalance, &QCheckBox::toggled, [this](bool toggled){
});
}
-void SettingsNew::setupMemoryTab() {
+void Settings::setupMemoryTab() {
// Nothing here, yet
}
-void SettingsNew::setupTransactionsTab() {
+void Settings::setupTransactionsTab() {
// [Multibroadcast outgoing transactions]
ui->checkBox_multibroadcast->setChecked(config()->get(Config::multiBroadcast).toBool());
connect(ui->checkBox_multibroadcast, &QCheckBox::toggled, [](bool toggled){
ui->checkBox_requirePasswordToSpend->hide();
}
-void SettingsNew::setupMiscTab() {
+void Settings::setupMiscTab() {
// [Block explorer]
ui->comboBox_blockExplorer->setCurrentIndex(ui->comboBox_blockExplorer->findText(config()->get(Config::blockExplorer).toString()));
connect(ui->comboBox_blockExplorer, QOverload<int>::of(&QComboBox::currentIndexChanged), [this]{
});
}
-void SettingsNew::onProxySettingsChanged() {
+void Settings::onProxySettingsChanged() {
ui->closeButton->addButton(QDialogButtonBox::Apply);
connect(ui->closeButton->button(QDialogButtonBox::Apply), &QAbstractButton::clicked, [this](){
ui->proxyWidget->setProxySettings();
});
}
-void SettingsNew::showNetworkProxyTab() {
- this->setSelection(SettingsNew::Pages::NETWORK);
+void Settings::showNetworkProxyTab() {
+ this->setSelection(Settings::Pages::NETWORK);
ui->tabWidget_network->setCurrentIndex(1);
}
-void SettingsNew::setupThemeComboBox() {
+void Settings::setupThemeComboBox() {
#if defined(Q_OS_WIN)
m_themes.removeOne("Breeze/Dark");
m_themes.removeOne("Breeze/Light");
ui->comboBox_theme->insertItems(0, m_themes);
}
-void SettingsNew::setSelection(int index) {
+void Settings::setSelection(int index) {
// You'd really think there is a better way
QListWidgetItem *item = ui->selector->item(index);
QModelIndex idx = ui->selector->indexFromItem(item);
ui->selector->selectionModel()->select(idx, QItemSelectionModel::ClearAndSelect | QItemSelectionModel::Rows);
}
-void SettingsNew::enableWebsocket(bool enabled) {
+void Settings::enableWebsocket(bool enabled) {
if (enabled && !config()->get(Config::offlineMode).toBool() && !config()->get(Config::disableWebsocket).toBool()) {
websocketNotifier()->websocketClient.restart();
} else {
emit websocketStatusChanged(enabled);
}
-SettingsNew::~SettingsNew() = default;
\ No newline at end of file
+Settings::~Settings() = default;
\ No newline at end of file
// SPDX-License-Identifier: BSD-3-Clause
// SPDX-FileCopyrightText: 2020-2023 The Monero Project
-#ifndef FEATHER_SETTINGSNEWDIALOG_H
-#define FEATHER_SETTINGSNEWDIALOG_H
+#ifndef FEATHER_SettingsDIALOG_H
+#define FEATHER_SettingsDIALOG_H
#include <QAbstractButton>
#include "widgets/NodeWidget.h"
namespace Ui {
- class SettingsNew;
+ class Settings;
}
-class SettingsNew : public QDialog
+class Settings : public QDialog
{
Q_OBJECT
public:
- explicit SettingsNew(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
- ~SettingsNew() override;
+ explicit Settings(QSharedPointer<AppContext> ctx, QWidget *parent = nullptr);
+ ~Settings() override;
void showNetworkProxyTab();
void setSelection(int index);
void enableWebsocket(bool enabled);
- QScopedPointer<Ui::SettingsNew> ui;
+ QScopedPointer<Ui::Settings> ui;
QSharedPointer<AppContext> m_ctx;
Nodes *m_nodes = nullptr;
QStringList m_timeFormats{"hh:mm", "hh:mm ap"};
};
-#endif //FEATHER_SETTINGSNEWDIALOG_H
+#endif //FEATHER_SettingsDIALOG_H
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
- <class>SettingsNew</class>
- <widget class="QDialog" name="SettingsNew">
+ <class>Settings</class>
+ <widget class="QDialog" name="Settings">
<property name="geometry">
<rect>
<x>0</x>
<connection>
<sender>closeButton</sender>
<signal>accepted()</signal>
- <receiver>SettingsNew</receiver>
+ <receiver>Settings</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<connection>
<sender>closeButton</sender>
<signal>rejected()</signal>
- <receiver>SettingsNew</receiver>
+ <receiver>Settings</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
// ######################## SETTINGS ########################
void WindowManager::showSettings(QSharedPointer<AppContext> ctx, QWidget *parent, bool showProxyTab) {
- SettingsNew settings{ctx, parent};
+ Settings settings{ctx, parent};
- connect(&settings, &SettingsNew::preferredFiatCurrencyChanged, [this]{
+ connect(&settings, &Settings::preferredFiatCurrencyChanged, [this]{
for (const auto &window : m_windows) {
window->onPreferredFiatCurrencyChanged();
}
});
- connect(&settings, &SettingsNew::skinChanged, this, &WindowManager::onChangeTheme);
- connect(&settings, &SettingsNew::updateBalance, this, &WindowManager::updateBalance);
- connect(&settings, &SettingsNew::proxySettingsChanged, this, &WindowManager::onProxySettingsChanged);
- connect(&settings, &SettingsNew::websocketStatusChanged, this, &WindowManager::onWebsocketStatusChanged);
- connect(&settings, &SettingsNew::offlineMode, this, &WindowManager::offlineMode);
- connect(&settings, &SettingsNew::hideUpdateNotifications, [this](bool hidden){
+ connect(&settings, &Settings::skinChanged, this, &WindowManager::onChangeTheme);
+ connect(&settings, &Settings::updateBalance, this, &WindowManager::updateBalance);
+ connect(&settings, &Settings::proxySettingsChanged, this, &WindowManager::onProxySettingsChanged);
+ connect(&settings, &Settings::websocketStatusChanged, this, &WindowManager::onWebsocketStatusChanged);
+ connect(&settings, &Settings::offlineMode, this, &WindowManager::offlineMode);
+ connect(&settings, &Settings::hideUpdateNotifications, [this](bool hidden){
for (const auto &window : m_windows) {
window->onHideUpdateNotifications(hidden);
}
#include <QFileDialog>
-#include "SettingsNewDialog.h"
-
PageMenu::PageMenu(WizardFields *fields, WalletKeysFilesModel *wallets, QWidget *parent)
: QWizardPage(parent)
, ui(new Ui::PageMenu)
#include "PageNetworkProxy.h"
#include "PageNetworkWebsocket.h"
#include "constants.h"
-#include "SettingsNewDialog.h"
#include <QLineEdit>
#include <QVBoxLayout>