1 // Copyright (c) 2011-2017 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.
5 #ifndef BITCOIN_QT_OPTIONSDIALOG_H
6 #define BITCOIN_QT_OPTIONSDIALOG_H
12 class QValidatedLineEdit
;
15 class QDataWidgetMapper
;
22 /** Proxy address widget validator, checks for a valid proxy address.
24 class ProxyAddressValidator
: public QValidator
29 explicit ProxyAddressValidator(QObject
*parent
);
31 State
validate(QString
&input
, int &pos
) const;
34 /** Preferences dialog. */
35 class OptionsDialog
: public QDialog
40 explicit OptionsDialog(QWidget
*parent
, bool enableWallet
);
43 void setModel(OptionsModel
*model
);
47 /* set OK button state (enabled / disabled) */
48 void setOkButtonState(bool fState
);
49 void on_resetButton_clicked();
50 void on_openBitcoinConfButton_clicked();
51 void on_okButton_clicked();
52 void on_cancelButton_clicked();
54 void on_hideTrayIcon_stateChanged(int fState
);
56 void showRestartWarning(bool fPersistent
= false);
57 void clearStatusLabel();
58 void updateProxyValidationState();
59 /* query the networks, for which the default proxy is used */
60 void updateDefaultProxyNets();
63 void proxyIpChecks(QValidatedLineEdit
*pUiProxyIp
, int nProxyPort
);
66 Ui::OptionsDialog
*ui
;
68 QDataWidgetMapper
*mapper
;
71 #endif // BITCOIN_QT_OPTIONSDIALOG_H