digiKam
|
Classes | |
class | Private |
Public Types | |
enum | WriteMode { FullWrite , FullWriteIfChanged , PartialWrite } |
Enumerator | |
---|---|
FullWrite | Write all available information |
FullWriteIfChanged | Do a full write if and only if
|
PartialWrite | Write only the changed parts. Metadata fields which cannot be changed from MetadataHub (photographer ID etc.) will never be written |
Digikam::DisjointMetadata::DisjointMetadata | ( | ) |
|
override |
int Digikam::DisjointMetadata::changedFlags | ( | ) |
changedFlags - used for selective metadata write. The result will be passed to metadatahub and it will
References Digikam::DisjointMetadataDataFields::colorLabelChanged, Digikam::DisjointMetadataDataFields::commentsChanged, Digikam::DisjointMetadataDataFields::dateTimeChanged, Digikam::DisjointMetadataDataFields::pickLabelChanged, Digikam::DisjointMetadataDataFields::ratingChanged, Digikam::DisjointMetadataDataFields::tagsChanged, Digikam::DisjointMetadataDataFields::templateChanged, Digikam::DisjointMetadataDataFields::titlesChanged, value, Digikam::MetadataHub::WRITE_COLORLABEL, Digikam::MetadataHub::WRITE_COMMENTS, Digikam::MetadataHub::WRITE_DATETIME, Digikam::MetadataHub::WRITE_PICKLABEL, Digikam::MetadataHub::WRITE_RATING, Digikam::MetadataHub::WRITE_TAGS, Digikam::MetadataHub::WRITE_TEMPLATE, and Digikam::MetadataHub::WRITE_TITLE.
Referenced by Digikam::FileActionMngrDatabaseWorker::applyMetadata().
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().
bool Digikam::DisjointMetadata::colorLabelChanged | ( | ) | const |
void Digikam::DisjointMetadata::colorLabelInterval | ( | int & | lowest, |
int & | highest | ||
) | const |
Returns the lowest and highest Color Label id (see ColorLabel values from globals.h). If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.
References Digikam::DisjointMetadataDataFields::colorLabel, Digikam::DisjointMetadataDataFields::colorLabelStatus, Digikam::DisjointMetadataDataFields::highestColorLabel, Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::DisjointMetadataDataFields::MetadataDisjoint, and Digikam::DisjointMetadataDataFields::MetadataInvalid.
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::colorLabelStatus | ( | ) | const |
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().
bool Digikam::DisjointMetadata::commentsChanged | ( | ) | const |
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::commentsStatus | ( | ) | const |
DisjointMetadataDataFields Digikam::DisjointMetadata::dataFields | ( | ) | const |
Referenced by Digikam::FileActionMngr::applyMetadata().
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().
bool Digikam::DisjointMetadata::dateTimeChanged | ( | ) | const |
Returns if the metadata field has been changed with the corresponding setter method.
References Digikam::DisjointMetadataDataFields::dateTimeChanged.
void Digikam::DisjointMetadata::dateTimeInterval | ( | QDateTime & | lowest, |
QDateTime & | highest | ||
) | const |
Returns the earliest and latest date. If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, invalid dates are returned.
References Digikam::DisjointMetadataDataFields::dateTime, Digikam::DisjointMetadataDataFields::dateTimeStatus, Digikam::DisjointMetadataDataFields::lastDateTime, Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::DisjointMetadataDataFields::MetadataDisjoint, and Digikam::DisjointMetadataDataFields::MetadataInvalid.
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::dateTimeStatus | ( | ) | const |
Returnsthe metadata field Status.
References Digikam::DisjointMetadataDataFields::dateTimeStatus.
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.
void Digikam::DisjointMetadata::load | ( | const ItemInfo & | info | ) |
References Digikam::ItemInfo::colorLabel(), colorLabel(), Digikam::DisjointMetadataDataFields::colorLabel, Digikam::DisjointMetadataDataFields::colorLabelStatus, comments(), Digikam::DisjointMetadataDataFields::comments, Digikam::DisjointMetadataDataFields::commentsStatus, Digikam::ItemInfo::dateTime(), dateTime(), Digikam::DisjointMetadataDataFields::dateTime, Digikam::DisjointMetadataDataFields::dateTimeStatus, Digikam::TemplateManager::defaultManager(), Digikam::TemplateManager::findByContents(), Digikam::ItemInfo::imageComments(), Digikam::Template::isNull(), Digikam::DisjointMetadataDataFields::MetadataDisjoint, Digikam::ItemInfo::metadataTemplate(), metadataTemplate(), Digikam::DisjointMetadataDataFields::metadataTemplate, Digikam::ItemInfo::pickLabel(), pickLabel(), Digikam::DisjointMetadataDataFields::pickLabel, Digikam::DisjointMetadataDataFields::pickLabelStatus, Digikam::ItemInfo::rating(), rating(), Digikam::DisjointMetadataDataFields::rating, Digikam::DisjointMetadataDataFields::ratingStatus, Digikam::ItemInfo::tagIds(), Digikam::DisjointMetadataDataFields::templateStatus, Digikam::DatabaseComment::Title, Digikam::DisjointMetadataDataFields::titles, and Digikam::DisjointMetadataDataFields::titlesStatus.
Referenced by Digikam::FileActionMngrDatabaseWorker::assignColorLabel(), Digikam::FileActionMngrDatabaseWorker::assignPickLabel(), and Digikam::FileActionMngrDatabaseWorker::assignRating().
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().
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().
bool Digikam::DisjointMetadata::pickLabelChanged | ( | ) | const |
void Digikam::DisjointMetadata::pickLabelInterval | ( | int & | lowest, |
int & | highest | ||
) | const |
Returns the lowest and highest Pick Label id (see PickLabel values from globals.h). If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.
References Digikam::DisjointMetadataDataFields::highestPickLabel, Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::DisjointMetadataDataFields::MetadataDisjoint, Digikam::DisjointMetadataDataFields::MetadataInvalid, Digikam::DisjointMetadataDataFields::pickLabel, and Digikam::DisjointMetadataDataFields::pickLabelStatus.
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::pickLabelStatus | ( | ) | const |
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().
bool Digikam::DisjointMetadata::ratingChanged | ( | ) | const |
void Digikam::DisjointMetadata::ratingInterval | ( | int & | lowest, |
int & | highest | ||
) | const |
Returns the lowest and highest rating. If status is DisjointMetadataDataFields::MetadataAvailable, the values are the same. If status is DisjointMetadataDataFields::MetadataInvalid, -1 is returned.
References Digikam::DisjointMetadataDataFields::highestRating, Digikam::DisjointMetadataDataFields::MetadataAvailable, Digikam::DisjointMetadataDataFields::MetadataDisjoint, Digikam::DisjointMetadataDataFields::MetadataInvalid, Digikam::DisjointMetadataDataFields::rating, and Digikam::DisjointMetadataDataFields::ratingStatus.
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::ratingStatus | ( | ) | const |
void Digikam::DisjointMetadata::reset | ( | ) |
void Digikam::DisjointMetadata::resetChanged | ( | ) |
References Digikam::DisjointMetadataDataFields::colorLabelChanged, Digikam::DisjointMetadataDataFields::commentsChanged, Digikam::DisjointMetadataDataFields::dateTimeChanged, Digikam::DisjointMetadataDataFields::pickLabelChanged, Digikam::DisjointMetadataDataFields::ratingChanged, Digikam::DisjointMetadataDataFields::tagsChanged, Digikam::DisjointMetadataDataFields::templateChanged, and Digikam::DisjointMetadataDataFields::titlesChanged.
void Digikam::DisjointMetadata::setColorLabel | ( | int | colorId, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
void Digikam::DisjointMetadata::setComments | ( | const CaptionsMap & | comments, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
void Digikam::DisjointMetadata::setDataFields | ( | const DisjointMetadataDataFields & | data | ) |
References Digikam::DisjointMetadata::Private::makeConnections().
Referenced by Digikam::FileActionMngr::applyMetadata().
void Digikam::DisjointMetadata::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.
References dateTime(), Digikam::DisjointMetadataDataFields::dateTime, Digikam::DisjointMetadataDataFields::dateTimeChanged, and Digikam::DisjointMetadataDataFields::dateTimeStatus.
void Digikam::DisjointMetadata::setMetadataTemplate | ( | const Template & | t, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
void Digikam::DisjointMetadata::setPickLabel | ( | int | pickId, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
void Digikam::DisjointMetadata::setRating | ( | int | rating, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
void Digikam::DisjointMetadata::setTag | ( | int | albumID, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
void Digikam::DisjointMetadata::setTitles | ( | const CaptionsMap & | titles, |
DisjointMetadataDataFields::Status | status = DisjointMetadataDataFields::MetadataAvailable |
||
) |
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.
bool Digikam::DisjointMetadata::tagsChanged | ( | ) | const |
References Digikam::DisjointMetadataDataFields::tagsChanged.
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::tagStatus | ( | const QString & | tagPath | ) | const |
References Digikam::TagsCache::instance(), and tagStatus().
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::tagStatus | ( | int | albumId | ) | const |
References Digikam::DisjointMetadataDataFields::tags.
Referenced by tagStatus().
bool Digikam::DisjointMetadata::templateChanged | ( | ) | const |
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::templateStatus | ( | ) | const |
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().
bool Digikam::DisjointMetadata::titlesChanged | ( | ) | const |
DisjointMetadataDataFields::Status Digikam::DisjointMetadata::titlesStatus | ( | ) | const |
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().
Applies the set of metadata contained in this MetadataHub to the given ItemInfo object.
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().