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

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
Digikam::FaceTagsIface Class Reference

## Public Types
enum | ExtendedFaceData { RejectedFaceTagListPosition = 1 }
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 }
typedef QFlags< Type > | TypeFlags

## Public Member Functions
| FaceTagsIface (const FaceTagsIface &other)
| FaceTagsIface (const QString &attribute, qlonglong imageId, int tagId, const TagRegion &region, const QList< int > &rejectedFaceTagList=QList< int >())
| FaceTagsIface (Type type, qlonglong imageId, int tagId, const TagRegion &region, const QList< int > &rejectedFaceTagList=QList< int >())
bool | addRejectedFaceTag (int tagId)
| Adds a tag to the list of tags excluded from face recognition so "rejected" matches are not matched again.
void | clearRejectedFaceTagList ()
| Clears the list of tags excluded from face recognition.
const QString | faceTagExtendedDataDBString () const
| Returns a string of the rect and the rejectedFaceTagList to be saved in the DB.
QString | getAutodetectedPersonString () const
| Returns the string tagId + ',' + unconfirmedFace + ',' + regionXml.
const QString | hash () const
| Generate a hash based on the imageId, tagId, and rect to uniquely identify this entry in the face training DB.
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
FaceTagsIface & | operator= (const FaceTagsIface &other)
bool | operator== (const FaceTagsIface &other) const
TagRegion | region () const
const QList< int > | rejectedFaceTagList () const
| Returns the list of tags excluded from face recognition so "rejected" matches are not matched again.
const QString | rejectedFaceTagListToString () const
| Returns a string representation of m_rejectedFaceTagList separated by m_listSeparator.
void | removeFaceTraining () const
| Remove the face from face training based on the current imageId, tagId, and rect hash.
void | setRegion (const TagRegion &region)
bool | setRejectedFaceTagList (const QList< int > &tagList)
| Adds a tag to the list of tags excluded from face recognition so "rejected" matches are not matched again.
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)
| Return the corresponding image tag property for the given type.
static QStringList | attributesForFlags (TypeFlags flags)
| Returns a list of all image tag properties for which flags are set.
static FaceTagsIface | fromListing (qlonglong imageid, const QList< QVariant > &values)
| Create a FaceTagsIface from the extraValues returned from ItemLister.
static FaceTagsIface | fromVariant (const QVariant &var)
| Writes the contents of this face - in a compact way - in the QVariant.
static const QList< int > | stringToRejectedFaceTagList (const QString &str)
| Returns a QList<int> from a string representation of m_rejectedFaceTagList separated by m_listSeparator.
static Type | typeForAttribute (const QString &attribute, int tagId=0)
| Return the Type for the given attribute.
static Type | typeForId (int tagId)
| Returns the Face Type corresponding to the given TagId.

## Static Public Attributes
static const float | faceThumbnailResizeFactor = 0.25F
static const QLatin1Char | listSeparator = QLatin1Char(';')
static const QLatin1Char | valueSeparator = QLatin1Char(',')

## Protected Attributes
qlonglong | m_imageId = 0
TagRegion | m_region
QList< int > | m_rejectedFaceTagList
int | m_tagId = 0
Type | m_type = InvalidFace

## Member Function Documentation

## ◆ addRejectedFaceTag()

bool Digikam::FaceTagsIface::addRejectedFaceTag | ( | int | tagId | ) |

adds a tag to the list of tags excluded from face recognition so "rejected" matches are not matched again

## ◆ fromVariant()

FaceTagsIface Digikam::FaceTagsIface::fromVariant | ( | const QVariant & | var | ) |
| static

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==.

## ◆ rejectedFaceTagListToString()

const QString Digikam::FaceTagsIface::rejectedFaceTagListToString | ( |  | ) | const

Returns a string representation of m_rejectedFaceTagList separated by listSeparator.

## ◆ setRejectedFaceTagList()

bool Digikam::FaceTagsIface::setRejectedFaceTagList | ( | const QList< int > & | tagList | ) |

replaces the list of tags excluded from face recognition

## ◆ stringToRejectedFaceTagList()

const QList< int > Digikam::FaceTagsIface::stringToRejectedFaceTagList | ( | const QString & | str | ) |
| static

Returns a QList<int> from a string representation of m_rejectedFaceTagList separated by listSeparator.

## ◆ typeForAttribute()

FaceTagsIface::Type Digikam::FaceTagsIface::typeForAttribute | ( | const QString & | attribute,
|  | int | tagId = `0`
| ) |  |
| static

To distinguish between UnknownName and UnconfirmedName, the tagId must be given.