digiKam
multistringsedit.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-08
7  * Description : a widget to edit a tag with multiple string entries.
8  *
9  * Copyright (C) 2007-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * ============================================================ */
22 
23 #ifndef DIGIKAM_MULTI_STRINGS_EDIT_H
24 #define DIGIKAM_MULTI_STRINGS_EDIT_H
25 
26 // Qt includes
27 
28 #include <QWidget>
29 #include <QLineEdit>
30 
32 {
33 
34 class MultiStringsEdit : public QWidget
35 {
36  Q_OBJECT
37 
38 public:
39 
40  explicit MultiStringsEdit(QWidget* const parent, const QString& title,
41  const QString& desc, int size=-1);
42  ~MultiStringsEdit() override;
43 
44  void setValues(const QStringList& values);
45  bool getValues(QStringList& oldValues, QStringList& newValues);
46 
47  QLineEdit* valueEdit() const;
48 
49 Q_SIGNALS:
50 
52 
53 private Q_SLOTS:
54 
55  void slotSelectionChanged();
56  void slotAddValue();
57  void slotDeleteValue();
58  void slotReplaceValue();
59 
60 private:
61 
62  class Private;
63  Private* const d;
64 };
65 
66 } // namespace DigikamGenericMetadataEditPlugin
67 
68 #endif // DIGIKAM_MULTI_STRINGS_EDIT_H
MultiStringsEdit(QWidget *const parent, const QString &title, const QString &desc, int size=-1)
Definition: multistringsedit.cpp:68
~MultiStringsEdit() override
Definition: multistringsedit.cpp:172
void setValues(const QStringList &values)
Definition: multistringsedit.cpp:255
QLineEdit * valueEdit() const
Definition: multistringsedit.cpp:177
bool getValues(QStringList &oldValues, QStringList &newValues)
Definition: multistringsedit.cpp:277
Definition: altlangstringedit.cpp:39