digiKam
captionedit.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 : 2009-07-12
7  * Description : caption editor
8  *
9  * Copyright (C) 2009-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)
15  * 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_CAPTION_EDIT_H
25 #define DIGIKAM_CAPTION_EDIT_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QString>
31 #include <QDateTime>
32 #include <QTextEdit>
33 
34 // Local includes
35 
36 #include "dlayoutbox.h"
37 #include "captionvalues.h"
38 
39 namespace Digikam
40 {
41 
42 class CaptionEdit : public DVBox
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit CaptionEdit(QWidget* const parent);
49  ~CaptionEdit() override;
50 
51  void setValues(const CaptionsMap& values);
52  CaptionsMap& values() const;
53 
54  void setCurrentLanguageCode(const QString& lang);
55  QString currentLanguageCode() const;
56 
57  void reset();
58 
59  QTextEdit* textEdit() const;
60 
61 Q_SIGNALS:
62 
64 
65 private Q_SLOTS:
66 
67  void slotSelectionChanged(const QString&);
68  void slotCaptionModified(const QString&, const QString&);
69  void slotAddValue(const QString&, const QString&);
70  void slotDeleteValue(const QString&);
71  void slotAuthorChanged(const QString&);
72 
73 private:
74 
75  class Private;
76  Private* const d;
77 };
78 
79 } // namespace Digikam
80 
81 #endif // DIGIKAM_CAPTION_EDIT_H
Definition: captionedit.h:43
CaptionEdit(QWidget *const parent)
Definition: captionedit.cpp:62
~CaptionEdit() override
Definition: captionedit.cpp:94
QTextEdit * textEdit() const
Definition: captionedit.cpp:192
void setCurrentLanguageCode(const QString &lang)
Definition: captionedit.cpp:115
QString currentLanguageCode() const
Definition: captionedit.cpp:110
void setValues(const CaptionsMap &values)
Definition: captionedit.cpp:168
void reset()
Definition: captionedit.cpp:99
CaptionsMap & values() const
Definition: captionedit.cpp:177
Definition: captionvalues.h:69
Definition: dlayoutbox.h:75
Definition: datefolderview.cpp:43