digiKam
Loading...
Searching...
No Matches
captionvalues.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-13
7 * Description : caption values container
8 *
9 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QMap>
20#include <QString>
21#include <QDateTime>
22#include <QDebug>
23
24// Local includes
25
26#include "digikam_export.h"
27#include "metaengine.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_EXPORT CaptionValues
33{
34public:
35
36 CaptionValues() = default;
37 ~CaptionValues() = default;
38
39 bool operator==(const CaptionValues& val) const;
40
41public:
42
43 QString caption;
44 QString author;
45 QDateTime date;
46};
47
49DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const CaptionValues& val);
50
51// --------------------------------------------------------------------
52
58class DIGIKAM_EXPORT CaptionsMap : public QMap<QString, CaptionValues>
59{
60public:
61
62 CaptionsMap() = default;
63 ~CaptionsMap() = default;
64
65 void setData(const MetaEngine::AltLangMap& comments,
66 const MetaEngine::AltLangMap& authors,
67 const QString& commonAuthor,
68 const MetaEngine::AltLangMap& dates);
69
70 void fromAltLangMap(const MetaEngine::AltLangMap& map);
71 MetaEngine::AltLangMap toAltLangMap() const;
72
78 void setAuthorsList(const MetaEngine::AltLangMap& map, const QString& commonAuthor = QString());
79 MetaEngine::AltLangMap authorsList() const;
80
81 void setDatesList(const MetaEngine::AltLangMap& map);
82 MetaEngine::AltLangMap datesList() const;
83};
84
85} // namespace Digikam
86
87Q_DECLARE_METATYPE(Digikam::CaptionValues)
88Q_DECLARE_METATYPE(Digikam::CaptionsMap)
Definition captionvalues.h:33
QString author
Definition captionvalues.h:44
QDateTime date
Definition captionvalues.h:45
QString caption
Definition captionvalues.h:43
Definition captionvalues.h:59
QMap< QString, QString > AltLangMap
Definition metaengine.h:135
Definition datefolderview.cpp:34
QDebug operator<<(QDebug dbg, const DbEngineParameters &p)
Definition dbengineparameters.cpp:930
bool operator==(const SearchTextSettings &a, const SearchTextSettings &b)
Definition searchtextbar.cpp:40