digiKam
Digikam::DisjointMetadata Class Reference
+ Inheritance diagram for Digikam::DisjointMetadata:

Classes

class  Private
 

Public Types

enum  WriteMode { FullWrite , FullWriteIfChanged , PartialWrite }
 

Public Member Functions

int changedFlags ()
 changedFlags - used for selective metadata write. The result will be passed to metadatahub and it will More...
 
int colorLabel () const
 
bool colorLabelChanged () const
 
void colorLabelInterval (int &lowest, int &highest) const
 
DisjointMetadataDataFields::Status colorLabelStatus () const
 
CaptionsMap comments () const
 
bool commentsChanged () const
 
DisjointMetadataDataFields::Status commentsStatus () const
 
DisjointMetadataDataFields dataFields () const
 
QDateTime dateTime () const
 
bool dateTimeChanged () const
 
void dateTimeInterval (QDateTime &lowest, QDateTime &highest) const
 
DisjointMetadataDataFields::Status dateTimeStatus () const
 
 DisjointMetadata ()
 
QStringList keywords () const
 
void load (const ItemInfo &info)
 
Template metadataTemplate () const
 
int pickLabel () const
 
bool pickLabelChanged () const
 
void pickLabelInterval (int &lowest, int &highest) const
 
DisjointMetadataDataFields::Status pickLabelStatus () const
 
int rating () const
 
bool ratingChanged () const
 
void ratingInterval (int &lowest, int &highest) const
 
DisjointMetadataDataFields::Status ratingStatus () const
 
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)
 
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::Statustags () const
 
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
 
bool titlesChanged () const
 
DisjointMetadataDataFields::Status titlesStatus () const
 
bool willWriteMetadata (WriteMode writeMode, const MetaEngineSettingsContainer &settings=MetaEngineSettings::instance() ->settings()) const
 
bool write (ItemInfo info, WriteMode writeMode=FullWrite)
 
 ~DisjointMetadata () override
 

Member Enumeration Documentation

◆ 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

Constructor & Destructor Documentation

◆ DisjointMetadata()

Digikam::DisjointMetadata::DisjointMetadata ( )

◆ ~DisjointMetadata()

Digikam::DisjointMetadata::~DisjointMetadata ( )
override

Member Function Documentation

◆ changedFlags()

◆ colorLabel()

int Digikam::DisjointMetadata::colorLabel ( ) const

Returns the Color Label id (see ColorLabel values in globals.h). If status is DisjointMetadataDataFields::MetadataDisjoint, the None Label is returned. (see colorLabelInterval()) If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

References Digikam::DisjointMetadataDataFields::colorLabel.

Referenced by load().

◆ colorLabelChanged()

bool Digikam::DisjointMetadata::colorLabelChanged ( ) const

◆ colorLabelInterval()

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

◆ colorLabelStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::colorLabelStatus ( ) const

◆ comments()

CaptionsMap Digikam::DisjointMetadata::comments ( ) const

Returns a map all alternate language omments . If status is DisjointMetadataDataFields::MetadataDisjoint, the first loaded map is returned. If status is DisjointMetadataDataFields::MetadataInvalid, CaptionMap() is returned.

References Digikam::DisjointMetadataDataFields::comments.

Referenced by load(), setComments(), and write().

◆ commentsChanged()

bool Digikam::DisjointMetadata::commentsChanged ( ) const

◆ commentsStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::commentsStatus ( ) const

◆ dataFields()

DisjointMetadataDataFields Digikam::DisjointMetadata::dataFields ( ) const

◆ dateTime()

QDateTime Digikam::DisjointMetadata::dateTime ( ) const

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

References Digikam::DisjointMetadataDataFields::dateTime.

Referenced by load(), and setDateTime().

◆ dateTimeChanged()

bool Digikam::DisjointMetadata::dateTimeChanged ( ) const

Returns if the metadata field has been changed with the corresponding setter method.

References Digikam::DisjointMetadataDataFields::dateTimeChanged.

