digiKam Developer Documentation: Digikam::Token Class Reference

| digiKam Developer Documentation Professional Photo Management with the Power of Open Source

Loading...
Searching...
No Matches
Signals | Public Member Functions | List of all members
Digikam::Token Class Reference

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

Inheritance diagram for Digikam::Token:

## Signals
void | signalTokenTriggered (const QString &)
| This signal is emitted when the action of the token is triggered.

## Public Member Functions
| Token (const QString &id, const QString &description)
QAction * | action () const
QString | description () const
QString | id () const

## Detailed Description

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()

## 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.

## ◆ description()

QString Digikam::Token::description | ( |  | ) | const

Returns
  The description of the token. It can be used for example in the tooltip of the AdvancedRenameWidget.

## ◆ 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().