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