digiKam
|
Public Types | |
enum | Type { InvalidFace = 0 , UnknownName = 1 << 0 , UnconfirmedName = 1 << 1 , IgnoredName = 1 << 2 , ConfirmedName = 1 << 3 , FaceForTraining = 1 << 4 , UnconfirmedTypes = UnknownName | UnconfirmedName , NormalFaces = UnknownName | UnconfirmedName | IgnoredName | ConfirmedName , AllTypes = UnknownName | UnconfirmedName | IgnoredName | ConfirmedName | FaceForTraining , TypeFirst = UnknownName , TypeLast = FaceForTraining } |
Public Member Functions | |
FaceTagsIface () | |
FaceTagsIface (const QString &attribute, qlonglong imageId, int tagId, const TagRegion ®ion) | |
FaceTagsIface (Type type, qlonglong imageId, int tagId, const TagRegion ®ion) | |
QString | getAutodetectedPersonString () const |
qlonglong | imageId () const |
bool | isConfirmedName () const |
bool | isForTraining () const |
bool | isIgnoredName () const |
bool | isInvalidFace () const |
bool | isNull () const |
bool | isUnconfirmedName () const |
bool | isUnconfirmedType () const |
bool | isUnknownName () const |
bool | operator== (const FaceTagsIface &other) const |
TagRegion | region () const |
void | setRegion (const TagRegion ®ion) |
void | setTagId (int tagId) |
void | setType (Type type) |
int | tagId () const |
QVariant | toVariant () const |
Type | type () const |
Static Public Member Functions | |
static QString | attributeForType (Type type) |
static QStringList | attributesForFlags (TypeFlags flags) |
static FaceTagsIface | fromListing (qlonglong imageid, const QList< QVariant > &values) |
static FaceTagsIface | fromVariant (const QVariant &var) |
static Type | typeForAttribute (const QString &attribute, int tagId=0) |
static Type | typeForId (int tagId) |
Protected Attributes | |
qlonglong | m_imageId |
TagRegion | m_region |
int | m_tagId |
Type | m_type |
Digikam::FaceTagsIface::FaceTagsIface | ( | ) |
Referenced by fromListing(), and fromVariant().
Digikam::FaceTagsIface::FaceTagsIface | ( | Type | type, |
qlonglong | imageId, | ||
int | tagId, | ||
const TagRegion & | region | ||
) |
Digikam::FaceTagsIface::FaceTagsIface | ( | const QString & | attribute, |
qlonglong | imageId, | ||
int | tagId, | ||
const TagRegion & | region | ||
) |
References m_type, tagId(), and typeForAttribute().
|
static |
Return the corresponding image tag property for the given type
References Digikam::ImageTagPropertyName::autodetectedFace(), ConfirmedName, FaceForTraining, Digikam::ImageTagPropertyName::faceToTrain(), Digikam::ImageTagPropertyName::ignoredFace(), IgnoredName, Digikam::ImageTagPropertyName::tagRegion(), type(), UnconfirmedName, and UnknownName.
Referenced by attributesForFlags(), and Digikam::FaceTagsEditor::removeFaceAndTag().
|
static |
Returns a list of all image tag properties for which flags are set
References attributeForType(), TypeFirst, and TypeLast.
Referenced by Digikam::FaceTagsEditor::add(), Digikam::FaceTagsEditor::addManually(), Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeSuggestedName(), Digikam::FaceTagsEditor::changeTag(), Digikam::FaceTagsEditor::confirmName(), Digikam::FaceTagsEditor::databaseFaces(), Digikam::FaceTagsEditor::faceItemTagPairs(), Digikam::FaceTagsEditor::removeAllFaces(), Digikam::FaceTagsEditor::removeFace(), and Digikam::FaceUtils::writeUnconfirmedResults().
|
static |
Create a FaceTagsIface from the extraValues returned from ItemLister.
References FaceTagsIface(), imageId(), tagId(), and value.
Referenced by Digikam::ItemAlbumModel::slotData().
|
static |
Writes the contents of this face - in a compact way - in the QVariant. Only native QVariant types are used, that is, the QVariant will not have a custom type, thus it can be compared by value by operator==.
References FaceTagsIface(), and Digikam::TagRegion::fromVariant().
Referenced by Digikam::AssignNameOverlay::checkIndex(), Digikam::ItemFilterModel::compareCategories(), Digikam::ItemFilterModel::data(), Digikam::ItemFaceDelegate::face(), Digikam::AssignNameWidget::setUserData(), Digikam::AssignNameOverlay::slotAssigned(), Digikam::AssignNameOverlay::updateFace(), Digikam::AssignNameWidget::Private::updateIgnoreButton(), and Digikam::AssignNameWidget::Private::updateRejectButtonTooltip().
QString Digikam::FaceTagsIface::getAutodetectedPersonString | ( | ) | const |
Returns the string tagId + ',' + unconfirmedFace + ',' + regionXml
References Digikam::ImageTagPropertyName::autodetectedFace(), isUnconfirmedType(), region(), and tagId().
Referenced by Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeSuggestedName(), Digikam::FaceTagsEditor::removeFaceAndTag(), and Digikam::FaceUtils::writeUnconfirmedResults().
qlonglong Digikam::FaceTagsIface::imageId | ( | ) | const |
References m_imageId.
Referenced by Digikam::FaceTagsEditor::add(), Digikam::FaceTagsEditor::addFaceAndTag(), Digikam::FaceTagsEditor::addManually(), Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeSuggestedName(), Digikam::FaceTagsEditor::changeTag(), Digikam::FaceTagsEditor::confirmedEntry(), Digikam::FaceTagsEditor::confirmName(), fromListing(), Digikam::FaceItemRetriever::getThumbnails(), Digikam::operator<<(), Digikam::FaceTagsEditor::removeFace(), Digikam::FaceTagsEditor::removeFaceAndTag(), and Digikam::FaceTagsEditor::removeFaces().
|
inline |
|
inline |
|
inline |
Referenced by Digikam::AssignNameWidget::setCurrentFace().
|
inline |
bool Digikam::FaceTagsIface::isNull | ( | ) | const |
References InvalidFace, and m_type.
Referenced by Digikam::FaceGroup::applyItemGeometryChanges(), Digikam::ItemFilterModel::categoryIdentifier(), Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeTag(), Digikam::ItemSortSettings::compareCategories(), Digikam::FaceTagsEditor::removeFace(), Digikam::FaceTagsEditor::removeFaces(), Digikam::AssignNameWidget::setCurrentFace(), Digikam::FaceGroup::slotAlbumRenamed(), and Digikam::FaceUtils::writeUnconfirmedResults().
|
inline |
Referenced by Digikam::FaceUtils::writeUnconfirmedResults().
|
inline |
Referenced by getAutodetectedPersonString(), and Digikam::FaceUtils::writeUnconfirmedResults().
|
inline |
bool Digikam::FaceTagsIface::operator== | ( | const FaceTagsIface & | other | ) | const |
TagRegion Digikam::FaceTagsIface::region | ( | ) | const |
References m_region.
Referenced by Digikam::FaceTagsEditor::addFaceAndTag(), Digikam::FaceGroup::applyItemGeometryChanges(), Digikam::ItemFilterModel::categoryIdentifier(), Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeSuggestedName(), Digikam::ItemScanner::commitFaces(), Digikam::ItemSortSettings::compareCategories(), Digikam::FaceTagsEditor::confirmedEntry(), Digikam::FaceGroup::Private::createItem(), Digikam::ItemFilterModel::data(), Digikam::AlbumManager::deleteTAlbum(), Digikam::ItemFaceDelegate::faceRect(), getAutodetectedPersonString(), Digikam::FaceItemRetriever::getDetails(), Digikam::FaceItemRetriever::getThumbnails(), Digikam::MetadataHub::loadFaceTags(), Digikam::AlbumManager::mergeTAlbum(), Digikam::operator<<(), Digikam::DetectionBenchmarker::process(), Digikam::FaceTagsEditor::removeFaceAndTag(), Digikam::FaceUtils::rotateFaces(), Digikam::DatabaseTask::run(), setRegion(), Digikam::FaceGroup::slotAssigned(), Digikam::FaceUtils::storeThumbnails(), and Digikam::FaceUtils::writeUnconfirmedResults().
void Digikam::FaceTagsIface::setRegion | ( | const TagRegion & | region | ) |
References m_region, and region().
Referenced by Digikam::FaceTagsEditor::changeRegion(), and Digikam::FacePipeline::editRegion().
void Digikam::FaceTagsIface::setTagId | ( | int | tagId | ) |
References m_tagId, and tagId().
Referenced by Digikam::FaceTagsEditor::changeTag().
void Digikam::FaceTagsIface::setType | ( | Type | type | ) |
References m_type, and type().
Referenced by Digikam::FaceTagsEditor::changeTag(), and Digikam::TrainerWorker::process().
int Digikam::FaceTagsIface::tagId | ( | ) | const |
References m_tagId.
Referenced by Digikam::FaceTagsEditor::add(), Digikam::FaceTagsEditor::addFaceAndTag(), Digikam::FaceTagsEditor::addManually(), Digikam::ItemFilterModel::categoryIdentifier(), Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeSuggestedName(), Digikam::FaceTagsEditor::changeTag(), Digikam::ItemSortSettings::compareCategories(), Digikam::FaceTagsEditor::confirmedEntry(), Digikam::FaceTagsEditor::confirmName(), Digikam::ItemFilterModel::data(), Digikam::AlbumManager::deleteTAlbum(), FaceTagsIface(), fromListing(), getAutodetectedPersonString(), Digikam::DigikamItemView::getFaceIds(), Digikam::MetadataHub::loadFaceTags(), Digikam::AlbumManager::mergeTAlbum(), Digikam::operator<<(), Digikam::FaceTagsEditor::removeFace(), Digikam::FaceTagsEditor::removeFaces(), Digikam::AssignNameWidget::setCurrentFace(), setTagId(), Digikam::FaceGroup::slotAlbumRenamed(), Digikam::FaceGroup::slotAssigned(), typeForAttribute(), typeForId(), and Digikam::FaceUtils::writeUnconfirmedResults().
QVariant Digikam::FaceTagsIface::toVariant | ( | ) | const |
References m_imageId, m_region, m_tagId, m_type, and Digikam::TagRegion::toVariant().
Referenced by Digikam::FaceGroup::Private::addItem(), and Digikam::ItemAlbumModel::slotData().
FaceTagsIface::Type Digikam::FaceTagsIface::type | ( | ) | const |
References m_type.
Referenced by Digikam::FaceTagsEditor::addManually(), attributeForType(), Digikam::ItemFilterModel::categoryIdentifier(), Digikam::FaceTagsEditor::changeRegion(), Digikam::FaceTagsEditor::changeTag(), Digikam::ItemSortSettings::compareCategories(), Digikam::FaceGroup::Private::createAssignNameWidget(), Digikam::ItemFilterModel::data(), Digikam::operator<<(), Digikam::FaceTagsEditor::removeFaceAndTag(), setType(), Digikam::AssignNameWidget::setUserData(), Digikam::AssignNameWidget::Private::updateIgnoreButton(), and Digikam::AssignNameWidget::Private::updateRejectButtonTooltip().
|
static |
Return the Type for the given attribute. To distinguish between UnknownName and UnconfirmedName, the tagId must be given.
References Digikam::ImageTagPropertyName::autodetectedFace(), ConfirmedName, FaceForTraining, Digikam::ImageTagPropertyName::faceToTrain(), Digikam::ImageTagPropertyName::ignoredFace(), IgnoredName, Digikam::TagsCache::instance(), InvalidFace, tagId(), Digikam::ImageTagPropertyName::tagRegion(), UnconfirmedName, UnknownName, and Digikam::TagPropertyName::unknownPerson().
Referenced by FaceTagsIface().
|
static |
Returns the Face Type corresponding to the given TagId.
References ConfirmedName, IgnoredName, InvalidFace, Digikam::FaceTags::isPerson(), Digikam::FaceTags::isTheIgnoredPerson(), Digikam::FaceTags::isTheUnconfirmedPerson(), Digikam::FaceTags::isTheUnknownPerson(), tagId(), UnconfirmedName, and UnknownName.
Referenced by Digikam::FaceTagsEditor::changeTag().
|
protected |
Referenced by imageId(), operator==(), and toVariant().
|
protected |
Referenced by operator==(), region(), setRegion(), and toVariant().
|
protected |
Referenced by operator==(), setTagId(), tagId(), and toVariant().
|
protected |
Referenced by FaceTagsIface(), isNull(), operator==(), setType(), toVariant(), and type().