Update CMakeLists.txt - play with openssl
[novacoin.git] / src / qt / optionsdialog.h
1 #ifndef OPTIONSDIALOG_H
2 #define OPTIONSDIALOG_H
3
4 #include <QWidget>
5
6 namespace Ui {
7 class OptionsDialog;
8 }
9 class OptionsModel;
10 class MonitoredDataMapper;
11 class QValidatedLineEdit;
12
13 /** Preferences dialog. */
14 class OptionsDialog : public QWidget
15 {
16     Q_OBJECT
17
18 public:
19     explicit OptionsDialog(QWidget *parent = 0);
20     ~OptionsDialog();
21
22     void setModel(OptionsModel *model);
23     void setMapper();
24
25 protected:
26     bool eventFilter(QObject *object, QEvent *event);
27     void keyPressEvent(QKeyEvent *);
28
29 private slots:
30     /* enable only apply button */
31     void enableApplyButton();
32     /* disable only apply button */
33     void disableApplyButton();
34     /* enable apply button and OK button */
35     void enableSaveButtons();
36     /* disable apply button and OK button */
37     void disableSaveButtons();
38     /* set apply button and OK button state (enabled / disabled) */
39     void setSaveButtonState(bool fState);
40     void on_okButton_clicked();
41     void on_cancelButton_clicked();
42     void on_applyButton_clicked();
43
44     void showRestartWarning_Proxy();
45     void showRestartWarning_Tor();
46     void showRestartWarning_Lang();
47     void showRestartWarning_URL();
48     void updateDisplayUnit();
49     void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
50     void handleTorIpValid(QValidatedLineEdit *object, bool fState);
51
52     void on_chooseSeeder_clicked();
53
54 signals:
55     void proxyIpValid(QValidatedLineEdit *object, bool fValid);
56     void torIpValid(QValidatedLineEdit *object, bool fValid);
57
58 private:
59     Ui::OptionsDialog *ui;
60     OptionsModel *model;
61     MonitoredDataMapper *mapper;
62     bool fRestartWarningDisplayed_Proxy;
63     bool fRestartWarningDisplayed_Tor;
64     bool fRestartWarningDisplayed_Lang;
65     bool fRestartWarningDisplayed_URL;
66     bool fProxyIpValid;
67     bool fTorIpValid;
68 };
69
70 #endif // OPTIONSDIALOG_H