2018-06-16 14:03:31 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#ifndef QPREF_H
|
|
|
|
#define QPREF_H
|
|
|
|
|
|
|
|
#include <QObject>
|
2018-06-15 08:53:42 +00:00
|
|
|
#include <QSettings>
|
2018-06-16 14:03:31 +00:00
|
|
|
#include "core/pref.h"
|
|
|
|
|
2018-06-15 08:53:42 +00:00
|
|
|
#include "qPrefDisplay.h"
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|