25 #ifndef DIGIKAM_TAGS_CACHE_H
26 #define DIGIKAM_TAGS_CACHE_H
40 class DIGIKAM_DATABASE_EXPORT
TagsCache :
public QObject
65 QString tagName(
int id)
const;
66 QStringList tagNames(
const QList<int>& ids, HiddenTagsPolicy hiddenTagsPolicy = IncludeHiddenTags)
const;
73 QString tagPath(
int id, LeadingSlashPolicy slashPolicy = IncludeLeadingSlash)
const;
75 LeadingSlashPolicy slashPolicy = IncludeLeadingSlash,
76 HiddenTagsPolicy hiddenTagsPolicy = IncludeHiddenTags)
const;
81 bool hasTag(
int id)
const;
86 int parentTag(
int id)
const;
100 QList<int> tagsForName(
const QString& tagName, HiddenTagsPolicy hiddenTagsPolicy = NoHiddenTags)
const;
107 int tagForName(
const QString& tagName,
int parentId = 0)
const;
116 int tagForPath(
const QString& path)
const;
117 QList<int> tagsForPaths(
const QStringList& tagPaths)
const;
126 int createTag(
const QString& tagPathToCreate);
127 QList<int> createTags(
const QStringList& tagPaths);
134 int getOrCreateTag(
const QString& tagPath);
135 QList<int> getOrCreateTags(
const QStringList& tagPaths);
142 int getOrCreateTagWithProperty(
const QString& tagPath,
143 const QString& property,
144 const QString&
value = QString());
151 bool hasProperty(
int tagId,
const QString& property,
const QString&
value = QString())
const;
159 QString propertyValue(
int tagId,
const QString& property)
const;
160 QStringList propertyValues(
int tagId,
const QString& property)
const;
166 QMap<QString, QString> properties(
int tagId)
const;
174 QList<int> tagsWithProperty(
const QString& property,
const QString&
value = QString())
const;
182 QList<int> tagsWithPropertyCached(
const QString& property)
const;
188 bool isInternalTag(
int tagId)
const;
200 bool containsPublicTags(
const QList<int>& tagIds)
const;
206 bool canBeWrittenToMetadata(
int tagId)
const;
213 int getOrCreateInternalTag(
const QString& tagName);
219 int tagForColorLabel(
int label);
224 QVector<int> colorLabelTags();
230 int colorLabelForTag(
int tagId);
243 int tagForPickLabel(
int label);
248 QVector<int> pickLabelTags();
254 int pickLabelForTag(
int tagId);
266 QList<int> tagsContaining(
const QString& fragment,
267 Qt::CaseSensitivity caseSensitivity = Qt::CaseInsensitive,
268 HiddenTagsPolicy hiddenTagsPolicy = NoHiddenTags);
269 QList<int> tagsStartingWith(
const QString& begin,
270 Qt::CaseSensitivity caseSensitivity = Qt::CaseInsensitive,
271 HiddenTagsPolicy hiddenTagsPolicy = NoHiddenTags);
281 QStringList shortenedTagPaths(
const QList<int>& ids,
282 LeadingSlashPolicy slashPolicy = IncludeLeadingSlash,
283 HiddenTagsPolicy hiddenTagsPolicy = IncludeHiddenTags)
const;
286 LeadingSlashPolicy slashPolicy = IncludeLeadingSlash,
287 HiddenTagsPolicy hiddenTagsPolicy = IncludeHiddenTags)
const;
293 static QLatin1String tagPathOfDigikamInternalTags(LeadingSlashPolicy slashPolicy = IncludeLeadingSlash);
294 static QLatin1String propertyNameDigikamInternalTag();
295 static QLatin1String propertyNameExcludedFromWriting();
325 friend class TagsCacheCreator;
Definition: albummanager_p.h:215
Definition: coredbaccess.h:56
Definition: coredbchangesets.h:298
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43