KFileMetaData 5.109.0
properties.h
Go to the documentation of this file.
1/*
2 This file is part of KFileMetaData
3 SPDX-FileCopyrightText: 2014 Vishesh Handa <me@vhanda.in>
4
5 SPDX-License-Identifier: LGPL-2.1-or-later
6*/
7
8#ifndef KFILEMETADATA_PROPERTIES
9#define KFILEMETADATA_PROPERTIES
10
11#include "kfilemetadata_export.h"
12
13#include <QMap>
14#include <QVariant>
15
17namespace KFileMetaData {
18namespace Property {
19
26 FirstProperty = 0,
27 Empty = 0,
28
34
40
46
53
60
66
72
78
85
91
97
103
109
115
122
128
135
140
146
152
160
161#if KFILEMETADATA_ENABLE_DEPRECATED_SINCE(5, 50)
166 Langauge KFILEMETADATA_ENUMERATOR_DEPRECATED_VERSION_BELATED(5, 82, 5, 50, "Use Language") = Language,
167#endif
168
173
178
186
192
198
204
210
215
222
223#if KFILEMETADATA_ENABLE_DEPRECATED_SINCE(5, 60)
228 ImageMake KFILEMETADATA_ENUMERATOR_DEPRECATED_VERSION_BELATED(5, 82, 5, 60, "Use Manufacturer") = Manufacturer,
229#endif
230
237
238#if KFILEMETADATA_ENABLE_DEPRECATED_SINCE(5, 60)
243 ImageModel KFILEMETADATA_ENUMERATOR_DEPRECATED_VERSION_BELATED(5, 82, 5, 60, "Use Model") = Model,
244#endif
245
246 ImageDateTime,
247 ImageOrientation,
248 PhotoFlash,
249 PhotoPixelXDimension,
250 PhotoPixelYDimension,
251 PhotoDateTimeOriginal,
252 PhotoFocalLength,
253 PhotoFocalLengthIn35mmFilm,
254 PhotoExposureTime,
255 PhotoFNumber,
256 PhotoApertureValue,
257 PhotoExposureBiasValue,
258 PhotoWhiteBalance,
259 PhotoMeteringMode,
260 PhotoISOSpeedRatings,
261 PhotoSaturation,
262 PhotoSharpness,
263 PhotoGpsLatitude,
264 PhotoGpsLongitude,
265 PhotoGpsAltitude,
266
267 TranslationUnitsTotal,
268 TranslationUnitsWithTranslation,
269 TranslationUnitsWithDraftTranslation,
270 TranslationLastAuthor,
271 TranslationLastUpDate,
272 TranslationTemplateDate,
273
278
283
288
293
298
303
308
313
318
323
328
333
338
343
370
376
377 PropertyCount,
378 LastProperty = PropertyCount-1,
379
380};
381
382} // namespace Property
383
384typedef QMap<Property::Property, QVariant> PropertyMap;
385using PropertyMultiMap = QMultiMap<Property::Property, QVariant>;
386
387#if QT_DEPRECATED_SINCE(5, 15)
388#if KFILEMETADATA_ENABLE_DEPRECATED_SINCE(5, 89)
389QT_WARNING_PUSH
390QT_WARNING_DISABLE_CLANG("-Wdeprecated-declarations")
391QT_WARNING_DISABLE_GCC("-Wdeprecated-declarations")
392
393KFILEMETADATA_DEPRECATED_VERSION(5, 89, "Deprecated for lack of usage, manaully convert the data if needed")
394inline QVariantMap toVariantMap(const PropertyMap& propMap) {
395 QVariantMap varMap;
396 PropertyMap::const_iterator it = propMap.constBegin();
397 for (; it != propMap.constEnd(); ++it) {
398 int p = static_cast<int>(it.key());
399 varMap.insertMulti(QString::number(p), it.value());
400 }
401
402 return varMap;
403}
404
405KFILEMETADATA_DEPRECATED_VERSION(5, 89, "Deprecated for lack of usage, manaully convert the data if needed")
406inline PropertyMap toPropertyMap(const QVariantMap& varMap) {
407 PropertyMap propMap;
408 QVariantMap::const_iterator it = varMap.constBegin();
409 for (; it != varMap.constEnd(); ++it) {
410 int p = it.key().toInt();
411 propMap.insertMulti(static_cast<Property::Property>(p), it.value());
412 }
413
414 return propMap;
415}
416QT_WARNING_POP
417#endif
418#endif
419
420} // namespace KFileMetaData
421
422Q_DECLARE_METATYPE(KFileMetaData::Property::Property)
423
424#endif
Property
The Property enum contains all files property types that KFileMetaData manipulates.
Definition properties.h:25
@ Album
Represents the album of a media file.
Definition properties.h:90
@ Width
Represents the width of the Media in pixels.
Definition properties.h:197
@ Opus
Represents the opus of an audio file mostly used for classical music.
Definition properties.h:327
@ TrackNumber
Represents the track number in a set.
Definition properties.h:65
@ Lyrics
Contains the lyrics of a song embedded in the file.
Definition properties.h:351
@ WordCount
The number of words in a document.
Definition properties.h:145
@ Subject
Refers to the subject of the file.
Definition properties.h:127
@ Title
Refers to the Title of the content of the file.
Definition properties.h:121
@ FrameRate
Number of frames per second.
Definition properties.h:214
@ Author
The Author field indicated the primary creator of a document.
Definition properties.h:114
@ Genre
The Genre of an Audio file.
Definition properties.h:52
@ Rating
For ratings stored in Metadata tags.
Definition properties.h:347
@ Height
Represents the height of the Media in pixels.
Definition properties.h:203
@ Composer
Represents the Composer of a media file.
Definition properties.h:102
@ AspectRatio
The Aspect Ratio of the visual image or video.
Definition properties.h:209
@ AlbumArtist
Represents the album artist of a media file.
Definition properties.h:96
@ Comment
Represents a comment stored in the file.
Definition properties.h:77
@ Description
Represents the description stored in the file.
Definition properties.h:375
@ OriginEmailSender
The sender of the email this file was originally attached to.
Definition properties.h:287
@ Channels
The number of channels of the Audio in the File.
Definition properties.h:39
@ Generator
Refers to the Application used to create this file.
Definition properties.h:134
@ PageCount
The number of pages in a document.
Definition properties.h:139
@ CreationDate
The date the content of the file was created.
Definition properties.h:185
@ OriginUrl
The URL this file has originally been downloaded from.
Definition properties.h:277
@ License
Contains the license information of the file.
Definition properties.h:342
@ BitRate
The Bit Rate of the Audio in the File.
Definition properties.h:33
@ OriginEmailSubject
The subject of the email this file was originally attached to.
Definition properties.h:282
@ LineCount
The number of lines in a document.
Definition properties.h:151
@ Conductor
Represents the conductor of an audio file.
Definition properties.h:322
@ Ensemble
Represents the ensemble of an audio file.
Definition properties.h:312
@ Publisher
The publisher of the content.
Definition properties.h:177
@ Label
Represents the label of the content.
Definition properties.h:332
@ Language
The language the document is written in.
Definition properties.h:159
@ OriginEmailMessageId
The message ID of the email this file was originally attached to.
Definition properties.h:292
@ Arranger
Represents the arranger of an audio file.
Definition properties.h:317
@ ReplayGainTrackGain
Contains ReplayGain information for audio files The track gain is given in "dB".
Definition properties.h:369
@ Location
Represents the location where an audio file was recorded.
Definition properties.h:302
@ Lyricist
Represents the Lyricist of a media file.
Definition properties.h:108
@ Artist
Represents the artist of a media file.
Definition properties.h:84
@ SampleRate
The same rate or frequency of the Audio in the file.
Definition properties.h:59
@ Copyright
The copyright of the file.
Definition properties.h:172
@ ReplayGainAlbumGain
Contains ReplayGain information for audio files The album gain is given in "dB".
Definition properties.h:360
@ ReplayGainTrackPeak
Contains ReplayGain information for audio files.
Definition properties.h:364
@ Keywords
The keywords used to represent the document.
Definition properties.h:191
@ Performer
Represents the (lead) performer of an audio file.
Definition properties.h:307
@ DiscNumber
Represents the disc number in a multi-disc set.
Definition properties.h:297
@ Duration
The duration of the media in the file.
Definition properties.h:45
@ Model
The model name of the equipment used for generating the file and metadata.
Definition properties.h:236
@ Compilation
Contains the name of the compilation of an audio file.
Definition properties.h:337
@ ReleaseYear
Indicates the year a track was released.
Definition properties.h:71
@ ReplayGainAlbumPeak
Contains ReplayGain information for audio files.
Definition properties.h:355
@ Manufacturer
The manufacturer of the equipment used for generating the file and metadata.
Definition properties.h:221