File indexing completed on 2025-01-05 03:52:05

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 "stringthemeparameter.h"
0017 
0018 // Qt includes
0019 
0020 #include <QLineEdit>
0021 
0022 namespace DigikamGenericHtmlGalleryPlugin
0023 {
0024 
0025 QWidget* StringThemeParameter::createWidget(QWidget* parent, const QString& value) const
0026 {
0027     QLineEdit* const edit = new QLineEdit(parent);
0028     edit->setText(value);
0029 
0030     return edit;
0031 }
0032 
0033 QString StringThemeParameter::valueFromWidget(QWidget* widget) const
0034 {
0035     Q_ASSERT(widget);
0036     QLineEdit* const edit = static_cast<QLineEdit*>(widget);
0037 
0038     return edit->text();
0039 }
0040 
0041 } // namespace DigikamGenericHtmlGalleryPlugin