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
16namespace KFileMetaData {
17
18/*!
19 * \namespace KFileMetaData::Property
20 * \inmodule KFileMetaData
21 * \brief The Property namespace.
22 */
23namespace Property {
24
25/*!
26 * The Property enum contains all files property types that KFileMetaData manipulates
27 *
28 * \value Empty
29 * \value BitRate The Bit Rate of the Audio in the file. Represented as an integer in kbit/sec
30 * \value Channels The number of channels of the Audio in the file. Represented as an integer
31 * \value Duration The duration of the media in the file. Represented as an integer in seconds
32 * \value Genre The Genre of an Audio file. This is represented as a string of genres and not integers. The IDv1 standard provides a list of commonly excepted genres.
33 * \value SampleRate The sample rate or frequency of the Audio in the file. This is represented as an integer in Hz. So a file with "44.1KHz" will have a frequency of 44100
34 * \value TrackNumber Represents the track number in a set. Typically maps to the "TRCK" tag in IDv3
35 * \value ReleaseYear Indicates the year a track was released. Represented as an integer. Typically mapped to the "TYE (Year)" tag in IDv1
36 * \value Comment Represents a comment stored in the file. This can map to e.g. the "COMM" field from IDv3
37 * \value Artist Represents the artist of a media file. This generally corresponds to the IDv1 ARTIST tag. Many extractors often split this string into a number of artists.
38 * \value Album Represents the album of a media file. This generally corresponds to the IDv1 ALBUM tag.
39 * \value AlbumArtist Represents the album artist of a media file. This generally corresponds to the IDv3 TPE2 ("Band/Orchestra/Accompaniment") tag.
40 * \value Composer Represents the Composer of a media file. This generally corresponds to the IDv2 COMPOSER tag
41 * \value Lyricist Represents the Lyricist of a media file. This generally corresponds to the IDv2 "Lyricist/text writer" tag
42 * \value Author The Author field indicated the primary creator of a document. This often corresponds directly to dc:creator
43 * \value Title Refers to the Title of the content of the file. This can represented by the IDv1 tag TT2 (Title/songname/content description) or the TITLE in a PDF file or the 'dc:title' tag in DublinCore
44 * \value Subject Refers to the subject of the file. This directly corresponds to the 'dc:subject' tag from DublinCore.
45 * \value Generator Refers to the Application used to create this file. In the ODF standard this maps to the 'meta:generator' tag. In PDFs its mapped to the "Producer" tag.
46 * \value PageCount The number of pages in a document
47 * \value WordCount The number of words in a document. This is often only provided for documents where the word count is available in the metadata
48 * \value LineCount The number of lines in a document. This is often only provided for documents where the line count is available in the metadata
49 * \value[since 5.50] Language The language the document is written in. This directly maps to the 'dc:language' tag from DublinCore. We do NOT employ any language detection schemes on the text
50 * \value Copyright The copyright of the file. Represented as a string
51 * \value Publisher The publisher of the content. Represented as a string
52 * \value CreationDate The date the content of the file was created. This is extracted from the file metadata and not from the file system. In ODF, it corresponds to "meta:creation-date", in PDF to the "CreationDate" tag, and otherwise the "dcterms:created" tag
53 * \value Keywords The keywords used to represent the document. This is mostly a string list of all the keywords
54 * \value Width Represents the width of the Media in pixels. This is generally only applicable for Images and Videos
55 * \value Height Represents the height of the Media in pixels. This is generally only applicable for Images and Videos
56 * \value AspectRatio The Aspect Ratio of the visual image or video. It is the width of a pixel divided by the height of the pixel
57 * \value FrameRate Number of frames per second
58 * \value[since 5.60] Manufacturer The manufacturer of the equipment used for generating the file and metadata. Typically maps to the 'Exif.Image.Make' tag
59 * \value[since 5.60] Model The model name of the equipment used for generating the file and metadata. Typically maps to the 'Exif.Image.Model' tag
60 * \value ImageDateTime
61 * \value ImageOrientation
62 * \value PhotoFlash
63 * \value PhotoPixelXDimension
64 * \value PhotoPixelYDimension
65 * \value PhotoDateTimeOriginal
66 * \value PhotoFocalLength
67 * \value PhotoFocalLengthIn35mmFilm
68 * \value PhotoExposureTime
69 * \value PhotoFNumber
70 * \value PhotoApertureValue
71 * \value PhotoExposureBiasValue
72 * \value PhotoWhiteBalance
73 * \value PhotoMeteringMode
74 * \value PhotoISOSpeedRatings
75 * \value PhotoSaturation
76 * \value PhotoSharpness
77 * \value PhotoGpsLatitude
78 * \value PhotoGpsLongitude
79 * \value PhotoGpsAltitude
80 * \value TranslationUnitsTotal
81 * \value TranslationUnitsWithTranslation
82 * \value TranslationUnitsWithDraftTranslation
83 * \value TranslationLastAuthor
84 * \value TranslationLastUpDate
85 * \value TranslationTemplateDate
86 * \value OriginUrl The URL this file has originally been downloaded from
87 * \value OriginEmailSubject The subject of the email this file was originally attached to
88 * \value OriginEmailSender The sender of the email this file was originally attached to
89 * \value OriginEmailMessageId The message ID of the email this file was originally attached to
90 * \value DiscNumber Represents the disc number in a multi-disc set. Typically maps to the "TPOS" tag for mp3
91 * \value Location Represents the location where an audio file was recorded
92 * \value Performer Represents the (lead) performer of an audio file
93 * \value Ensemble Represents the ensemble of an audio file
94 * \value Arranger Represents the arranger of an audio file
95 * \value Conductor Represents the conductor of an audio file
96 * \value Opus Represents the opus of an audio file mostly used for classical music
97 * \value Label Represents the label of the content
98 * \value Compilation Contains the name of the compilation of an audio file
99 * \value License Contains the license information of the file
100 * \value Rating For ratings stored in Metadata tags
101 * \value Lyrics Contains the lyrics of a song embedded in the file
102 * \value ReplayGainAlbumPeak Contains ReplayGain information for audio files
103 * \value ReplayGainAlbumGain Contains ReplayGain information for audio files. The album gain is given in "dB"
104 * \value ReplayGainTrackPeak Contains ReplayGain information for audio files
105 * \value ReplayGainTrackGain Contains ReplayGain information for audio files. The track gain is given in "dB"
106 * \value Description Represents the description stored in the file. This maps to the 'dc:description' tag from DublinCore
107 * \value[since 6.13] VideoCodec A string description of the codec used
108 * \value[since 6.13] AudioCodec A string description of the codec used
109 * \value[since 6.13] PixelFormat The Pixel format used by the media (image or video)
110 * \value[since 6.13] ColorSpace The Color space used by the media (image or video)
111 * \value[since 6.16] AssistiveAlternateDescription A brief textual description of the purpose and meaning of an image. The text can be used by assistive technology.
112 */
113enum Property {
114 Empty = 0,
115 BitRate,
116 Channels,
117 Duration,
118 Genre,
119 SampleRate,
120 TrackNumber,
121 ReleaseYear,
122 Comment,
123 Artist,
124 Album,
125 AlbumArtist,
126 Composer,
127 Lyricist,
128 Author,
129 Title,
130 Subject,
131 Generator,
132 PageCount,
133 WordCount,
134 LineCount,
135 Language,
136 Copyright,
137 Publisher,
138 CreationDate,
139 Keywords,
140 Width,
141 Height,
142 AspectRatio,
143 FrameRate,
144 Manufacturer,
145 Model,
146
147 ImageDateTime,
148 ImageOrientation,
149 PhotoFlash,
150 PhotoPixelXDimension,
151 PhotoPixelYDimension,
152 PhotoDateTimeOriginal,
153 PhotoFocalLength,
154 PhotoFocalLengthIn35mmFilm,
155 PhotoExposureTime,
156 PhotoFNumber,
157 PhotoApertureValue,
158 PhotoExposureBiasValue,
159 PhotoWhiteBalance,
160 PhotoMeteringMode,
161 PhotoISOSpeedRatings,
162 PhotoSaturation,
163 PhotoSharpness,
164 PhotoGpsLatitude,
165 PhotoGpsLongitude,
166 PhotoGpsAltitude,
167
168 TranslationUnitsTotal,
169 TranslationUnitsWithTranslation,
170 TranslationUnitsWithDraftTranslation,
171 TranslationLastAuthor,
172 TranslationLastUpDate,
173 TranslationTemplateDate,
174
175 OriginUrl,
176 OriginEmailSubject,
177 OriginEmailSender,
178 OriginEmailMessageId,
179 DiscNumber,
180 Location,
181 Performer,
182 Ensemble,
183 Arranger,
184 Conductor,
185 Opus,
186 Label,
187 Compilation,
188 License,
189 Rating,
190 Lyrics,
191 ReplayGainAlbumPeak,
192 ReplayGainAlbumGain,
193 ReplayGainTrackPeak,
194 ReplayGainTrackGain,
195 Description,
196
197 VideoCodec,
198 AudioCodec,
199 PixelFormat,
200 ColorSpace,
201 AssistiveAlternateDescription,
202};
203
204} // namespace Property
205
206using PropertyMultiMap = QMultiMap<Property::Property, QVariant>;
207
208} // namespace KFileMetaData
209
210Q_DECLARE_METATYPE(KFileMetaData::Property::Property)
211Q_DECLARE_METATYPE(KFileMetaData::PropertyMultiMap)
212
213#endif
214

source code of kfilemetadata/src/properties.h