subsurface/core/settings/qPref.cpp
jan Iversen ebc0e6d3f3 core/tests: merge Animations and add vars. to qPrefDisplay
Add class variable tooltip_position to qPrefDisplay
Add class variable lastDir to qPrefDisplay
qPrefDisplay is updated to use new qPrefPrivate functions
Adjust test cases incl. qml tests

qPrefAnimations only has 1 variable, that really is a display variable
Merge the variable into qPrefDisplay, to simplify setup (and avoid loading
extra page in qml).

correct theme to save in correct place, and make it a static
class variable

Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25 11:49:47 -07:00

33 lines
952 B
C++

// SPDX-License-Identifier: GPL-2.0
#include "qPref.h"
#include "qPrefPrivate.h"
qPref::qPref(QObject *parent) : QObject(parent)
{
}
qPref *qPref::instance()
{
static qPref *self = new qPref;
return self;
}
void qPref::loadSync(bool doSync)
{
if (!doSync)
uiLanguage(NULL);
qPrefCloudStorage::instance()->loadSync(doSync);
qPrefDisplay::instance()->loadSync(doSync);
qPrefDiveComputer::instance()->loadSync(doSync);
qPrefDivePlanner::instance()->loadSync(doSync);
// qPrefFaceook does not use disk.
qPrefGeneral::instance()->loadSync(doSync);
qPrefGeocoding::instance()->loadSync(doSync);
qPrefLanguage::instance()->loadSync(doSync);
qPrefLocationService::instance()->loadSync(doSync);
qPrefPartialPressureGas::instance()->loadSync(doSync);
qPrefProxy::instance()->loadSync(doSync);
qPrefTechnicalDetails::instance()->loadSync(doSync);
qPrefUnits::instance()->loadSync(doSync);
qPrefUpdateManager::instance()->loadSync(doSync);
}