File indexing completed on 2025-01-05 03:52:04
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2006-04-04 0007 * Description : a tool to generate HTML image galleries 0008 * 0009 * SPDX-FileCopyrightText: 2006-2010 by Aurelien Gateau <aurelien dot gateau at free dot fr> 0010 * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #include "abstractthemeparameter.h" 0017 0018 // KDE includes 0019 0020 #include <kconfiggroup.h> 0021 0022 static const char* NAME_KEY = "Name"; 0023 static const char* DEFAULT_VALUE_KEY = "Default"; 0024 0025 namespace DigikamGenericHtmlGalleryPlugin 0026 { 0027 0028 class Q_DECL_HIDDEN AbstractThemeParameter::Private 0029 { 0030 public: 0031 0032 explicit Private() 0033 { 0034 } 0035 0036 QByteArray internalName; 0037 QString name; 0038 QString defaultValue; 0039 }; 0040 0041 AbstractThemeParameter::AbstractThemeParameter() 0042 : d(new Private) 0043 { 0044 } 0045 0046 AbstractThemeParameter::~AbstractThemeParameter() 0047 { 0048 delete d; 0049 } 0050 0051 void AbstractThemeParameter::init(const QByteArray& internalName, const KConfigGroup* group) 0052 { 0053 d->internalName = internalName; 0054 d->name = group->readEntry(NAME_KEY); 0055 d->defaultValue = group->readEntry(DEFAULT_VALUE_KEY); 0056 } 0057 0058 QByteArray AbstractThemeParameter::internalName() const 0059 { 0060 return d->internalName; 0061 } 0062 0063 QString AbstractThemeParameter::name() const 0064 { 0065 return d->name; 0066 } 0067 0068 QString AbstractThemeParameter::defaultValue() const 0069 { 0070 return d->defaultValue; 0071 } 0072 0073 } // namespace DigikamGenericHtmlGalleryPlugin