2018-08-12 15:57:45 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2018-08-14 10:25:15 +00:00
|
|
|
#include "qPrefGeneral.h"
|
2018-08-12 15:57:45 +00:00
|
|
|
#include "qPrefPrivate.h"
|
|
|
|
|
|
|
|
static const QString group = QStringLiteral("GeneralSettings");
|
|
|
|
|
2018-08-20 10:50:21 +00:00
|
|
|
QString qPrefGeneral::st_diveshareExport_uid;
|
2019-04-01 21:17:17 +00:00
|
|
|
static const QString st_diveshareExport_uid_default;
|
2018-08-20 10:50:21 +00:00
|
|
|
|
|
|
|
bool qPrefGeneral::st_diveshareExport_private;
|
|
|
|
static const bool st_diveshareExport_private_default = false;
|
|
|
|
|
2018-08-12 15:57:45 +00:00
|
|
|
qPrefGeneral *qPrefGeneral::instance()
|
|
|
|
{
|
|
|
|
static qPrefGeneral *self = new qPrefGeneral;
|
|
|
|
return self;
|
|
|
|
}
|
|
|
|
|
|
|
|
void qPrefGeneral::loadSync(bool doSync)
|
|
|
|
{
|
|
|
|
disk_defaultsetpoint(doSync);
|
|
|
|
disk_o2consumption(doSync);
|
|
|
|
disk_pscr_ratio(doSync);
|
2018-10-20 00:50:40 +00:00
|
|
|
|
2018-08-20 10:50:21 +00:00
|
|
|
if (!doSync) {
|
|
|
|
load_diveshareExport_uid();
|
|
|
|
load_diveshareExport_private();
|
|
|
|
}
|
2018-08-12 15:57:45 +00:00
|
|
|
}
|
|
|
|
|
2018-09-07 16:06:00 +00:00
|
|
|
HANDLE_PREFERENCE_INT(General, "defaultsetpoint", defaultsetpoint);
|
2018-08-12 15:57:45 +00:00
|
|
|
|
2018-09-07 16:06:00 +00:00
|
|
|
HANDLE_PREFERENCE_INT(General, "o2consumption", o2consumption);
|
2018-08-12 15:57:45 +00:00
|
|
|
|
2018-09-07 16:06:00 +00:00
|
|
|
HANDLE_PREFERENCE_INT(General, "pscr_ratio", pscr_ratio);
|
2018-08-12 15:57:45 +00:00
|
|
|
|
2018-08-20 10:50:21 +00:00
|
|
|
HANDLE_PROP_QSTRING(General, "diveshareExport/uid", diveshareExport_uid);
|
|
|
|
|
|
|
|
HANDLE_PROP_BOOL(General, "diveshareExport/private", diveshareExport_private);
|