MythTV  master
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Private Member Functions | List of all members
ImageMetaData Class Referenceabstract

Abstract class for image metadata. More...

#include <imagemetadata.h>

Inheritance diagram for ImageMetaData:
Inheritance graph
[legend]

Public Types

using TagMap = QMap< QString, QStringList >
 

Public Member Functions

virtual ~ImageMetaData ()=default
 
virtual bool IsValid ()=0
 
virtual QStringList GetAllTags ()=0
 
virtual int GetOrientation (bool *exists=nullptr)=0
 
virtual QDateTime GetOriginalDateTime (bool *exists=nullptr)=0
 
virtual QString GetComment (bool *exists=nullptr)=0
 

Static Public Member Functions

static ImageMetaDataFromPicture (const QString &filePath)
 Factory to retrieve metadata from pictures. More...
 
static ImageMetaDataFromVideo (const QString &filePath)
 Factory to retrieve metadata from videos. More...
 
static QString ToString (const QString &name, const QString &label, const QString &value)
 Encodes metadata into a string as <tag name><tag label><tag value> More...
 
static QStringList FromString (const QString &str)
 Decodes metadata name, label, value from a string. More...
 
static TagMap ToMap (const QStringList &tags)
 Creates a map of metadata tags as. More...
 

Static Public Attributes

static const QString kSeparator = "|-|"
 Unique separator to delimit fields within a string. More...
 

Protected Member Functions

 ImageMetaData (QString filePath)
 

Protected Attributes

QString m_filePath
 Image filepath. More...
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (ImageMetaData)
 

Detailed Description

Abstract class for image metadata.

Definition at line 99 of file imagemetadata.h.

Member Typedef Documentation

◆ TagMap

using ImageMetaData::TagMap = QMap<QString, QStringList>

Definition at line 119 of file imagemetadata.h.

Constructor & Destructor Documentation

◆ ~ImageMetaData()

virtual ImageMetaData::~ImageMetaData ( )
virtualdefault

◆ ImageMetaData()

ImageMetaData::ImageMetaData ( QString  filePath)
inlineexplicitprotected

Definition at line 129 of file imagemetadata.h.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

ImageMetaData::Q_DECLARE_TR_FUNCTIONS ( ImageMetaData  )
private

◆ FromPicture()

ImageMetaData * ImageMetaData::FromPicture ( const QString &  filePath)
static

Factory to retrieve metadata from pictures.

Parameters
filePathImage path
Returns
Picture metadata reader

Definition at line 700 of file imagemetadata.cpp.

Referenced by ImageScanThread< DBFS >::PopulateMetadata(), and ReadMetaThread::run().

◆ FromVideo()

ImageMetaData * ImageMetaData::FromVideo ( const QString &  filePath)
static

Factory to retrieve metadata from videos.

Parameters
filePathImage path
Returns
Video metadata reader

Definition at line 709 of file imagemetadata.cpp.

Referenced by ImageScanThread< DBFS >::PopulateMetadata(), and ReadMetaThread::run().

◆ ToString()

static QString ImageMetaData::ToString ( const QString &  name,
const QString &  label,
const QString &  value 
)
inlinestatic

Encodes metadata into a string as <tag name><tag label><tag value>

Definition at line 112 of file imagemetadata.h.

Referenced by PictureMetaData::GetAllTags(), VideoMetaData::GetAllTags(), and ReadMetaThread::run().

◆ FromString()

static QStringList ImageMetaData::FromString ( const QString &  str)
inlinestatic

Decodes metadata name, label, value from a string.

Definition at line 116 of file imagemetadata.h.

Referenced by ToMap().

◆ ToMap()

ImageMetaData::TagMap ImageMetaData::ToMap ( const QStringList &  tagStrings)
static

Creates a map of metadata tags as.

Parameters
tagStringsList of strings containing encoded metadata
Returns
multimap<key group, list<key, label, value>>

Definition at line 721 of file imagemetadata.cpp.

Referenced by InfoList::Display().

◆ IsValid()

virtual bool ImageMetaData::IsValid ( )
pure virtual

Implemented in VideoMetaData, and PictureMetaData.

◆ GetAllTags()

virtual QStringList ImageMetaData::GetAllTags ( )
pure virtual

Implemented in VideoMetaData, and PictureMetaData.

Referenced by ReadMetaThread::run().

◆ GetOrientation()

virtual int ImageMetaData::GetOrientation ( bool exists = nullptr)
pure virtual

◆ GetOriginalDateTime()

virtual QDateTime ImageMetaData::GetOriginalDateTime ( bool exists = nullptr)
pure virtual

◆ GetComment()

virtual QString ImageMetaData::GetComment ( bool exists = nullptr)
pure virtual

Member Data Documentation

◆ kSeparator

const QString ImageMetaData::kSeparator = "|-|"
static

Unique separator to delimit fields within a string.

Definition at line 109 of file imagemetadata.h.

◆ m_filePath

QString ImageMetaData::m_filePath
protected

Image filepath.

Definition at line 133 of file imagemetadata.h.

Referenced by PictureMetaData::GetAllTags(), and VideoMetaData::GetAllTags().


The documentation for this class was generated from the following files: