2014-02-11 18:14:46 +00:00
|
|
|
#ifndef PREFERENCES_H
|
|
|
|
#define PREFERENCES_H
|
2013-05-24 18:19:48 +00:00
|
|
|
|
|
|
|
#include <QDialog>
|
2014-04-11 08:51:07 +00:00
|
|
|
#include "pref.h"
|
2013-05-24 18:19:48 +00:00
|
|
|
|
2013-10-03 18:54:24 +00:00
|
|
|
#include "ui_preferences.h"
|
|
|
|
|
2015-01-13 18:39:05 +00:00
|
|
|
#ifndef Q_OS_ANDROID
|
|
|
|
class QWebView;
|
|
|
|
#endif
|
|
|
|
|
2013-06-02 20:58:50 +00:00
|
|
|
class QAbstractButton;
|
2013-05-24 18:19:48 +00:00
|
|
|
|
2014-02-28 04:09:57 +00:00
|
|
|
class PreferencesDialog : public QDialog {
|
|
|
|
Q_OBJECT
|
2013-05-24 18:19:48 +00:00
|
|
|
public:
|
2014-02-28 04:09:57 +00:00
|
|
|
static PreferencesDialog *instance();
|
|
|
|
void showEvent(QShowEvent *);
|
2014-02-06 13:38:28 +00:00
|
|
|
void emitSettingsChanged();
|
2014-07-16 21:40:49 +00:00
|
|
|
|
2013-05-24 18:19:48 +00:00
|
|
|
signals:
|
|
|
|
void settingsChanged();
|
2014-02-28 04:09:57 +00:00
|
|
|
public
|
|
|
|
slots:
|
|
|
|
void buttonClicked(QAbstractButton *button);
|
2013-10-14 04:19:13 +00:00
|
|
|
void on_chooseFile_clicked();
|
2014-06-25 09:46:51 +00:00
|
|
|
void on_resetSettings_clicked();
|
2013-05-24 18:19:48 +00:00
|
|
|
void syncSettings();
|
2014-02-08 17:07:06 +00:00
|
|
|
void loadSettings();
|
2013-06-03 12:08:49 +00:00
|
|
|
void restorePrefs();
|
|
|
|
void rememberPrefs();
|
2013-12-04 23:48:37 +00:00
|
|
|
void gflowChanged(int gf);
|
|
|
|
void gfhighChanged(int gf);
|
2014-06-28 11:01:51 +00:00
|
|
|
void proxyType_changed(int idx);
|
2014-07-16 21:40:49 +00:00
|
|
|
void on_btnUseDefaultFile_toggled(bool toggle);
|
2014-12-24 23:34:23 +00:00
|
|
|
void facebookLoggedIn();
|
2014-12-23 21:29:00 +00:00
|
|
|
void facebookDisconnect();
|
2015-06-07 16:54:28 +00:00
|
|
|
void cloudPinNeeded(bool toggle);
|
2013-05-24 18:19:48 +00:00
|
|
|
private:
|
2014-02-28 04:09:57 +00:00
|
|
|
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;
|
2015-01-13 18:39:05 +00:00
|
|
|
#ifndef Q_OS_ANDROID
|
|
|
|
QWebView *facebookWebView;
|
|
|
|
#endif
|
2013-05-24 18:19:48 +00:00
|
|
|
};
|
|
|
|
|
2014-02-11 18:14:46 +00:00
|
|
|
#endif // PREFERENCES_H
|