| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Public Types | Public Member Functions | List of all members
Digikam::DisjointMetadata Class Reference
Inheritance diagram for Digikam::DisjointMetadata:

## Public Types
enum | WriteMode { FullWrite , FullWriteIfChanged , PartialWrite }

## Public Member Functions
int | changedFlags ()
| changedFlags - used for selective metadata write.
int | colorLabel () const
| Returns the Color Label id (see ColorLabel values in globals.h).
bool | colorLabelChanged () const
void | colorLabelInterval (int &lowest, int &highest) const
| Returns the lowest and highest Color Label id (see ColorLabel values from globals.h).
DisjointMetadataDataFields::Status | colorLabelStatus () const
CaptionsMap | comments () const
| Returns a map all alternate language omments .
bool | commentsChanged () const
DisjointMetadataDataFields::Status | commentsStatus () const
DisjointMetadataDataFields | dataFields () const
QDateTime | dateTime () const
| Returns the dateTime.
bool | dateTimeChanged () const
| Returns if the metadata field has been changed with the corresponding setter method.
void | dateTimeInterval (QDateTime &lowest, QDateTime &highest) const
| Returns the earliest and latest date.
DisjointMetadataDataFields::Status | dateTimeStatus () const
| Returns the metadata field Status.
QStringList | keywords () const
| Returns a QStringList with all tags with status DisjointMetadataDataFields::MetadataAvailable.
void | load (const ItemInfo &info)
Template | metadataTemplate () const
| Returns the metadata template.
int | pickLabel () const
| Returns the Pick Label id (see PickLabel values in globals.h).
bool | pickLabelChanged () const
void | pickLabelInterval (int &lowest, int &highest) const
| Returns the lowest and highest Pick Label id (see PickLabel values from globals.h).
DisjointMetadataDataFields::Status | pickLabelStatus () const
int | rating () const
| Returns the rating.
bool | ratingChanged () const
void | ratingInterval (int &lowest, int &highest) const
| Returns the lowest and highest rating.
DisjointMetadataDataFields::Status | ratingStatus () const
void | replaceColorLabel (int colorId)
| Special case if the metadata of color, pick or rating has already been changed outside.
void | replacePickLabel (int pickId)
void | replaceRating (int rating)
void | reset ()
void | resetChanged ()
void | setColorLabel (int colorId, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
void | setComments (const CaptionsMap &comments, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
void | setDataFields (const DisjointMetadataDataFields &data)
void | setDateTime (const QDateTime &dateTime, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
| Set metadata field to the given value, and the metadata field status to the corresponding DisjointMetadataDataFields::MetadataAvailable.
void | setMetadataTemplate (const Template &t, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
void | setPickLabel (int pickId, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
void | setRating (int rating, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
void | setTag (int albumID, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
void | setTitles (const CaptionsMap &titles, DisjointMetadataDataFields::Status status=DisjointMetadataDataFields::MetadataAvailable)
QMap< int, DisjointMetadataDataFields::Status > | tags () const
| Returns a map with the status for each tag.
bool | tagsChanged () const
DisjointMetadataDataFields::Status | tagStatus (const QString &tagPath) const
DisjointMetadataDataFields::Status | tagStatus (int albumId) const
bool | templateChanged () const
DisjointMetadataDataFields::Status | templateStatus () const
CaptionsMap | titles () const
| Returns a map all alternate language titles.
bool | titlesChanged () const
DisjointMetadataDataFields::Status | titlesStatus () const
bool | willWriteMetadata (WriteMode writeMode, const MetaEngineSettingsContainer &settings=MetaEngineSettings::instance() ->settings()) const
| With the currently applied changes, the given writeMode and settings, returns if write(DMetadata), write(QString) or write(DImg) will actually apply any changes.
bool | write (ItemInfo info, WriteMode writeMode=FullWrite)
| Applies the set of metadata contained in this MetadataHub to the given ItemInfo object.

## Member Enumeration Documentation

## ◆ WriteMode

enum Digikam::DisjointMetadata::WriteMode

Enumerator
FullWrite | Write all available information.
FullWriteIfChanged | Do a full write if and only if. metadata fields changed the changed fields shall be written according to write settings "Changed" in this context means changed by one of the set... methods, the load() methods are ignored for this attribute. This mode allows to avoid write operations when e.g. the user does not want keywords to be written and only changes keywords.
PartialWrite | Write only the changed parts. Metadata fields which cannot be changed from MetadataHub (photographer ID etc.) will never be written

## Member Function Documentation

## ◆ changedFlags()

int Digikam::DisjointMetadata::changedFlags | ( |  | ) |

The result will be passed to metadatahub and it will

- write it to disk
  Returns
    - metadatahub flags encoded as int

## ◆ colorLabel()

int Digikam::DisjointMetadata::colorLabel | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the None Label is returned. (see colorLabelInterval()) If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

## ◆ colorLabelInterval()

void Digikam::DisjointMetadata::colorLabelInterval | ( | int & | lowest,
|  | int & | highest
| ) |  | const

If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

## ◆ comments()

CaptionsMap Digikam::DisjointMetadata::comments | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the first loaded map is returned. If status is DisjointMetadataDataFields::MetadataInvalid, CaptionMap() is returned.

## ◆ dateTime()

QDateTime Digikam::DisjointMetadata::dateTime | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the earliest date is returned. (see dateTimeInterval()) If status is DisjointMetadataDataFields::MetadataInvalid, an invalid date is returned.

## ◆ dateTimeInterval()

void Digikam::DisjointMetadata::dateTimeInterval | ( | QDateTime & | lowest,
|  | QDateTime & | highest
| ) |  | const

If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, invalid dates are returned.

## ◆ keywords()

QStringList Digikam::DisjointMetadata::keywords | ( |  | ) | const

(i.e., the intersection of tags from all loaded metadata sets)

## ◆ metadataTemplate()

Template Digikam::DisjointMetadata::metadataTemplate | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the first loaded template is returned. If status is DisjointMetadataDataFields::MetadataInvalid, 0 is returned.

## ◆ pickLabel()

int Digikam::DisjointMetadata::pickLabel | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the None Label is returned. (see pickLabelInterval()) If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

## ◆ pickLabelInterval()

void Digikam::DisjointMetadata::pickLabelInterval | ( | int & | lowest,
|  | int & | highest
| ) |  | const

If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

## ◆ rating()

int Digikam::DisjointMetadata::rating | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the lowest rating is returned. (see ratingInterval()) If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

## ◆ ratingInterval()

void Digikam::DisjointMetadata::ratingInterval | ( | int & | lowest,
|  | int & | highest
| ) |  | const

If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

## ◆ replaceColorLabel()

void Digikam::DisjointMetadata::replaceColorLabel | ( | int | colorId | ) |

Replace with current values as if there is no change.

## ◆ tags()

QMap< int, DisjointMetadataDataFields::Status > Digikam::DisjointMetadata::tags | ( |  | ) | const

Any tag that was set on one of the loaded images is contained in the map. (If a tag is not contained in the map, it was not set on any of the loaded images) If the tag was set on all loaded images, the status is DisjointMetadataDataFields::MetadataAvailable. If the tag was set on at least one, but not all of the loaded images, the status is DisjointMetadataDataFields::MetadataDisjoint.

## ◆ titles()

CaptionsMap Digikam::DisjointMetadata::titles | ( |  | ) | const

If status is DisjointMetadataDataFields::MetadataDisjoint, the first loaded map is returned. If status is DisjointMetadataDataFields::MetadataInvalid, CaptionMap() is returned.

## ◆ write()

bool Digikam::DisjointMetadata::write | ( | ItemInfo | info,
|  | WriteMode | writeMode = `FullWrite`
| ) |  |

Returns
  Returns true if the info object has been changed