File indexing completed on 2025-01-05 03:56:23
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2007-09-12 0007 * Description : Metadata info containers 0008 * 0009 * SPDX-FileCopyrightText: 2007-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * SPDX-FileCopyrightText: 2009-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * 0012 * SPDX-License-Identifier: GPL-2.0-or-later 0013 * 0014 * ============================================================ */ 0015 0016 #ifndef DIGIKAM_META_DATA_INFO_H 0017 #define DIGIKAM_META_DATA_INFO_H 0018 0019 // Qt includes 0020 0021 #include <QMetaType> 0022 #include <QDebug> 0023 0024 // Local includes 0025 0026 #include "digikam_export.h" 0027 0028 namespace Digikam 0029 { 0030 0031 class DIGIKAM_EXPORT IptcCoreLocationInfo 0032 { 0033 public: 0034 0035 bool operator==(const IptcCoreLocationInfo& t) const; 0036 bool isEmpty() const; 0037 bool isNull() const; 0038 void merge(const IptcCoreLocationInfo& t); 0039 0040 public: 0041 0042 QString country; 0043 QString countryCode; 0044 QString provinceState; 0045 QString city; 0046 QString location; 0047 }; 0048 0049 //! qDebug() stream operator. Writes property @a inf to the debug output in a nicely formatted way. 0050 DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const IptcCoreLocationInfo& inf); 0051 0052 // --------------------------------------------------------------------------------------------------- 0053 0054 class DIGIKAM_EXPORT IptcCoreContactInfo 0055 { 0056 public: 0057 0058 bool operator==(const IptcCoreContactInfo& t) const; 0059 bool isEmpty() const; 0060 bool isNull() const; 0061 void merge(const IptcCoreContactInfo& t); 0062 0063 public: 0064 0065 QString city; 0066 QString country; 0067 QString address; 0068 QString postalCode; 0069 QString provinceState; 0070 QString email; 0071 QString phone; 0072 QString webUrl; 0073 }; 0074 0075 //! qDebug() stream operator. Writes property @a inf to the debug output in a nicely formatted way. 0076 DIGIKAM_EXPORT QDebug operator<<(QDebug dbg, const IptcCoreContactInfo& inf); 0077 0078 // --------------------------------------------------------------------------------------------------- 0079 0080 namespace MetadataInfo 0081 { 0082 0083 enum Field 0084 { 0085 Comment, ///< String (one of the following three values) 0086 CommentJfif, ///< String 0087 CommentExif, ///< String 0088 CommentIptc, ///< String (see also IptcCoreDescription) 0089 Description, ///< Map language -> String 0090 Title, ///< Map language -> String 0091 Headline, ///< String 0092 DescriptionWriter, ///< String 0093 0094 Keywords, ///< StringList 0095 0096 Rating, ///< Int 0097 CreationDate, ///< DateTime 0098 DigitizationDate, ///< DateTime 0099 Orientation, ///< Int, enum from libMetaEngine 0100 0101 Make, ///< String 0102 Model, ///< String 0103 Lens, ///< String 0104 Aperture, ///< Double, FNumber 0105 FocalLength, ///< Double, mm 0106 FocalLengthIn35mm, ///< Double, mm 0107 ExposureTime, ///< Double, s 0108 ExposureProgram, ///< Int, enum from Exif 0109 ExposureMode, ///< Int, enum from Exif 0110 Sensitivity, ///< Int, ISO sensitivity 0111 FlashMode, ///< Int, bit mask from Exif 0112 WhiteBalance, ///< Int, enum from Exif 0113 WhiteBalanceColorTemperature, ///< double, color temperature in K 0114 MeteringMode, ///< Int, enum from Exif 0115 SubjectDistance, ///< double, m 0116 SubjectDistanceCategory, ///< int, enum from Exif 0117 0118 Latitude, ///< String (as XMP GPSCoordinate) 0119 LatitudeNumber, ///< double, degrees 0120 Longitude, ///< String (as XMP GPSCoordinate) 0121 LongitudeNumber, ///< double, degrees 0122 Altitude, ///< double, m 0123 PositionOrientation, ///< double, ? 0124 PositionTilt, ///< double, ? 0125 PositionRoll, ///< double, ? 0126 PositionAccuracy, ///< double, m 0127 PositionDescription, ///< String 0128 0129 IptcCoreCopyrightNotice, ///< Map language -> String 0130 IptcCoreCreator, ///< List of type String 0131 IptcCoreProvider, ///< String 0132 IptcCoreRightsUsageTerms, ///< Map language -> String 0133 IptcCoreSource, ///< String 0134 0135 IptcCoreCreatorJobTitle, ///< String 0136 IptcCoreInstructions, ///< String 0137 0138 IptcCoreLocationInfo, ///< object of IptcCoreLocation, including: 0139 IptcCoreCountryCode, ///< String 0140 IptcCoreCountry, ///< String 0141 IptcCoreCity, ///< String 0142 IptcCoreLocation, ///< String 0143 IptcCoreProvinceState, ///< String 0144 0145 IptcCoreIntellectualGenre, ///< String 0146 IptcCoreJobID, ///< String 0147 IptcCoreScene, ///< List of type String 0148 IptcCoreSubjectCode, ///< List of type String 0149 0150 IptcCoreContactInfo, ///< object of IptcCoreContactInfo, including: 0151 IptcCoreContactInfoCity, ///< String 0152 IptcCoreContactInfoCountry, ///< String 0153 IptcCoreContactInfoAddress, ///< String 0154 IptcCoreContactInfoPostalCode, ///< String 0155 IptcCoreContactInfoProvinceState, ///< String 0156 IptcCoreContactInfoEmail, ///< String 0157 IptcCoreContactInfoPhone, ///< String 0158 IptcCoreContactInfoWebUrl, ///< String 0159 0160 Faces, ///< QMap<QString, QVariant> 0161 0162 // Description, DescriptionWriter, Headline, Title: see above 0163 // DateCreated: see above, CreationDate 0164 // Keywords: see above, Keywords 0165 // not supported: CreatorContactInfo 0166 0167 // Dublin Core: Description, Title, Subject (keywords) see above 0168 0169 AspectRatio, ///< String 0170 AudioBitRate, ///< String 0171 AudioChannelType, ///< String 0172 AudioCodec, ///< String 0173 Duration, ///< String 0174 FrameRate, ///< String 0175 VideoCodec, ///< String 0176 VideoBitDepth, ///< String 0177 VideoHeight, ///< String 0178 VideoWidth, ///< String 0179 VideoColorSpace ///< String 0180 }; 0181 0182 } // namespace MetadataInfo 0183 0184 typedef QList<MetadataInfo::Field> MetadataFields; 0185 0186 } // namespace Digikam 0187 0188 Q_DECLARE_METATYPE(Digikam::IptcCoreContactInfo) 0189 Q_DECLARE_METATYPE(Digikam::IptcCoreLocationInfo) 0190 0191 #endif // DIGIKAM_META_DATA_INFO_H