◆ dateTimeInterval()

◆ dateTimeStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::dateTimeStatus ( ) const

Returnsthe metadata field Status.

References Digikam::DisjointMetadataDataFields::dateTimeStatus.

◆ keywords()

QStringList Digikam::DisjointMetadata::keywords ( ) const

Returns a QStringList with all tags with status DisjointMetadataDataFields::MetadataAvailable. (i.e., the intersection of tags from all loaded metadata sets)

References Digikam::TagsCache::instance(), Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::TagsCache::NoLeadingSlash, and Digikam::DisjointMetadataDataFields::tags.

◆ load()

◆ metadataTemplate()

Template Digikam::DisjointMetadata::metadataTemplate ( ) const

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

References Digikam::DisjointMetadataDataFields::metadataTemplate.

Referenced by load().

◆ pickLabel()

int Digikam::DisjointMetadata::pickLabel ( ) const

Returns the Pick Label id (see PickLabel values in globals.h). If status is DisjointMetadataDataFields::MetadataDisjoint, the None Label is returned. (see pickLabelInterval()) If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.

References Digikam::DisjointMetadataDataFields::pickLabel.

Referenced by load().

◆ pickLabelChanged()

bool Digikam::DisjointMetadata::pickLabelChanged ( ) const

◆ pickLabelInterval()

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

◆ pickLabelStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::pickLabelStatus ( ) const

◆ rating()

int Digikam::DisjointMetadata::rating ( ) const

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

References Digikam::DisjointMetadataDataFields::rating.

Referenced by load(), and setRating().

◆ ratingChanged()

bool Digikam::DisjointMetadata::ratingChanged ( ) const

◆ ratingInterval()

◆ ratingStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::ratingStatus ( ) const

◆ reset()

void Digikam::DisjointMetadata::reset ( )

◆ resetChanged()

◆ setColorLabel()

◆ setComments()

◆ setDataFields()

void Digikam::DisjointMetadata::setDataFields ( const DisjointMetadataDataFields data)

◆ setDateTime()

void Digikam::DisjointMetadata::setDateTime ( const QDateTime &  dateTime,
DisjointMetadataDataFields::Status  status = DisjointMetadataDataFields::MetadataAvailable 
)

◆ setMetadataTemplate()

◆ setPickLabel()

◆ setRating()

◆ setTag()

◆ setTitles()

◆ tags()

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

Returns a map with the status for each tag. 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.

References Digikam::DisjointMetadataDataFields::tags.

◆ tagsChanged()

bool Digikam::DisjointMetadata::tagsChanged ( ) const

◆ tagStatus() [1/2]

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::tagStatus ( const QString &  tagPath) const

◆ tagStatus() [2/2]

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::tagStatus ( int  albumId) const

◆ templateChanged()

bool Digikam::DisjointMetadata::templateChanged ( ) const

◆ templateStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::templateStatus ( ) const

◆ titles()

CaptionsMap Digikam::DisjointMetadata::titles ( ) const

Returns a map all alternate language titles. If status is DisjointMetadataDataFields::MetadataDisjoint, the first loaded map is returned. If status is DisjointMetadataDataFields::MetadataInvalid, CaptionMap() is returned.

References Digikam::DisjointMetadataDataFields::titles.

Referenced by setTitles().

◆ titlesChanged()

bool Digikam::DisjointMetadata::titlesChanged ( ) const

◆ titlesStatus()

DisjointMetadataDataFields::Status Digikam::DisjointMetadata::titlesStatus ( ) const

◆ willWriteMetadata()

