digiKam
Loading...
Searching...
No Matches
Digikam::FaceTagsIface Class Reference

#include <facetagsiface.h>

+ Inheritance diagram for Digikam::FaceTagsIface:

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 ()=default
 
 FaceTagsIface (const FaceTagsIface &other)
 
 FaceTagsIface (const QString &attribute, qlonglong imageId, int tagId, const TagRegion &region)
 
 FaceTagsIface (Type type, qlonglong imageId, int tagId, const TagRegion &region)
 
QString getAutodetectedPersonString () const
 
const QString hash () 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
 
FaceTagsIfaceoperator= (const FaceTagsIface &other)
 
bool operator== (const FaceTagsIface &other) const
 
TagRegion region () const
 
void removeFaceTraining () const
 
void setRegion (const TagRegion &region)
 
void setTagId (int tagId)
 
void setType (Type type)
 
int tagId () const
 
QVariant toVariant () const
 
Type type () const
 
 ~FaceTagsIface ()=default
 

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 = 0
 
TagRegion m_region
 
int m_tagId = 0
 
Type m_type = InvalidFace
 

Member Enumeration Documentation

◆ Type

Enumerator
InvalidFace 
UnknownName 
UnconfirmedName 
IgnoredName 
ConfirmedName 
FaceForTraining 
UnconfirmedTypes 
NormalFaces 
AllTypes 
TypeFirst 
TypeLast 

Constructor & Destructor Documentation

◆ FaceTagsIface() [1/4]

Digikam::FaceTagsIface::FaceTagsIface ( )
default

Referenced by fromListing(), and fromVariant().

◆ FaceTagsIface() [2/4]

Digikam::FaceTagsIface::FaceTagsIface ( const FaceTagsIface other)

◆ FaceTagsIface() [3/4]

Digikam::FaceTagsIface::FaceTagsIface ( Type  type,
qlonglong  imageId,
int  tagId,
const TagRegion region 
)

◆ FaceTagsIface() [4/4]

Digikam::FaceTagsIface::FaceTagsIface ( const QString &  attribute,
qlonglong  imageId,
int  tagId,
const TagRegion region 
)

References m_type, tagId(), and typeForAttribute().

◆ ~FaceTagsIface()

Digikam::FaceTagsIface::~FaceTagsIface ( )
default

Member Function Documentation

◆ attributeForType()

◆ attributesForFlags()

◆ fromListing()

FaceTagsIface Digikam::FaceTagsIface::fromListing ( qlonglong  imageid,
const QList< QVariant > &  values 
)
static

Create a FaceTagsIface from the extraValues returned from ItemLister.

References FaceTagsIface(), imageId(), tagId(), and value.

Referenced by Digikam::ItemAlbumModel::slotData().

◆ fromVariant()

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

◆ getAutodetectedPersonString()

QString Digikam::FaceTagsIface::getAutodetectedPersonString ( ) const

◆ hash()

const QString Digikam::FaceTagsIface::hash ( ) const

Generate a hash based on the imageId, tagId, and rect to uniquely identify this entry in the face training DB.

References m_imageId, m_region, m_tagId, and Digikam::TagRegion::toXml().

Referenced by removeFaceTraining().

◆ imageId()

◆ isConfirmedName()

◆ isForTraining()

bool Digikam::FaceTagsIface::isForTraining ( ) const
inline

◆ isIgnoredName()

bool Digikam::FaceTagsIface::isIgnoredName ( ) const
inline

◆ isInvalidFace()

bool Digikam::FaceTagsIface::isInvalidFace ( ) const
inline

◆ isNull()

◆ isUnconfirmedName()

bool Digikam::FaceTagsIface::isUnconfirmedName ( ) const
inline

◆ isUnconfirmedType()

bool Digikam::FaceTagsIface::isUnconfirmedType ( ) const
inline

◆ isUnknownName()

bool Digikam::FaceTagsIface::isUnknownName ( ) const
inline

◆ operator=()

FaceTagsIface & Digikam::FaceTagsIface::operator= ( const FaceTagsIface other)

◆ operator==()

bool Digikam::FaceTagsIface::operator== ( const FaceTagsIface other) const

References m_imageId, m_region, m_tagId, and m_type.

◆ region()

◆ removeFaceTraining()

void Digikam::FaceTagsIface::removeFaceTraining ( ) const

Remove the face from face training based on the current imageId, tagId, and rect hash.

References ConfirmedName, hash(), m_type, and Digikam::RecognitionTrainingUpdateQueue::push().

Referenced by Digikam::FaceTagsEditor::removeFaceAndTag().

◆ setRegion()

void Digikam::FaceTagsIface::setRegion ( const TagRegion region)

◆ setTagId()

void Digikam::FaceTagsIface::setTagId ( int  tagId)

References m_tagId, and tagId().

Referenced by Digikam::FaceTagsEditor::changeTag().

◆ setType()

void Digikam::FaceTagsIface::setType ( Type  type)

◆ tagId()

◆ toVariant()

QVariant Digikam::FaceTagsIface::toVariant ( ) const

◆ type()

◆ typeForAttribute()

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

◆ typeForId()

Member Data Documentation

◆ m_imageId

qlonglong Digikam::FaceTagsIface::m_imageId = 0
protected

◆ m_region

TagRegion Digikam::FaceTagsIface::m_region
protected

◆ m_tagId

int Digikam::FaceTagsIface::m_tagId = 0
protected

◆ m_type


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