1 #ifndef OPTIONSDIALOG_H
2 #define OPTIONSDIALOG_H
10 class MonitoredDataMapper;
11 class QValidatedLineEdit;
13 /** Preferences dialog. */
14 class OptionsDialog : public QWidget
19 explicit OptionsDialog(QWidget *parent = 0);
22 void setModel(OptionsModel *model);
26 bool eventFilter(QObject *object, QEvent *event);
27 void keyPressEvent(QKeyEvent *);
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();
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);
52 void on_chooseSeeder_clicked();
55 void proxyIpValid(QValidatedLineEdit *object, bool fValid);
56 void torIpValid(QValidatedLineEdit *object, bool fValid);
59 Ui::OptionsDialog *ui;
61 MonitoredDataMapper *mapper;
62 bool fRestartWarningDisplayed_Proxy;
63 bool fRestartWarningDisplayed_Tor;
64 bool fRestartWarningDisplayed_Lang;
65 bool fRestartWarningDisplayed_URL;
70 #endif // OPTIONSDIALOG_H