File indexing completed on 2025-01-19 03:51:20

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2007-10-08
0007  * Description : a widget to edit a tag with multiple string entries.
0008  *
0009  * SPDX-FileCopyrightText: 2007-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_MULTI_STRINGS_EDIT_H
0016 #define DIGIKAM_MULTI_STRINGS_EDIT_H
0017 
0018 // Qt includes
0019 
0020 #include <QWidget>
0021 
0022 namespace DigikamGenericMetadataEditPlugin
0023 {
0024 
0025 class MultiStringsEdit : public QWidget
0026 {
0027     Q_OBJECT
0028 
0029 public:
0030 
0031     explicit MultiStringsEdit(QWidget* const parent, const QString& title,
0032                               const QString& desc, int size = -1);
0033     ~MultiStringsEdit() override;
0034 
0035     void setValues(const QStringList& values);
0036     bool getValues(QStringList& oldValues, QStringList& newValues);
0037 
0038 Q_SIGNALS:
0039 
0040     void signalModified();
0041 
0042 private Q_SLOTS:
0043 
0044     void slotSelectionChanged();
0045     void slotAddValue();
0046     void slotDeleteValue();
0047     void slotReplaceValue();
0048     void slotLineEditModified();
0049 
0050 private:
0051 
0052     class Private;
0053     Private* const d;
0054 };
0055 
0056 } // namespace DigikamGenericMetadataEditPlugin
0057 
0058 #endif // DIGIKAM_MULTI_STRINGS_EDIT_H