digiKam
Digikam::HistoryImageId Class Reference

Public Types

enum  Type {
  InvalidType = 0 , Original = 1 << 0 , Intermediate = 1 << 1 , Source = 1 << 2 ,
  Current = 1 << 3
}
 

Public Member Functions

QDateTime creationDate () const
 
QString fileName () const
 If a file on disk is referenced: Returns the file name (without folder) More...
 
QString filePath () const
 If a file on disk is referenced: Returns the full file path (folder + filename) More...
 
qlonglong fileSize () const
 
bool hasCreationDate () const
 
bool hasFileName () const
 
bool hasFileOnDisk () const
 
bool hasUniqueHashIdentifier () const
 
bool hasUuid () const
 
 HistoryImageId ()
 Creates an invalid HistoryImageId. More...
 
 HistoryImageId (const QString &uuid, Type type=Current)
 Creates an id with the given UUID and type. More...
 
bool isCurrentFile () const
 
bool isIntermediateFile () const
 
bool isOriginalFile () const
 
bool isSourceFile () const
 
bool isValid () const
 A valid id needs at least a valid type and a UUID or a filename. More...
 
bool operator== (const HistoryImageId &other) const
 
QString originalUuid () const
 
QString path () const
 If a file on disk is referenced: Returns the path, without filename, with a trailing slash. More...
 
void setCreationDate (const QDateTime &creationDate)
 
void setFileName (const QString &fileName)
 
void setPath (const QString &path)
 
void setPathOnDisk (const QString &filePath)
 
void setType (HistoryImageId::Type type)
 
void setUniqueHash (const QString &uniqueHash, qlonglong fileSize)
 
void setUuid (const QString &uuid)
 
Type type () const
 
QString uniqueHash () const
 
QString uuid () const
 

Public Attributes

QDateTime m_creationDate
 The creationDate of the original image. More...
 
QString m_fileName
 The filename of the referred file. More...
 
QString m_filePath
 The path of the referred file (NOTE: without file name!, including trailing slash) More...
 
qlonglong m_fileSize
 The file size of the referred file. More...
 
QString m_originalUUID
 
Type m_type
 Type of this History Image Id. More...
 
QString m_uniqueHash
 The uniqueHash of the referred file. More...
 
QString m_uuid
 

Member Enumeration Documentation

◆ Type

Enumerator
InvalidType 
Original 

The original file (typically created by a camera)

Intermediate 

A file created during the editing the history, between the original file and the current file.

Source 

When a file is created from multiple files, there can be no direct original (panorama) but multiple sources, or one direct original and some other, additional source files. To record source files outside of the direct history, this type is used.

Current 

The "current" file. This is a special entry: It refers to the file from which this history was read. It need not be written to the file, because it describes the file itself. There is typically exactly one current entry if the history is associated with an image; there can be no current entry.

Constructor & Destructor Documentation

◆ HistoryImageId() [1/2]

Digikam::HistoryImageId::HistoryImageId ( )

Creates an invalid HistoryImageId.

Note: In this class, the Type is used as a simple enum, but it is also prepared for usage as flags.

◆ HistoryImageId() [2/2]

Digikam::HistoryImageId::HistoryImageId ( const QString &  uuid,
Type  type = Current 
)
explicit

Creates an id with the given UUID and type.

Member Function Documentation

◆ creationDate()

QDateTime Digikam::HistoryImageId::creationDate ( ) const

References m_creationDate.

Referenced by setCreationDate().

◆ fileName()

QString Digikam::HistoryImageId::fileName ( ) const

If a file on disk is referenced: Returns the file name (without folder)

References m_fileName.

Referenced by setFileName().

◆ filePath()

QString Digikam::HistoryImageId::filePath ( ) const

If a file on disk is referenced: Returns the full file path (folder + filename)

References m_fileName, and m_filePath.

Referenced by Digikam::ItemScanner::resolveHistoryImageId(), and setPathOnDisk().

