Fabcoin Core  0.16.2
P2P Digital Currency
optionsdialog.h
Go to the documentation of this file.
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.
4 
5 #ifndef FABCOIN_QT_OPTIONSDIALOG_H
6 #define FABCOIN_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);
41  ~OptionsDialog();
42 
43  void setModel(OptionsModel *model);
44  void setMapper();
45 
46 private Q_SLOTS:
47  /* set OK button state (enabled / disabled) */
48  void setOkButtonState(bool fState);
49  void on_resetButton_clicked();
50  void on_openFabcoinConfButton_clicked();
51  void on_okButton_clicked();
52  void on_cancelButton_clicked();
53 
54  void on_hideTrayIcon_stateChanged(int fState);
55 
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();
61 
62 Q_SIGNALS:
63  void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
64 
65 private:
68  QDataWidgetMapper *mapper;
69 };
70 
71 #endif // FABCOIN_QT_OPTIONSDIALOG_H
Ui::OptionsDialog * ui
Definition: optionsdialog.h:66
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:24
Line edit that can be marked as "invalid" to show input validation feedback.
OptionsModel * model
Definition: optionsdialog.h:67
QDataWidgetMapper * mapper
Definition: optionsdialog.h:68
Interface from Qt to configuration data structure for Fabcoin client.
Definition: optionsmodel.h:22
Preferences dialog.
Definition: optionsdialog.h:35