Bitcoin ABC  0.24.7
P2P Digital Currency
optionsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 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 
23 class ProxyAddressValidator : public QValidator {
24  Q_OBJECT
25 
26 public:
27  explicit ProxyAddressValidator(QObject *parent);
28 
29  State validate(QString &input, int &pos) const override;
30 };
31 
33 class ThirdPartyTxUrlsValidator : public QValidator {
34  Q_OBJECT
35 
36 public:
37  explicit ThirdPartyTxUrlsValidator(QObject *parent);
38 
39  State validate(QString &input, int &pos) const override;
40 };
41 
43 class OptionsDialog : public QDialog {
44  Q_OBJECT
45 
46 public:
47  explicit OptionsDialog(QWidget *parent, bool enableWallet);
49 
50  enum Tab {
53  };
54 
56  void setMapper();
58 
59 private Q_SLOTS:
60  /* set OK button state (enabled / disabled) */
61  void setOkButtonState(bool fState);
64  void on_okButton_clicked();
66 
67  void on_hideTrayIcon_stateChanged(int fState);
68 
69  void togglePruneWarning(bool enabled);
70  void showRestartWarning(bool fPersistent = false);
71  void clearStatusLabel();
73  /* query the networks, for which the default proxy is used */
76 
77 Q_SIGNALS:
78  void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
79 
80 private:
81  Ui::OptionsDialog *ui;
83  QDataWidgetMapper *mapper;
84 };
85 
86 #endif // BITCOIN_QT_OPTIONSDIALOG_H
OptionsDialog
Preferences dialog.
Definition: optionsdialog.h:43
OptionsDialog::TAB_NETWORK
@ TAB_NETWORK
Definition: optionsdialog.h:52
OptionsDialog::Tab
Tab
Definition: optionsdialog.h:50
OptionsDialog::on_okButton_clicked
void on_okButton_clicked()
Definition: optionsdialog.cpp:327
ThirdPartyTxUrlsValidator::validate
State validate(QString &input, int &pos) const override
Definition: optionsdialog.cpp:451
ThirdPartyTxUrlsValidator::ThirdPartyTxUrlsValidator
ThirdPartyTxUrlsValidator(QObject *parent)
Definition: optionsdialog.cpp:448
OptionsDialog::on_cancelButton_clicked
void on_cancelButton_clicked()
Definition: optionsdialog.cpp:333
OptionsDialog::on_hideTrayIcon_stateChanged
void on_hideTrayIcon_stateChanged(int fState)
Definition: optionsdialog.cpp:337
OptionsDialog::updateThirdPartyTxUrlsState
void updateThirdPartyTxUrlsState()
Definition: optionsdialog.cpp:434
OptionsDialog::OptionsDialog
OptionsDialog(QWidget *parent, bool enableWallet)
Definition: optionsdialog.cpp:29
OptionsDialog::model
OptionsModel * model
Definition: optionsdialog.h:82
OptionsDialog::updateDefaultProxyNets
void updateDefaultProxyNets()
Definition: optionsdialog.cpp:391
ThirdPartyTxUrlsValidator
Third party tx URL validator, checks for an https link.
Definition: optionsdialog.h:33
OptionsDialog::updateProxyValidationState
void updateProxyValidationState()
Definition: optionsdialog.cpp:373
ProxyAddressValidator
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:23
OptionsModel
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:49
ProxyAddressValidator::validate
State validate(QString &input, int &pos) const override
Definition: optionsdialog.cpp:421
OptionsDialog::setMapper
void setMapper()
Definition: optionsdialog.cpp:246
OptionsDialog::proxyIpChecks
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort)
OptionsDialog::on_resetButton_clicked
void on_resetButton_clicked()
Definition: optionsdialog.cpp:292
QValidatedLineEdit
Line edit that can be marked as "invalid" to show input validation feedback.
Definition: qvalidatedlineedit.h:14
OptionsDialog::setModel
void setModel(OptionsModel *model)
Definition: optionsdialog.cpp:167
OptionsDialog::ui
Ui::OptionsDialog * ui
Definition: optionsdialog.h:81
OptionsDialog::clearStatusLabel
void clearStatusLabel()
Definition: optionsdialog.cpp:366
OptionsDialog::showRestartWarning
void showRestartWarning(bool fPersistent=false)
Definition: optionsdialog.cpp:350
Ui
Definition: addressbookpage.h:14
OptionsDialog::TAB_MAIN
@ TAB_MAIN
Definition: optionsdialog.h:51
ProxyAddressValidator::ProxyAddressValidator
ProxyAddressValidator(QObject *parent)
Definition: optionsdialog.cpp:418
OptionsDialog::mapper
QDataWidgetMapper * mapper
Definition: optionsdialog.h:83
OptionsDialog::~OptionsDialog
~OptionsDialog()
Definition: optionsdialog.cpp:163
OptionsDialog::setCurrentTab
void setCurrentTab(OptionsDialog::Tab tab)
Definition: optionsdialog.cpp:233
OptionsDialog::setOkButtonState
void setOkButtonState(bool fState)
Definition: optionsdialog.cpp:288
OptionsDialog::on_openBitcoinConfButton_clicked
void on_openBitcoinConfButton_clicked()
Definition: optionsdialog.cpp:311
OptionsDialog::togglePruneWarning
void togglePruneWarning(bool enabled)
Definition: optionsdialog.cpp:346