2011-05-12 03:40:40 -04:00
|
|
|
#ifndef OPTIONSDIALOG_H
|
|
|
|
#define OPTIONSDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2012-06-08 09:21:55 -04:00
|
|
|
|
|
|
|
namespace Ui {
|
|
|
|
class OptionsDialog;
|
|
|
|
}
|
2011-05-31 16:24:53 -04:00
|
|
|
class OptionsModel;
|
2011-06-01 08:40:06 -04:00
|
|
|
class MonitoredDataMapper;
|
2012-07-09 05:14:38 -04:00
|
|
|
class QValidatedLineEdit;
|
2011-05-12 03:40:40 -04:00
|
|
|
|
2011-11-13 09:19:52 -03:00
|
|
|
/** Preferences dialog. */
|
2011-05-12 03:40:40 -04:00
|
|
|
class OptionsDialog : public QDialog
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
2012-06-08 09:21:55 -04:00
|
|
|
|
2011-05-12 03:40:40 -04:00
|
|
|
public:
|
2012-06-08 09:21:55 -04:00
|
|
|
explicit OptionsDialog(QWidget *parent = 0);
|
|
|
|
~OptionsDialog();
|
2011-05-31 16:24:53 -04:00
|
|
|
|
|
|
|
void setModel(OptionsModel *model);
|
2012-06-08 09:21:55 -04:00
|
|
|
void setMapper();
|
2011-05-12 03:40:40 -04:00
|
|
|
|
2012-06-08 09:21:55 -04:00
|
|
|
protected:
|
|
|
|
bool eventFilter(QObject *object, QEvent *event);
|
2011-07-25 15:35:45 -04:00
|
|
|
|
2011-06-01 03:33:48 -04:00
|
|
|
private slots:
|
2012-08-02 03:02:05 -04:00
|
|
|
/* enable only apply button */
|
|
|
|
void enableApplyButton();
|
|
|
|
/* disable only apply button */
|
|
|
|
void disableApplyButton();
|
2012-06-08 09:21:55 -04:00
|
|
|
/* enable apply button and OK button */
|
|
|
|
void enableSaveButtons();
|
|
|
|
/* disable apply button and OK button */
|
|
|
|
void disableSaveButtons();
|
|
|
|
/* set apply button and OK button state (enabled / disabled) */
|
|
|
|
void setSaveButtonState(bool fState);
|
2012-08-18 09:54:39 -04:00
|
|
|
void on_resetButton_clicked();
|
2012-06-08 09:21:55 -04:00
|
|
|
void on_okButton_clicked();
|
|
|
|
void on_cancelButton_clicked();
|
|
|
|
void on_applyButton_clicked();
|
|
|
|
|
|
|
|
void showRestartWarning_Proxy();
|
|
|
|
void showRestartWarning_Lang();
|
|
|
|
void updateDisplayUnit();
|
2012-07-09 05:14:38 -04:00
|
|
|
void handleProxyIpValid(QValidatedLineEdit *object, bool fState);
|
2012-06-08 09:21:55 -04:00
|
|
|
|
|
|
|
signals:
|
2012-07-09 05:14:38 -04:00
|
|
|
void proxyIpValid(QValidatedLineEdit *object, bool fValid);
|
2011-11-13 09:19:52 -03:00
|
|
|
|
2011-05-12 08:44:52 -04:00
|
|
|
private:
|
2012-06-08 09:21:55 -04:00
|
|
|
Ui::OptionsDialog *ui;
|
2011-05-31 16:24:53 -04:00
|
|
|
OptionsModel *model;
|
2011-06-01 08:40:06 -04:00
|
|
|
MonitoredDataMapper *mapper;
|
2012-06-08 09:21:55 -04:00
|
|
|
bool fRestartWarningDisplayed_Proxy;
|
|
|
|
bool fRestartWarningDisplayed_Lang;
|
|
|
|
bool fProxyIpValid;
|
2011-05-12 03:40:40 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // OPTIONSDIALOG_H
|