File indexing completed on 2025-01-05 03:52:04
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2006-04-04 0007 * Description : a tool to generate HTML image galleries 0008 * 0009 * SPDX-FileCopyrightText: 2006-2010 by Aurelien Gateau <aurelien dot gateau at free dot fr> 0010 * SPDX-FileCopyrightText: 2012-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_GALLERY_ELEMENT_H 0017 #define DIGIKAM_GALLERY_ELEMENT_H 0018 0019 // Qt includes 0020 0021 #include <QSize> 0022 #include <QString> 0023 0024 // Local includes 0025 0026 #include "dmetadata.h" 0027 #include "dinfointerface.h" 0028 0029 using namespace Digikam; 0030 0031 namespace DigikamGenericHtmlGalleryPlugin 0032 { 0033 0034 class XMLWriter; 0035 0036 /** 0037 * This class stores all the necessary information to produce an XML 0038 * description of a gallery element. 0039 */ 0040 class GalleryElement 0041 { 0042 public: 0043 0044 explicit GalleryElement(const DInfoInterface::DInfoMap& info); 0045 GalleryElement(); 0046 ~GalleryElement(); 0047 0048 void appendToXML(XMLWriter& xmlWriter, bool copyOriginalImage) const; 0049 0050 void appendImageElementToXML(XMLWriter& xmlWriter, const QString& elementName, 0051 const QString& fileName, const QSize& size) const; 0052 0053 public: 0054 0055 bool m_valid; 0056 QString m_title; 0057 QString m_description; 0058 DMetadata::ImageOrientation m_orientation; 0059 QDateTime m_time; 0060 0061 QString m_path; 0062 0063 QString m_thumbnailFileName; 0064 QSize m_thumbnailSize; 0065 QString m_fullFileName; 0066 QSize m_fullSize; 0067 QString m_originalFileName; 0068 QSize m_originalSize; 0069 0070 // Exif Metadata 0071 QString m_exifImageMake; 0072 QString m_exifItemModel; 0073 QString m_exifImageOrientation; 0074 QString m_exifImageXResolution; 0075 QString m_exifImageYResolution; 0076 QString m_exifImageResolutionUnit; 0077 QString m_exifImageDateTime; 0078 QString m_exifImageYCbCrPositioning; 0079 QString m_exifPhotoExposureTime; 0080 QString m_exifPhotoFNumber; 0081 QString m_exifPhotoExposureProgram; 0082 QString m_exifPhotoISOSpeedRatings; 0083 QString m_exifPhotoShutterSpeedValue; 0084 QString m_exifPhotoApertureValue; 0085 QString m_exifPhotoFocalLength; 0086 0087 // GPS Metadata 0088 QString m_exifGPSLatitude; 0089 QString m_exifGPSLongitude; 0090 QString m_exifGPSAltitude; 0091 }; 0092 0093 } // namespace DigikamGenericHtmlGalleryPlugin 0094 0095 #endif // DIGIKAM_GALLERY_ELEMENT_H