#include <quillmetadata.h>
enum QuillMetadata::Tag |
QuillMetadata::QuillMetadata | ( | ) |
Constructs an empty metadata object.
QuillMetadata::QuillMetadata | ( | const QString & | fileName, | |
MetadataFormatFlags | formats = AllFormats | |||
) |
Constructs a metadata object containing all metadata from a given file.
filePath | Local filesystem path to file to be read. | |
formats | Which formats to read (currently only supports ExifFormat and AllFormats) |
QuillMetadata::QuillMetadata | ( | const QString & | fileName, | |
MetadataFormatFlags | formats, | |||
Tag | tagToRead | |||
) | [explicit] |
Constructs a metadata object containing all metadata from a given file.
filePath | Local filesystem path to file to be read. | |
formats | Which formats to read (currently only supports ExifFormat and AllFormats) | |
tagToRead | Which tags to read; if undefined, reads all tags |
QuillMetadata::~QuillMetadata | ( | ) |
Removes a metadata object.
bool QuillMetadata::canRead | ( | const QString & | filePath | ) | [static] |
Returns true if the image format of a given file is supported by the metadata reader. It will only make a lightweight check of the file headers, and it will not guarantee that any metadata can be actually be read from the file.
QByteArray QuillMetadata::dump | ( | MetadataFormatFlags | formats | ) | const |
Dumps an EXIF or XMP block into a byte array.
formats | Which metadata block to dump. Currently only supports ExifFormat, other format flags will return an empty byte array. |
QVariant QuillMetadata::entry | ( | Tag | tag | ) | const |
Returns the value of the metadata entry for a given tag. Currently, only some tags are supported.
bool QuillMetadata::isValid | ( | ) | const |
Returns true if the metadata object is valid.
void QuillMetadata::removeEntries | ( | TagGroup | tagGroup | ) |
Removes a preset group of entries. Currently, instead of removing, overwrites the entry with an empty content.
void QuillMetadata::removeEntries | ( | const QList< Tag > & | tags | ) |
Removes a list of entries. Currently, instead of removing, overwrites the entry with an empty content.
void QuillMetadata::removeEntry | ( | Tag | tag | ) |
Removes an entry for a given tag. Currently, instead of removing, overwrites the entry with an empty content.
void QuillMetadata::setEntry | ( | Tag | tag, | |
const QVariant & | entry | |||
) |
Sets the value of the metadata entry for a given tag. Use invalid QVariant to clear the entry. Currently, only some tags are supported.
bool QuillMetadata::write | ( | const QString & | filePath, | |
MetadataFormatFlags | formats = AllFormats | |||
) | const |
Writes the metadata object into an existing file, writes both XMP, IPTC-IIM (transparently by exempi) and EXIF blocks. Any existing metadata in the file will be lost by this overwrite.
filePath | Local filesystem path to file to be written into. | |
formats | Which metadata formats to write. If AllFormats is selected, both Exif and XMP metadata will be written. If ExifFormat is selected, it will destroy any existing XMP block in the file. If XmpFormat is selected, it should not affect existing Exif blocks in the file except those affected by automated reconciliation. XmpFormat and AllFormats also include IPTC-IIM reconciliation. |