You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
core/settings-daemon/mouse/libinputsettings.cpp

40 lines
858 B
C++

/*
SPDX-FileCopyrightText: 2018 Roman Gilg <subdiff@gmail.com>
SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "libinputsettings.h"
#include <QDebug>
#include <QSettings>
template<>
bool LibinputSettings::load(QString key, bool defVal)
{
QSettings settings("cutefishos", "mouse");
return settings.value(key, defVal).toBool();
}
template<>
qreal LibinputSettings::load(QString key, qreal defVal)
{
QSettings settings("cutefishos", "mouse");
return settings.value(key, defVal).toReal();
}
template<>
void LibinputSettings::save(QString key, bool val)
{
QSettings settings("cutefishos", "mouse");
settings.setValue(key, val);
settings.sync();
}
template<>
void LibinputSettings::save(QString key, qreal val)
{
QSettings settings("cutefishos", "mouse");
settings.setValue(key, val);
settings.sync();
}