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