◆ fileSize()

qlonglong Digikam::HistoryImageId::fileSize ( ) const

References m_fileSize.

Referenced by setUniqueHash().

◆ hasCreationDate()

bool Digikam::HistoryImageId::hasCreationDate ( ) const

◆ hasFileName()

bool Digikam::HistoryImageId::hasFileName ( ) const

◆ hasFileOnDisk()

bool Digikam::HistoryImageId::hasFileOnDisk ( ) const

◆ hasUniqueHashIdentifier()

bool Digikam::HistoryImageId::hasUniqueHashIdentifier ( ) const

◆ hasUuid()

◆ isCurrentFile()

bool Digikam::HistoryImageId::isCurrentFile ( ) const
inline

◆ isIntermediateFile()

bool Digikam::HistoryImageId::isIntermediateFile ( ) const
inline

◆ isOriginalFile()

bool Digikam::HistoryImageId::isOriginalFile ( ) const
inline

◆ isSourceFile()

bool Digikam::HistoryImageId::isSourceFile ( ) const
inline

◆ isValid()

bool Digikam::HistoryImageId::isValid ( ) const

◆ operator==()

bool Digikam::HistoryImageId::operator== ( const HistoryImageId other) const

◆ originalUuid()

QString Digikam::HistoryImageId::originalUuid ( ) const

References m_originalUUID.

◆ path()

QString Digikam::HistoryImageId::path ( ) const

If a file on disk is referenced: Returns the path, without filename, with a trailing slash.

References m_filePath.

Referenced by Digikam::ItemScanner::resolveHistoryImageId(), and setPath().

◆ setCreationDate()

void Digikam::HistoryImageId::setCreationDate ( const QDateTime &  creationDate)

◆ setFileName()

void Digikam::HistoryImageId::setFileName ( const QString &  fileName)

References fileName(), and m_fileName.

Referenced by Digikam::DImageHistory::fromXml().

◆ setPath()

void Digikam::HistoryImageId::setPath ( const QString &  path)

References m_filePath, and path().

Referenced by Digikam::DImageHistory::fromXml().

◆ setPathOnDisk()

void Digikam::HistoryImageId::setPathOnDisk ( const QString &  filePath)

References filePath(), and m_filePath.

◆ setType()

void Digikam::HistoryImageId::setType ( HistoryImageId::Type  type)

◆ setUniqueHash()

void Digikam::HistoryImageId::setUniqueHash ( const QString &  uniqueHash,
qlonglong  fileSize 
)

◆ setUuid()

void Digikam::HistoryImageId::setUuid ( const QString &  uuid)

References m_uuid, and uuid().

◆ type()

HistoryImageId::Type Digikam::HistoryImageId::type ( ) const

References m_type.

Referenced by setType().

◆ uniqueHash()

QString Digikam::HistoryImageId::uniqueHash ( ) const

References m_uniqueHash.

Referenced by setUniqueHash().

◆ uuid()

QString Digikam::HistoryImageId::uuid ( ) const

Member Data Documentation

◆ m_creationDate

◆ m_fileName

◆ m_filePath

QString Digikam::HistoryImageId::m_filePath

The path of the referred file (NOTE: without file name!, including trailing slash)

Referenced by filePath(), hasFileOnDisk(), operator==(), path(), Digikam::ItemScanner::sameReferredImage(), setPath(), setPathOnDisk(), and Digikam::DImageHistory::toXml().

◆ m_fileSize

◆ m_originalUUID

QString Digikam::HistoryImageId::m_originalUUID

A unique identifier designating the original image from which the referred image was created. Typically, this is a RAW or JPEG created by the camera in the moment of taking the photograph.

Referenced by Digikam::DImageHistory::fromXml(), operator==(), and originalUuid().

◆ m_type

◆ m_uniqueHash

◆ m_uuid

QString Digikam::HistoryImageId::m_uuid

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