1 #ifndef OPTIONSDIALOG_H
2 #define OPTIONSDIALOG_H
10 class MonitoredDataMapper;
11 class QValidatedLineEdit;
13 /** Preferences dialog. */
14 class OptionsDialog : public QDialog
19 explicit OptionsDialog(QWidget *parent = 0);
22 void setModel(OptionsModel *model);
26 bool eventFilter(QObject *object, QEvent *event);
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();
43 void showRestartWarning_Proxy();
44 void showRestartWarning_Tor();
45 void showRestartWarning_Lang();
46 void showRestartWarning_URL();
47 void updateDisplayUnit();
48 void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
49 void handleTorIpValid(QValidatedLineEdit *object, bool fState);
52 void proxyIpValid(QValidatedLineEdit *object, bool fValid);
53 void torIpValid(QValidatedLineEdit *object, bool fValid);
56 Ui::OptionsDialog *ui;
58 MonitoredDataMapper *mapper;
59 bool fRestartWarningDisplayed_Proxy;
60 bool fRestartWarningDisplayed_Tor;
61 bool fRestartWarningDisplayed_Lang;
62 bool fRestartWarningDisplayed_URL;
67 #endif // OPTIONSDIALOG_H