digiKam
Digikam::TaggingAction Class Reference

Public Types

enum  Type { NoAction , AssignTag , CreateNewTag }
 

Public Member Functions

bool isValid () const
 
QString newTagName () const
 If shallCreateNewTag(), returns the tag name and the parent tag id, 0 for toplevel tag. More...
 
bool operator== (const TaggingAction &other) const
 
int parentTagId () const
 
bool shallAssignTag () const
 
bool shallCreateNewTag () const
 
 TaggingAction ()
 
 TaggingAction (const QString &name, int parentTagId)
 
 TaggingAction (int tagId)
 
int tagId () const
 If shallAssignTag(), returns the tag id. More...
 
Type type () const
 

Protected Attributes

int m_tagId
 
QString m_tagName
 
Type m_type
 

Member Enumeration Documentation

◆ Type

Describes two possible actions: Assigning an existing tag, known by tag id, or creation of a new tag, with a given tag name and a parent tag.

Enumerator
NoAction 
AssignTag 
CreateNewTag 

Constructor & Destructor Documentation

◆ TaggingAction() [1/3]

Digikam::TaggingAction::TaggingAction ( )

Create a NoAction

◆ TaggingAction() [2/3]

Digikam::TaggingAction::TaggingAction ( int  tagId)
explicit

Assign the existing tag with given id

◆ TaggingAction() [3/3]

Digikam::TaggingAction::TaggingAction ( const QString &  name,
int  parentTagId 
)

Create a new tag with the given name. The parent shall be the tag with the given id, or 0 for a toplevel tag.

Member Function Documentation

◆ isValid()

◆ newTagName()

QString Digikam::TaggingAction::newTagName ( ) const

If shallCreateNewTag(), returns the tag name and the parent tag id, 0 for toplevel tag.

References m_tagName.

Referenced by Digikam::AssignNameOverlay::slotAssigned(), Digikam::FaceGroup::slotAssigned(), and Digikam::TaggingActionFactory::suggestedUIString().

◆ operator==()

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

References m_tagId, m_tagName, and m_type.

◆ parentTagId()

int Digikam::TaggingAction::parentTagId ( ) const

◆ shallAssignTag()

bool Digikam::TaggingAction::shallAssignTag ( ) const

◆ shallCreateNewTag()

◆ tagId()

◆ type()

TaggingAction::Type Digikam::TaggingAction::type ( ) const

References m_type.

Member Data Documentation

◆ m_tagId

int Digikam::TaggingAction::m_tagId
protected

Referenced by operator==(), parentTagId(), and tagId().

◆ m_tagName

QString Digikam::TaggingAction::m_tagName
protected

Referenced by newTagName(), and operator==().

◆ m_type

Type Digikam::TaggingAction::m_type
protected

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