digiKam
Loading...
Searching...
No Matches
token.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2009-08-08
7 * Description : a token class
8 *
9 * SPDX-FileCopyrightText: 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QList>
20#include <QObject>
21#include <QString>
22
23class QAction;
24
25namespace Digikam
26{
27
53class Token : public QObject
54{
55 Q_OBJECT
56
57public:
58
59 explicit Token(const QString& id, const QString& description);
60 ~Token() override;
61
69 QString id() const;
70
74 QString description() const;
75
80 QAction* action() const;
81
82Q_SIGNALS:
83
87 void signalTokenTriggered(const QString&);
88
89private Q_SLOTS:
90
94 void slotTriggered();
95
96private:
97
98 // Disable
99 Token(QObject*) = delete;
100 Token(const Token&) = delete;
101 Token& operator=(const Token&) = delete;
102
103private:
104
105 class Private;
106 Private* const d = nullptr;
107};
108
109typedef QList<Token*> TokenList;
110
111} // namespace Digikam
Token is the smallest parsing unit in AdvancedRename utility
Definition token.h:54
QString id() const
Definition token.cpp:60
~Token() override
Definition token.cpp:50
QAction * action() const
Definition token.cpp:70
QString description() const
Definition token.cpp:65
void signalTokenTriggered(const QString &)
Definition datefolderview.cpp:34
QList< Token * > TokenList
Definition token.h:109