Raven Core  3.0.0
P2P Digital Currency
optionsdialog.h
Go to the documentation of this file.
1 // Copyright (c) 2011-2016 The Bitcoin Core developers
2 // Copyright (c) 2017-2019 The Raven Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
5 
6 #ifndef RAVEN_QT_OPTIONSDIALOG_H
7 #define RAVEN_QT_OPTIONSDIALOG_H
8 
9 #include <QDialog>
10 #include <QValidator>
11 
12 class OptionsModel;
13 class QValidatedLineEdit;
14 
15 QT_BEGIN_NAMESPACE
16 class QDataWidgetMapper;
17 QT_END_NAMESPACE
18 
19 namespace Ui {
20 class OptionsDialog;
21 }
22 
25 class ProxyAddressValidator : public QValidator
26 {
27  Q_OBJECT
28 
29 public:
30  explicit ProxyAddressValidator(QObject *parent);
31 
32  State validate(QString &input, int &pos) const;
33 };
34 
36 class OptionsDialog : public QDialog
37 {
38  Q_OBJECT
39 
40 public:
41  explicit OptionsDialog(QWidget *parent, bool enableWallet);
42  ~OptionsDialog();
43 
44  void setModel(OptionsModel *model);
45  void setMapper();
46 
47 private Q_SLOTS:
48  /* set OK button state (enabled / disabled) */
49  void setOkButtonState(bool fState);
50  void on_resetButton_clicked();
51  void on_openRavenConfButton_clicked();
52  void on_okButton_clicked();
53  void on_cancelButton_clicked();
54 
55  void on_hideTrayIcon_stateChanged(int fState);
56 
57  void showRestartWarning(bool fPersistent = false);
58  void clearStatusLabel();
59  void updateProxyValidationState();
60  /* query the networks, for which the default proxy is used */
61  void updateDefaultProxyNets();
62 
63 Q_SIGNALS:
64  void proxyIpChecks(QValidatedLineEdit *pUiProxyIp, int nProxyPort);
65 
66 private:
67  Ui::OptionsDialog *ui;
69  QDataWidgetMapper *mapper;
70 };
71 
72 #endif // RAVEN_QT_OPTIONSDIALOG_H
Ui::OptionsDialog * ui
Definition: optionsdialog.h:67
Proxy address widget validator, checks for a valid proxy address.
Definition: optionsdialog.h:25
Line edit that can be marked as "invalid" to show input validation feedback.
OptionsModel * model
Definition: optionsdialog.h:68
QDataWidgetMapper * mapper
Definition: optionsdialog.h:69
Interface from Qt to configuration data structure for Raven client.
Definition: optionsmodel.h:23
Preferences dialog.
Definition: optionsdialog.h:36