digiKam
multivaluesedit.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 fixed values.
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_VALUES_EDIT_H
24 #define DIGIKAM_MULTI_VALUES_EDIT_H
25 
26 // Qt includes
27 
28 #include <QWidget>
29 
31 {
32 
33 class MultiValuesEdit : public QWidget
34 {
35  Q_OBJECT
36 
37 public:
38 
39  explicit MultiValuesEdit(QWidget* const parent, const QString& title, const QString& desc);
40  ~MultiValuesEdit() override;
41 
42  void setValid(bool v);
43  bool isValid() const;
44 
45  void setData(const QStringList& data);
46  QStringList getData() const;
47 
48  void setValues(const QStringList& values);
49  bool getValues(QStringList& oldValues, QStringList& newValues);
50 
51 Q_SIGNALS:
52 
54 
55 private Q_SLOTS:
56 
57  void slotSelectionChanged();
58  void slotAddValue();
59  void slotDeleteValue();
60  void slotReplaceValue();
61 
62 private:
63 
64  class Private;
65  Private* const d;
66 };
67 
68 } // namespace DigikamGenericMetadataEditPlugin
69 
70 #endif // DIGIKAM_MULTI_VALUES_EDIT_H
MultiValuesEdit(QWidget *const parent, const QString &title, const QString &desc)
Definition: multivaluesedit.cpp:75
void setValid(bool v)
Definition: multivaluesedit.cpp:301
~MultiValuesEdit() override
Definition: multivaluesedit.cpp:167
void setValues(const QStringList &values)
Definition: multivaluesedit.cpp:265
bool isValid() const
Definition: multivaluesedit.cpp:306
bool getValues(QStringList &oldValues, QStringList &newValues)
Definition: multivaluesedit.cpp:287
QStringList getData() const
Definition: multivaluesedit.cpp:253
void setData(const QStringList &data)
Definition: multivaluesedit.cpp:243
Definition: altlangstringedit.cpp:39