2018-06-16 16:03:31 +02:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef QPREF_H
|
|
|
|
#define QPREF_H
|
|
|
|
|
|
|
|
#include "core/pref.h"
|
2018-07-25 10:49:48 -07:00
|
|
|
#include <QObject>
|
2018-06-16 16:03:31 +02:00
|
|
|
|
2018-07-12 10:15:09 +02:00
|
|
|
#include "qPrefAnimations.h"
|
2018-07-12 21:01:31 +02:00
|
|
|
#include "qPrefCloudStorage.h"
|
2018-06-15 10:53:42 +02:00
|
|
|
#include "qPrefDisplay.h"
|
2018-07-15 18:15:40 +02:00
|
|
|
#include "qPrefDiveComputer.h"
|
2018-08-01 17:14:04 +02:00
|
|
|
#include "qPrefDivePlanner.h"
|
2018-07-23 15:10:40 +02:00
|
|
|
#include "qPrefFacebook.h"
|
2018-07-27 10:25:43 +02:00
|
|
|
#include "qPrefProxy.h"
|
2018-07-31 15:04:12 +02:00
|
|
|
#include "qPrefUnit.h"
|
2018-08-03 19:24:53 +02:00
|
|
|
#include "qPrefUpdateManager.h"
|
2018-06-15 10:53:42 +02:00
|
|
|
|
2018-06-16 16:03:31 +02:00
|
|
|
class qPref : public QObject {
|
|
|
|
Q_OBJECT
|
2018-06-16 10:08:34 +02:00
|
|
|
Q_ENUMS(cloud_status);
|
2018-07-07 22:59:26 +02:00
|
|
|
Q_PROPERTY(QString canonical_version READ canonical_version);
|
|
|
|
Q_PROPERTY(QString mobile_version READ mobile_version);
|
2018-06-16 16:03:31 +02:00
|
|
|
|
|
|
|
public:
|
2018-06-16 10:08:34 +02:00
|
|
|
qPref(QObject *parent = NULL);
|
2018-06-16 16:03:31 +02:00
|
|
|
static qPref *instance();
|
|
|
|
|
|
|
|
// Load/Sync local settings (disk) and struct preference
|
|
|
|
void loadSync(bool doSync);
|
2018-08-02 18:32:51 +02:00
|
|
|
void load() { loadSync(false); }
|
|
|
|
void sync() { loadSync(true); }
|
2018-06-16 16:03:31 +02:00
|
|
|
|
|
|
|
public:
|
2018-07-05 20:37:53 +02:00
|
|
|
enum cloud_status {
|
|
|
|
CS_UNKNOWN,
|
|
|
|
CS_INCORRECT_USER_PASSWD,
|
|
|
|
CS_NEED_TO_VERIFY,
|
|
|
|
CS_VERIFIED,
|
|
|
|
CS_NOCLOUD
|
|
|
|
};
|
|
|
|
|
2018-07-07 22:59:26 +02:00
|
|
|
const QString canonical_version() const;
|
|
|
|
const QString mobile_version() const;
|
2018-06-16 16:03:31 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|