bool Digikam::DisjointMetadata::willWriteMetadata ( DisjointMetadata::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.

References Digikam::DisjointMetadataDataFields::colorLabelChanged, Digikam::DisjointMetadataDataFields::colorLabelStatus, Digikam::DisjointMetadataDataFields::commentsChanged, Digikam::DisjointMetadataDataFields::commentsStatus, Digikam::DisjointMetadataDataFields::dateTimeChanged, Digikam::DisjointMetadataDataFields::dateTimeStatus, FullWrite, FullWriteIfChanged, Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::DisjointMetadataDataFields::pickLabelChanged, Digikam::DisjointMetadataDataFields::pickLabelStatus, Digikam::DisjointMetadataDataFields::ratingChanged, Digikam::DisjointMetadataDataFields::ratingStatus, Digikam::MetaEngineSettingsContainer::saveColorLabel, Digikam::MetaEngineSettingsContainer::saveComments, Digikam::MetaEngineSettingsContainer::saveDateTime, Digikam::MetaEngineSettingsContainer::saveFaceTags, Digikam::MetaEngineSettingsContainer::savePickLabel, Digikam::MetaEngineSettingsContainer::saveRating, Digikam::MetaEngineSettingsContainer::saveTags, Digikam::MetaEngineSettingsContainer::saveTemplate, Digikam::DisjointMetadataDataFields::tagsChanged, Digikam::DisjointMetadataDataFields::templateChanged, Digikam::DisjointMetadataDataFields::templateStatus, Digikam::DisjointMetadataDataFields::titlesChanged, and Digikam::DisjointMetadataDataFields::titlesStatus.

Referenced by Digikam::FileActionMngrDatabaseWorker::applyMetadata(), Digikam::FileActionMngrDatabaseWorker::assignColorLabel(), Digikam::FileActionMngrDatabaseWorker::assignPickLabel(), and Digikam::FileActionMngrDatabaseWorker::assignRating().

◆ write()

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

Applies the set of metadata contained in this MetadataHub to the given ItemInfo object.

Returns
Returns true if the info object has been changed

References Digikam::DisjointMetadataDataFields::colorLabel, Digikam::DisjointMetadataDataFields::colorLabelChanged, Digikam::DisjointMetadataDataFields::colorLabelStatus, comments(), Digikam::DisjointMetadataDataFields::comments, Digikam::DisjointMetadataDataFields::commentsChanged, Digikam::DisjointMetadataDataFields::commentsStatus, Digikam::DisjointMetadataDataFields::dateTime, Digikam::DisjointMetadataDataFields::dateTimeChanged, Digikam::DisjointMetadataDataFields::dateTimeStatus, FullWrite, FullWriteIfChanged, Digikam::ItemInfo::imageComments(), Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::DisjointMetadataDataFields::metadataTemplate, Digikam::DisjointMetadataDataFields::pickLabel, Digikam::DisjointMetadataDataFields::pickLabelChanged, Digikam::DisjointMetadataDataFields::pickLabelStatus, Digikam::DisjointMetadataDataFields::rating, Digikam::DisjointMetadataDataFields::ratingChanged, Digikam::DisjointMetadataDataFields::ratingStatus, Digikam::ItemInfo::removeMetadataTemplate(), Digikam::ItemInfo::removeTag(), Digikam::Template::removeTemplateTitle(), Digikam::ItemInfo::setColorLabel(), Digikam::ItemInfo::setDateTime(), Digikam::ItemInfo::setMetadataTemplate(), Digikam::ItemInfo::setPickLabel(), Digikam::ItemInfo::setRating(), Digikam::ItemInfo::setTag(), Digikam::DisjointMetadataDataFields::tags, Digikam::DisjointMetadataDataFields::tagsChanged, Digikam::DisjointMetadataDataFields::templateChanged, Digikam::DisjointMetadataDataFields::templateStatus, Digikam::Template::templateTitle(), Digikam::DatabaseComment::Title, Digikam::DisjointMetadataDataFields::titles, Digikam::DisjointMetadataDataFields::titlesChanged, and Digikam::DisjointMetadataDataFields::titlesStatus.

Referenced by Digikam::FileActionMngrDatabaseWorker::applyMetadata(), Digikam::FileActionMngrDatabaseWorker::assignColorLabel(), Digikam::FileActionMngrDatabaseWorker::assignPickLabel(), and Digikam::FileActionMngrDatabaseWorker::assignRating().


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