digiKam
objectattributesedit.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 Application2 ObjectAttribute
8  * Iptc tag.
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_OBJECT_ATTRIBUTES_EDIT_H
25 #define DIGIKAM_OBJECT_ATTRIBUTES_EDIT_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QLineEdit>
31 
33 {
34 
35 class ObjectAttributesEdit : public QWidget
36 {
37  Q_OBJECT
38 
39 public:
40 
41  explicit ObjectAttributesEdit(QWidget* const parent, int size=-1);
42  ~ObjectAttributesEdit() override;
43 
44  void setValid(bool v);
45  bool isValid() const;
46 
47  void setValues(const QStringList& values);
48  bool getValues(QStringList& oldValues, QStringList& newValues);
49 
50  QLineEdit* valueEdit() const;
51 
52 Q_SIGNALS:
53 
55 
56 private Q_SLOTS:
57 
58  void slotSelectionChanged();
59  void slotAddValue();
60  void slotDeleteValue();
61  void slotReplaceValue();
62 
63 private:
64 
65  class Private;
66  Private* const d;
67 };
68 
69 } // namespace DigikamGenericMetadataEditPlugin
70 
71 #endif // DIGIKAM_OBJECT_ATTRIBUTES_EDIT_H
Definition: objectattributesedit.h:36
bool getValues(QStringList &oldValues, QStringList &newValues)
Definition: objectattributesedit.cpp:328
QLineEdit * valueEdit() const
Definition: objectattributesedit.cpp:222
ObjectAttributesEdit(QWidget *const parent, int size=-1)
Definition: objectattributesedit.cpp:81
void setValid(bool v)
Definition: objectattributesedit.cpp:342
bool isValid() const
Definition: objectattributesedit.cpp:347
~ObjectAttributesEdit() override
Definition: objectattributesedit.cpp:217
void setValues(const QStringList &values)
Definition: objectattributesedit.cpp:306
Definition: altlangstringedit.cpp:39