digiKam
Loading...
Searching...
No Matches
tagproperties.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-05
7 * Description : Access to the properties of a tag in the database
8 *
9 * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QString>
20#include <QStringList>
21#include <QList>
22#include <QExplicitlySharedDataPointer>
23#include <QMultiMap>
24
25// Local includes
26
27#include "digikam_export.h"
28
29namespace Digikam
30{
31
32class DIGIKAM_DATABASE_EXPORT TagProperties
33{
34public:
35
42
46 explicit TagProperties(int tagId);
47
49 TagProperties(const TagProperties& other);
50 TagProperties& operator=(const TagProperties& other);
51
52 bool isNull() const;
53
54 int tagId() const;
55
60 static TagProperties getOrCreate(const QString& tagPath);
61
65 bool hasProperty(const QString& key) const;
66
70 bool hasProperty(const QString& key, const QString& value) const;
71
78 QString value(const QString& key) const;
79
81 QStringList propertyKeys() const;
82
84 QMultiMap<QString, QString> properties() const;
85
87 void setProperty(const QString& key, const QString& value);
88
93 void addProperty(const QString& key, const QString& value);
94
96 void removeProperty(const QString& key, const QString& value);
97
99 void removeProperties(const QString& key);
100
101public:
102
104 class TagPropertiesPriv;
105
106private:
107
108 QExplicitlySharedDataPointer<TagPropertiesPriv> d;
109};
110
111} // namespace Digikam
Definition tagproperties.h:33
qulonglong value
Definition itemviewutilities.cpp:585
Definition datefolderview.cpp:34