digiKam
Digikam::TaggingActionFactory Class Reference

Classes

class  ConstraintInterface
 

Public Types

enum  NameMatchMode { MatchStartingWithFragment , MatchContainingFragment }
 

Public Member Functions

QList< TaggingActionactions () const
 Returns the sorted list of suggested tagging actions, based on the above settings. More...
 
ConstraintInterfaceconstraintInterface () const
 
TaggingAction defaultTaggingAction () const
 Returns one single action, which is decided to be the presumably best action based on the settings. More...
 
QString fragment () const
 
int indexOfDefaultAction () const
 Returns the index of the default action in the list returned by generate() More...
 
int indexOfLastRecentAction () const
 Returns the index of the last recent action in the list returned by actions() More...
 
NameMatchMode nameMatchMode () const
 
int parentTagId () const
 
void reset ()
 reset all settings to the default (no fragment, no actions) More...
 
void setConstraintInterface (ConstraintInterface *const iface)
 
void setFragment (const QString &fragment)
 Set a fragment of a tag name to generate possible tags, as known from completers. More...
 
void setNameMatchMode (NameMatchMode mode)
 Set the matching mode for the tag name. More...
 
void setParentTag (int parentTagId)
 Set a tag which may by the user be intended to be the parent of a newly created tag. More...
 
QString suggestedUIString (const TaggingAction &action) const
 Returns a string to be used in the UI for the given TaggingAction, interpreted in the context of the current settings. More...
 
 TaggingActionFactory ()
 
virtual ~TaggingActionFactory ()
 

Static Public Member Functions

static TaggingAction defaultTaggingAction (const QString &tagName, int parentTagId=0)
 

Member Enumeration Documentation

◆ NameMatchMode

Enumerator
MatchStartingWithFragment 

Default: use the "startingWith" method.

MatchContainingFragment 

use the "contains" method

Constructor & Destructor Documentation

◆ TaggingActionFactory()

Digikam::TaggingActionFactory::TaggingActionFactory ( )
explicit

◆ ~TaggingActionFactory()

Digikam::TaggingActionFactory::~TaggingActionFactory ( )
virtual

Member Function Documentation

◆ actions()

◆ constraintInterface()

TaggingActionFactory::ConstraintInterface * Digikam::TaggingActionFactory::constraintInterface ( ) const

◆ defaultTaggingAction() [1/2]

TaggingAction Digikam::TaggingActionFactory::defaultTaggingAction ( ) const

Returns one single action, which is decided to be the presumably best action based on the settings.

Referenced by actions(), Digikam::AddTagsLineEdit::currentTaggingAction(), and Digikam::AddTagsLineEdit::slotTextEdited().

◆ defaultTaggingAction() [2/2]

TaggingAction Digikam::TaggingActionFactory::defaultTaggingAction ( const QString &  tagName,
int  parentTagId = 0 
)
static

◆ fragment()

QString Digikam::TaggingActionFactory::fragment ( ) const

Referenced by setFragment().

◆ indexOfDefaultAction()

int Digikam::TaggingActionFactory::indexOfDefaultAction ( ) const

Returns the index of the default action in the list returned by generate()

References actions().

◆ indexOfLastRecentAction()

int Digikam::TaggingActionFactory::indexOfLastRecentAction ( ) const

Returns the index of the last recent action in the list returned by actions()

◆ nameMatchMode()

TaggingActionFactory::NameMatchMode Digikam::TaggingActionFactory::nameMatchMode ( ) const

◆ parentTagId()

int Digikam::TaggingActionFactory::parentTagId ( ) const

◆ reset()

void Digikam::TaggingActionFactory::reset ( )

reset all settings to the default (no fragment, no actions)

References MatchStartingWithFragment.

◆ setConstraintInterface()

void Digikam::TaggingActionFactory::setConstraintInterface ( ConstraintInterface *const  iface)

Allows to filter the scope of suggested tags. Pass an implementation of ConstraintInterface (reamins in your ownership). actions() will then only suggest to assign tags for which matches() is true

◆ setFragment()

void Digikam::TaggingActionFactory::setFragment ( const QString &  fragment)

Set a fragment of a tag name to generate possible tags, as known from completers.

References fragment().

◆ setNameMatchMode()

void Digikam::TaggingActionFactory::setNameMatchMode ( NameMatchMode  mode)

Set the matching mode for the tag name.

◆ setParentTag()

void Digikam::TaggingActionFactory::setParentTag ( int  parentTagId)

Set a tag which may by the user be intended to be the parent of a newly created tag.

References parentTagId().

◆ suggestedUIString()


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