2013-05-24 18:19:48 +00:00
|
|
|
#ifndef PREFERENCES_DIALOG_H
|
|
|
|
#define PREFERENCES_DIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2013-05-28 18:21:27 +00:00
|
|
|
#include "../dive.h"
|
|
|
|
#include "../pref.h"
|
2013-05-24 18:19:48 +00:00
|
|
|
|
2013-10-03 18:54:24 +00:00
|
|
|
#include "ui_preferences.h"
|
|
|
|
|
2013-06-02 20:58:50 +00:00
|
|
|
class QAbstractButton;
|
2013-05-24 18:19:48 +00:00
|
|
|
|
|
|
|
class PreferencesDialog :public QDialog{
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static PreferencesDialog* instance();
|
2013-06-02 20:58:50 +00:00
|
|
|
void showEvent(QShowEvent* );
|
2013-05-24 18:19:48 +00:00
|
|
|
signals:
|
|
|
|
void settingsChanged();
|
|
|
|
public slots:
|
2013-06-02 20:58:50 +00:00
|
|
|
void buttonClicked(QAbstractButton* button);
|
2013-10-14 04:19:13 +00:00
|
|
|
void on_chooseFile_clicked();
|
2013-05-24 18:19:48 +00:00
|
|
|
void syncSettings();
|
2013-06-03 12:08:49 +00:00
|
|
|
void restorePrefs();
|
|
|
|
void rememberPrefs();
|
2013-05-28 18:21:27 +00:00
|
|
|
|
2013-05-24 18:19:48 +00:00
|
|
|
private:
|
|
|
|
explicit PreferencesDialog(QWidget* parent = 0, Qt::WindowFlags f = 0);
|
2013-06-03 12:08:49 +00:00
|
|
|
void setUiFromPrefs();
|
2013-10-03 18:54:25 +00:00
|
|
|
Ui::PreferencesDialog ui;
|
2013-05-28 18:21:27 +00:00
|
|
|
struct preferences oldPrefs;
|
2013-05-24 18:19:48 +00:00
|
|
|
};
|
|
|
|
|
2013-05-28 18:21:27 +00:00
|
|
|
#endif
|