Line data Source code
1 : // Copyright (c) 2011-2013 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 :
10 : class OptionsModel;
11 : class QValidatedLineEdit;
12 :
13 : QT_BEGIN_NAMESPACE
14 : class QDataWidgetMapper;
15 : QT_END_NAMESPACE
16 :
17 : namespace Ui {
18 : class OptionsDialog;
19 : }
20 :
21 : /** Preferences dialog. */
22 : class OptionsDialog : public QDialog
23 : {
24 0 : Q_OBJECT
25 :
26 : public:
27 : explicit OptionsDialog(QWidget *parent, bool enableWallet);
28 : ~OptionsDialog();
29 :
30 : void setModel(OptionsModel *model);
31 : void setMapper();
32 :
33 : protected:
34 : bool eventFilter(QObject *object, QEvent *event);
35 :
36 : private Q_SLOTS:
37 : /* enable OK button */
38 : void enableOkButton();
39 : /* disable OK button */
40 : void disableOkButton();
41 : /* set OK button state (enabled / disabled) */
42 : void setOkButtonState(bool fState);
43 : void on_resetButton_clicked();
44 : void on_okButton_clicked();
45 : void on_cancelButton_clicked();
46 :
47 : void showRestartWarning(bool fPersistent = false);
48 : void clearStatusLabel();
49 : void doProxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
50 : /* query the networks, for which the default proxy is used */
51 : void updateDefaultProxyNets();
52 :
53 : Q_SIGNALS:
54 : void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
55 :
56 : private:
57 : Ui::OptionsDialog *ui;
58 : OptionsModel *model;
59 : QDataWidgetMapper *mapper;
60 : bool fProxyIpsValid;
61 : };
62 :
63 : #endif // BITCOIN_QT_OPTIONSDIALOG_H
|