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