PIVX Core  5.6.99
P2P Digital Currency
settingswidget.h
Go to the documentation of this file.
1 // Copyright (c) 2019-2021 The PIVX Core developers
2 // Distributed under the MIT software license, see the accompanying
3 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
4 
5 #ifndef PIVX_QT_SETTINGS_SETTINGSWIDGET_H
6 #define PIVX_QT_SETTINGS_SETTINGSWIDGET_H
7 
8 #include <QWidget>
9 
10 #include "pwidget.h"
11 #include "settings/backupwallet.h"
12 #include "settings/bittoolwidget.h"
13 #include "settings/consolewidget.h"
15 #include "settings/exportcsv.h"
21 
22 class PIVXGUI;
23 
24 QT_BEGIN_NAMESPACE
25 class QDataWidgetMapper;
26 QT_END_NAMESPACE
27 
28 namespace Ui {
29 class SettingsWidget;
30 }
31 
32 class SettingsWidget : public PWidget
33 {
34  Q_OBJECT
35 
36 public:
37  explicit SettingsWidget(PIVXGUI* parent);
39 
40  void loadClientModel() override;
41  void loadWalletModel() override;
42  void setMapper();
43  void showDebugConsole();
44  void showInformation();
45  void openNetworkMonitor();
46 
47 Q_SIGNALS:
49  void handleRestart(QStringList args);
50 
51 private Q_SLOTS:
52  // File
53  void onFileClicked();
54  void onBackupWalletClicked();
55  void onSignMessageClicked();
56 
57  // Wallet Configuration
59  void onBipToolClicked();
60  void onExportCSVClicked();
61 
62  // Options
63  void onOptionsClicked();
64  void onMainOptionsClicked();
67 
68  void onDiscardChanges();
69 
70  // Tools
71  void onToolsClicked();
72  void onInformationClicked();
73  void onDebugConsoleClicked();
74  void onWalletRepairClicked();
75 
76  // Help
77  void onHelpClicked();
78  void onAboutClicked();
79  void onResetAction();
80  void onSaveOptionsClicked();
81 
82 private:
83  Ui::SettingsWidget *ui{nullptr};
85 
96 
97  QDataWidgetMapper* mapper{nullptr};
98 
99  QList<QPushButton*> options;
100  // Map of: menu button -> sub menu items
101  QMap <QPushButton*, QWidget*> menus;
102 
103  void selectOption(QPushButton* option);
104  bool openStandardDialog(const QString& title = "", const QString& body = "", const QString& okBtn = "OK", const QString& cancelBtn = "");
105  void selectMenu(QPushButton* btn);
106 };
107 
108 #endif // PIVX_QT_SETTINGS_SETTINGSWIDGET_H
PIVX GUI main class.
Definition: pivxgui.h:46
QMap< QPushButton *, QWidget * > menus
void onInformationClicked()
void onSignMessageClicked()
SettingsMainOptionsWidget * settingsMainOptionsWidget
void onBackupWalletClicked()
SettingsBitToolWidget * settingsBitToolWidget
void handleRestart(QStringList args)
Get restart command-line parameters and handle restart.
void loadClientModel() override
SettingsWalletOptionsWidget * settingsWalletOptionsWidget
QList< QPushButton * > options
SettingsConsoleWidget * settingsConsoleWidget
bool openStandardDialog(const QString &title="", const QString &body="", const QString &okBtn="OK", const QString &cancelBtn="")
Ui::SettingsWidget * ui
SettingsInformationWidget * settingsInformationWidget
void onDisplayOptionsClicked()
SettingsSignMessageWidgets * settingsSingMessageWidgets
void selectOption(QPushButton *option)
void loadWalletModel() override
void onConfigurationClicked()
QDataWidgetMapper * mapper
SettingsDisplayOptionsWidget * settingsDisplayOptionsWidget
void onDebugConsoleClicked()
void onWalletOptionsClicked()
SettingsExportCSV * settingsExportCsvWidget
void onMainOptionsClicked()
void onSaveOptionsClicked()
SettingsWalletRepairWidget * settingsWalletRepairWidget
void onWalletRepairClicked()
SettingsWidget(PIVXGUI *parent)
SettingsBackupWallet * settingsBackupWallet
void selectMenu(QPushButton *btn)