BSHA3  0.17.99
P2P Blockchain, based on Bitcoin
optionsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2018 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;
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_hideTrayIcon_stateChanged(int fState);
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, int nProxyPort);
71 
72 private:
73  Ui::OptionsDialog *ui;
75  QDataWidgetMapper *mapper;
76 };
77 
78 #endif // BITCOIN_QT_OPTIONSDIALOG_H
Ui::OptionsDialog * ui
Definition: optionsdialog.h:73
OptionsDialog(QWidget *parent, bool enableWallet)
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:24
void setOkButtonState(bool fState)
void on_resetButton_clicked()
Line edit that can be marked as "invalid" to show input validation feedback.
void togglePruneWarning(bool enabled)
OptionsModel * model
Definition: optionsdialog.h:74
void on_openBitcoinConfButton_clicked()
State validate(QString &input, int &pos) const
void setModel(OptionsModel *model)
QDataWidgetMapper * mapper
Definition: optionsdialog.h:75
void on_okButton_clicked()
void updateDefaultProxyNets()
void setCurrentTab(OptionsDialog::Tab tab)
void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort)
void on_hideTrayIcon_stateChanged(int fState)
Interface from Qt to configuration data structure for Bitcoin client.
Definition: optionsmodel.h:29
void showRestartWarning(bool fPersistent=false)
void on_cancelButton_clicked()
Preferences dialog.
Definition: optionsdialog.h:35
void clearStatusLabel()
void updateProxyValidationState()
ProxyAddressValidator(QObject *parent)