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-08-14 07:56:20 +00:00
|
|
|
|
2018-07-25 17:49:48 +00:00
|
|
|
#include <QObject>
|
2018-09-04 09:18:43 +00:00
|
|
|
#include <QQmlEngine>
|
2018-06-16 14:03:31 +00:00
|
|
|
|
2019-04-03 21:31:28 +00:00
|
|
|
class qPref {
|
2018-06-16 14:03:31 +00:00
|
|
|
public:
|
|
|
|
// Load/Sync local settings (disk) and struct preference
|
2018-08-14 07:56:20 +00:00
|
|
|
static void load() { loadSync(false); }
|
|
|
|
static void sync() { loadSync(true); }
|
2018-06-16 14:03:31 +00:00
|
|
|
|
2018-08-31 09:57:28 +00:00
|
|
|
// Register QML
|
2019-04-03 21:28:26 +00:00
|
|
|
static void registerQML(QQmlEngine *engine);
|
2018-08-31 09:57:28 +00:00
|
|
|
|
2018-08-14 07:56:20 +00:00
|
|
|
private:
|
|
|
|
static void loadSync(bool doSync);
|
2018-06-16 14:03:31 +00:00
|
|
|
};
|
|
|
|
#endif
|