Stake miner status icon
[novacoin.git] / src / qt / optionsdialog.h
1 #ifndef OPTIONSDIALOG_H
2 #define OPTIONSDIALOG_H
3
4 #include <QDialog>
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 QDialog
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
28 private slots:
29     /* enable only apply button */
30     void enableApplyButton();
31     /* disable only apply button */
32     void disableApplyButton();
33     /* enable apply button and OK button */
34     void enableSaveButtons();
35     /* disable apply button and OK button */
36     void disableSaveButtons();
37     /* set apply button and OK button state (enabled / disabled) */
38     void setSaveButtonState(bool fState);
39     void on_okButton_clicked();
40     void on_cancelButton_clicked();
41     void on_applyButton_clicked();
42
43     void showRestartWarning_Proxy();
44     void showRestartWarning_Lang();
45     void updateDisplayUnit();
46     void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
47
48 signals:
49     void proxyIpValid(QValidatedLineEdit *object, bool fValid);
50
51 private:
52     Ui::OptionsDialog *ui;
53     OptionsModel *model;
54     MonitoredDataMapper *mapper;
55     bool fRestartWarningDisplayed_Proxy;
56     bool fRestartWarningDisplayed_Lang;
57     bool fProxyIpValid;
58 };
59
60 #endif // OPTIONSDIALOG_H