digiKam
itemextendedproperties.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-04
7  * Description : Access to extended properties of an item in the database
8  *
9  * Copyright (C) 2009-2013 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2009-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)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_ITEM_EXTENDED_PROPERTIES_H
26 #define DIGIKAM_ITEM_EXTENDED_PROPERTIES_H
27 
28 // Qt includes
29 
30 #include <QString>
31 #include <QStringList>
32 #include <QList>
33 
34 // Local includes
35 
36 #include "template.h"
37 #include "metadatainfo.h"
38 #include "digikam_export.h"
39 
40 namespace Digikam
41 {
42 
43 class DIGIKAM_DATABASE_EXPORT ItemExtendedProperties
44 {
45 
46 public:
47 
48  explicit ItemExtendedProperties(qlonglong imageid);
49 
54 
65  QString intellectualGenre();
66  void setIntellectualGenre(const QString& intellectualGenre);
67  void removeIntellectualGenre();
68 
77  QString jobId();
78  void setJobId(const QString& jobId);
79  void removeJobId();
80 
86  QStringList scene();
87  void setScene(const QStringList& scene);
88  void removeScene();
89 
99  QStringList subjectCode();
100  void setSubjectCode(const QStringList& subjectCode);
101  void removeSubjectCode();
102 
106  double similarityTo(const qlonglong imageId);
107  void setSimilarityTo(const qlonglong imageId, const double value);
108  void removeSimilarityTo(const qlonglong imageId);
109 
116  void setLocation(const IptcCoreLocationInfo& location);
117  void removeLocation();
118 
119 protected:
120 
121  QString readProperty(const QString& property);
122  void setProperty(const QString& property, const QString& value);
123  QStringList readFakeListProperty(const QString& property);
124  void setFakeListProperty(const QString& property, const QStringList& value);
125  void removeProperty(const QString& property);
126 
127 protected:
128 
129  qlonglong m_id;
130 };
131 
132 } // namespace Digikam
133 
134 #endif // DIGIKAM_ITEM_EXTENDED_PROPERTIES_H
Definition: metadatainfo.h:41
Definition: itemextendedproperties.h:44
qlonglong m_id
Definition: itemextendedproperties.h:129
qulonglong value
Definition: itemviewutilities.cpp:592
std::vector< T > location(const std::vector< T > &shape, unsigned long idx)
Definition: shapepredictor.h:109
Definition: datefolderview.cpp:43