digiKam
Digikam::Token Class Reference

Token is the smallest parsing unit in AdvancedRename utility More...

+ Inheritance diagram for Digikam::Token:

Signals

void signalTokenTriggered (const QString &)
 

Public Member Functions

QAction * action ()
 
QString description ()
 
QString id ()
 
 Token (const QString &id, const QString &description)
 
 ~Token () override
 

Detailed Description

Token is the smallest parsing unit in AdvancedRename utility

The Token class represents the smallest parsing unit for the Parser class. Every string you enter as a renaming pattern is a combination of tokens and literal text. For example

"[file]{upper}_###_abc.[ext]{lower}"

is composed of five tokens

[file]
{upper}
###
.[ext]
{lower}

and two literals

_
_abc

A rule must assign at least one token object, to make parsing work. More than one token can be assigned to a Rule.

See also
Rule::addToken()

Constructor & Destructor Documentation

◆ Token()

Digikam::Token::Token ( const QString &  id,
const QString &  description 
)
explicit

References description().

◆ ~Token()

Digikam::Token::~Token ( )
override

Member Function Documentation

◆ action()

QAction* Digikam::Token::action ( )
inline
Returns
The action of the token. This action can be connected to a button or menu item. If triggered, high-level classes like AdvancedRenameWidget can connect to the signal and display the emitted text in the line edit input widget.

Referenced by Digikam::Rule::addToken(), Digikam::Rule::registerButton(), and Digikam::Rule::registerMenu().

◆ description()

QString Digikam::Token::description ( )
inline
Returns
The description of the token. It can be used for example in the tooltip of the AdvancedRenameWidget.

Referenced by Token().

◆ id()

QString Digikam::Token::id ( )
inline
Returns
The ID of the token. This is the actual token string, for example
"[file]"
This id will be emitted as a signal by slotTriggered().

◆ signalTokenTriggered

void Digikam::Token::signalTokenTriggered ( const QString &  )
signal

This signal is emitted when the action of the token is triggered.


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