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-18
0007  * Description : a widget to edit multiple alternative
0008  *               language string entries and an activation checkbox.
0009  *
0010  * SPDX-FileCopyrightText: 2007-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 #ifndef DIGIKAM_ALT_LANG_STRING_EDIT_H
0017 #define DIGIKAM_ALT_LANG_STRING_EDIT_H
0018 
0019 // Qt includes
0020 
0021 #include <QWidget>
0022 
0023 // Local includes
0024 
0025 #include "dmetadata.h"
0026 #include "altlangstredit.h"
0027 
0028 using namespace Digikam;
0029 
0030 namespace DigikamGenericMetadataEditPlugin
0031 {
0032 
0033 class AltLangStringsEdit : public AltLangStrEdit
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     explicit AltLangStringsEdit(QWidget* const parent, const QString& title, const QString& desc);
0040     ~AltLangStringsEdit()                                   override;
0041 
0042     void setValid(bool v);
0043     bool isValid()                                   const;
0044 
0045     void setValues(const DMetadata::AltLangMap& values)     override;
0046     bool getValues(DMetadata::AltLangMap& oldValues,
0047                    DMetadata::AltLangMap& newValues) const;
0048 
0049 Q_SIGNALS:
0050 
0051     void signalToggled(bool);
0052     void signalModified();
0053     void signalDefaultLanguageEnabled(bool);
0054 
0055 private Q_SLOTS:
0056 
0057     void slotSelectionChanged(const QString& lang);
0058 
0059 private:
0060 
0061     class Private;
0062     Private* const d;
0063 };
0064 
0065 } // namespace DigikamGenericMetadataEditPlugin
0066 
0067 #endif // DIGIKAM_ALT_LANG_STRING_EDIT_H