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

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

#include <token.h>

+ Inheritance diagram for Digikam::Token:

Signals

void signalTokenTriggered (const QString &)
 

Public Member Functions

QAction * action () const
 
QString description () const
 
QString id () const
 
 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(), and id().

◆ ~Token()

Digikam::Token::~Token ( )
override

Member Function Documentation

◆ action()

QAction * Digikam::Token::action ( ) const
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().

◆ description()

QString Digikam::Token::description ( ) const
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 ( ) const
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().

Referenced by Token().

◆ 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: