2020-07-06 15:04:02 +02:00
|
|
|
/*
|
|
|
|
Speed Climbing Stopwatch - Simple Stopwatch for Climbers
|
|
|
|
Copyright (C) 2018 Itsblue Development - Dorian Zeder
|
|
|
|
|
|
|
|
This program is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, version 3 of the License.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "headers/scstwappsettings.h"
|
|
|
|
|
|
|
|
ScStwAppSettings * pGlobalAppSettings = nullptr;
|
|
|
|
|
2020-07-10 15:20:41 +02:00
|
|
|
ScStwAppSettings::ScStwAppSettings(ScStwClient * client, QObject* parent)
|
|
|
|
:ScStwRemoteSettings(client, parent)
|
2020-07-06 15:04:02 +02:00
|
|
|
{
|
2020-07-30 11:29:11 +02:00
|
|
|
this->registerKeyLevelConverters(ScStwAppSettings::KeyLevel, &ScStwAppSettings::keyToString, &ScStwAppSettings::keyToType);
|
2020-07-06 15:04:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
QVariant ScStwAppSettings::readSetting(AppInternalSetting key) {
|
2020-07-11 20:30:50 +02:00
|
|
|
return this->readSetting(key, 1);
|
2020-07-06 15:04:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
bool ScStwAppSettings::writeSetting(AppInternalSetting key, QVariant value) {
|
2020-07-11 20:30:50 +02:00
|
|
|
return this->writeSetting(key, 1, value);
|
2020-07-10 15:20:41 +02:00
|
|
|
}
|
|
|
|
|
2020-07-11 20:30:50 +02:00
|
|
|
bool ScStwAppSettings::setDefaultSetting(AppInternalSetting key, QVariant defaultValue) {
|
|
|
|
return this->setDefaultSetting(key, 1, defaultValue);
|
2020-07-06 15:04:02 +02:00
|
|
|
}
|
|
|
|
|