digiKam
altlangstringedit.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2007-10-18
7  * Description : a widget to edit a tag with multiple alternative
8  * language string entries.
9  *
10  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_ALT_LANG_STRING_EDIT_H
25 #define DIGIKAM_ALT_LANG_STRING_EDIT_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 
31 // Local includes
32 
33 #include "dmetadata.h"
34 
35 using namespace Digikam;
36 
38 {
39 
40 class AltLangStringsEdit : public QWidget
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit AltLangStringsEdit(QWidget* const parent, const QString& title, const QString& desc);
47  ~AltLangStringsEdit() override;
48 
49  void setValues(const DMetadata::AltLangMap& values);
50  bool getValues(DMetadata::AltLangMap& oldValues, DMetadata::AltLangMap& newValues);
51 
52  void setValid(bool v);
53  bool isValid() const;
54 
55  QString defaultAltLang() const;
56  bool asDefaultAltLang() const;
57 
58 Q_SIGNALS:
59 
60  void signalToggled(bool);
63 
64 private Q_SLOTS:
65 
66  void slotSelectionChanged(const QString& lang);
67 
68 private:
69 
70  class Private;
71  Private* const d;
72 };
73 
74 } // namespace DigikamGenericMetadataEditPlugin
75 
76 #endif // DIGIKAM_ALT_LANG_STRING_EDIT_H
QMap< QString, QString > AltLangMap
Definition: metaengine.h:143
Definition: altlangstringedit.cpp:39
Definition: datefolderview.cpp:43