Bitcoin Core  22.99.0
P2P Digital Currency
optionsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2020 The Bitcoin 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 BITCOIN_QT_OPTIONSDIALOG_H
6 #define BITCOIN_QT_OPTIONSDIALOG_H
7 
8 #include <QDialog>
9 #include <QValidator>
10 
11 class OptionsModel;
12 class QValidatedLineEdit;
13 
14 QT_BEGIN_NAMESPACE
15 class QDataWidgetMapper;
16 QT_END_NAMESPACE
17 
18 namespace Ui {
19 class OptionsDialog;
20 }
21 
24 class ProxyAddressValidator : public QValidator
25 {
26  Q_OBJECT
27 
28 public:
29  explicit ProxyAddressValidator(QObject *parent);
30 
31  State validate(QString &input, int &pos) const override;
32 };
33 
35 class OptionsDialog : public QDialog
36 {
37  Q_OBJECT
38 
39 public:
40  explicit OptionsDialog(QWidget *parent, bool enableWallet);
42 
43  enum Tab {
46  };
47 
49  void setMapper();
51 
52 private Q_SLOTS:
53  /* set OK button state (enabled / disabled) */
54  void setOkButtonState(bool fState);
57  void on_okButton_clicked();
59 
60  void on_showTrayIcon_stateChanged(int state);
61 
62  void togglePruneWarning(bool enabled);
63  void showRestartWarning(bool fPersistent = false);
64  void clearStatusLabel();
66  /* query the networks, for which the default proxy is used */
68 
69 Q_SIGNALS:
70  void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort);
71  void quitOnReset();
72 
73 private:
74  Ui::OptionsDialog *ui;
76  QDataWidgetMapper *mapper;
77 };
78 
79 #endif // BITCOIN_QT_OPTIONSDIALOG_H
OptionsDialog
Preferences dialog.
Definition: optionsdialog.h:35
OptionsDialog::TAB_NETWORK
@ TAB_NETWORK
Definition: optionsdialog.h:45
OptionsDialog::Tab
Tab
Definition: optionsdialog.h:43
OptionsDialog::on_okButton_clicked
void on_okButton_clicked()
Definition: optionsdialog.cpp:324
OptionsDialog::on_cancelButton_clicked
void on_cancelButton_clicked()
Definition: optionsdialog.cpp:331
OptionsDialog::OptionsDialog
OptionsDialog(QWidget *parent, bool enableWallet)
Definition: optionsdialog.cpp:31
OptionsDialog::model
OptionsModel * model
Definition: optionsdialog.h:75
OptionsDialog::updateDefaultProxyNets
void updateDefaultProxyNets()
Definition: optionsdialog.cpp:393
OptionsDialog::updateProxyValidationState
void updateProxyValidationState()
Definition: optionsdialog.cpp:376
ProxyAddressValidator
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:24
OptionsModel
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:38
ProxyAddressValidator::validate
State validate(QString &input, int &pos) const override
Definition: optionsdialog.cpp:420
OptionsDialog::setMapper
void setMapper()
Definition: optionsdialog.cpp:231
OptionsDialog::on_resetButton_clicked
void on_resetButton_clicked()
Definition: optionsdialog.cpp:281
QValidatedLineEdit
Line edit that can be marked as "invalid" to show input validation feedback.
Definition: qvalidatedlineedit.h:13
OptionsDialog::setModel
void setModel(OptionsModel *model)
Definition: optionsdialog.cpp:174
OptionsDialog::ui
Ui::OptionsDialog * ui
Definition: optionsdialog.h:74
OptionsDialog::proxyIpChecks
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, uint16_t nProxyPort)
OptionsDialog::quitOnReset
void quitOnReset()
OptionsDialog::clearStatusLabel
void clearStatusLabel()
Definition: optionsdialog.cpp:368
OptionsDialog::on_showTrayIcon_stateChanged
void on_showTrayIcon_stateChanged(int state)
Definition: optionsdialog.cpp:336
OptionsDialog::showRestartWarning
void showRestartWarning(bool fPersistent=false)
Definition: optionsdialog.cpp:351
Ui
Definition: addressbookpage.h:14
OptionsDialog::TAB_MAIN
@ TAB_MAIN
Definition: optionsdialog.h:44
ProxyAddressValidator::ProxyAddressValidator
ProxyAddressValidator(QObject *parent)
Definition: optionsdialog.cpp:415
OptionsDialog::mapper
QDataWidgetMapper * mapper
Definition: optionsdialog.h:76
OptionsDialog::~OptionsDialog
~OptionsDialog()
Definition: optionsdialog.cpp:169
OptionsDialog::setCurrentTab
void setCurrentTab(OptionsDialog::Tab tab)
Definition: optionsdialog.cpp:221
OptionsDialog::setOkButtonState
void setOkButtonState(bool fState)
Definition: optionsdialog.cpp:276
OptionsDialog::on_openBitcoinConfButton_clicked
void on_openBitcoinConfButton_clicked()
Definition: optionsdialog.cpp:300
OptionsDialog::togglePruneWarning
void togglePruneWarning(bool enabled)
Definition: optionsdialog.cpp:346