Bitcoin ABC  0.22.12
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 OptionsDialog : public QDialog {
34  Q_OBJECT
35 
36 public:
37  explicit OptionsDialog(QWidget *parent, bool enableWallet);
38  ~OptionsDialog();
39 
40  enum Tab {
43  };
44 
45  void setModel(OptionsModel *model);
46  void setMapper();
47  void setCurrentTab(OptionsDialog::Tab tab);
48 
49 private Q_SLOTS:
50  /* set OK button state (enabled / disabled) */
51  void setOkButtonState(bool fState);
52  void on_resetButton_clicked();
53  void on_openBitcoinConfButton_clicked();
54  void on_okButton_clicked();
55  void on_cancelButton_clicked();
56 
57  void on_hideTrayIcon_stateChanged(int fState);
58 
59  void togglePruneWarning(bool enabled);
60  void showRestartWarning(bool fPersistent = false);
61  void clearStatusLabel();
62  void updateProxyValidationState();
63  /* query the networks, for which the default proxy is used */
64  void updateDefaultProxyNets();
65 
66 Q_SIGNALS:
67  void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
68 
69 private:
70  Ui::OptionsDialog *ui;
72  QDataWidgetMapper *mapper;
73 };
74 
75 #endif // BITCOIN_QT_OPTIONSDIALOG_H
Ui::OptionsDialog * ui
Definition: optionsdialog.h:70
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:23
Line edit that can be marked as "invalid" to show input validation feedback.
OptionsModel * model
Definition: optionsdialog.h:71
QDataWidgetMapper * mapper
Definition: optionsdialog.h:72
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:48
Preferences dialog.
Definition: optionsdialog.h:33