File indexing completed on 2024-05-05 04:55:40

0001 /**
0002  * \file dummysettings.cpp
0003  * Application settings stub for tests.
0004  *
0005  * \b Project: Kid3
0006  * \author Urs Fleisch
0007  * \date 03 Jun 2013
0008  *
0009  * Copyright (C) 2013-2018  Urs Fleisch
0010  *
0011  * This file is part of Kid3.
0012  *
0013  * Kid3 is free software; you can redistribute it and/or modify
0014  * it under the terms of the GNU General Public License as published by
0015  * the Free Software Foundation; either version 2 of the License, or
0016  * (at your option) any later version.
0017  *
0018  * Kid3 is distributed in the hope that it will be useful,
0019  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0020  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0021  * GNU General Public License for more details.
0022  *
0023  * You should have received a copy of the GNU General Public License
0024  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
0025  */
0026 
0027 #include "dummysettings.h"
0028 
0029 /**
0030  * Constructor.
0031  */
0032 DummySettings::DummySettings()
0033 {
0034 }
0035 
0036 /**
0037  * Use settings subgroup.
0038  * @param prefix group name
0039  * @param forState true if this group stores state information
0040  */
0041 void DummySettings::beginGroup(const QString& prefix, bool forState)
0042 {
0043   Q_UNUSED(prefix)
0044   Q_UNUSED(forState)
0045 }
0046 
0047 /**
0048  * Finnish using settings subgroup.
0049  */
0050 void DummySettings::endGroup()
0051 {
0052 }
0053 
0054 /**
0055  * Set value for setting.
0056  * @param key name of setting
0057  * @param value value for setting
0058  */
0059 void DummySettings::setValue(const QString& key, const QVariant& value)
0060 {
0061   Q_UNUSED(key)
0062   Q_UNUSED(value)
0063 }
0064 
0065 /**
0066  * Get value for setting.
0067  * @param key name of setting
0068  * @param defaultValue default value
0069  * @return value of setting as variant.
0070  */
0071 QVariant DummySettings::value(const QString& key,
0072                               const QVariant& defaultValue) const
0073 {
0074   Q_UNUSED(key)
0075   return defaultValue;
0076 }
0077 
0078 /**
0079  * Remove setting.
0080  * @param key name of setting
0081  */
0082 void DummySettings::remove(const QString& key)
0083 {
0084   Q_UNUSED(key)
0085 }
0086 
0087 /**
0088  * Check if setting exists.
0089  * @param key name of setting
0090  * @return true if setting exists.
0091  */
0092 bool DummySettings::contains(const QString& key) const
0093 {
0094   Q_UNUSED(key)
0095   return false;
0096 }
0097 
0098 /**
0099  * Write unsaved changes to permanent storage.
0100  */
0101 void DummySettings::sync()
0102 {
0103 }