24 #ifndef DIGIKAM_RULE_H
25 #define DIGIKAM_RULE_H
41 class Rule :
public QObject
55 explicit Rule(
const QString& name);
56 Rule(
const QString& name,
const QString&
icon);
79 QRegularExpression&
regExp()
const;
121 virtual void reset();
154 bool addToken(
const QString&
id,
const QString&
description,
const QString& actionName = QString());
158 void setIcon(
const QString& pixmap);
174 QPushButton* createButton(
const QString& name,
const QIcon&
icon);
179 Rule(QObject*) =
delete;
181 Rule& operator=(
const Rule&) =
delete;
Definition: parseresults.h:37
Definition: parsesettings.h:43
bool addToken(const QString &id, const QString &description, const QString &actionName=QString())
Definition: rule.cpp:199
virtual void slotTokenTriggered(const QString &)
Definition: rule.cpp:236
void signalTokenTriggered(const QString &)
void setUseTokenMenu(bool value)
Definition: rule.cpp:221
TokenList & tokens() const
Definition: rule.cpp:231
QAction * registerMenu(QMenu *parent)
Definition: rule.cpp:167
QPixmap icon(Rule::IconType type=Rule::Action) const
Definition: rule.cpp:86
void setRegExp(const QRegularExpression ®Exp)
Definition: rule.cpp:119
virtual QString parseOperation(ParseSettings &settings, const QRegularExpressionMatch &match)=0
QRegularExpression & regExp() const
Definition: rule.cpp:114
virtual void reset()
Definition: rule.cpp:246
Rule(const QString &name)
Definition: rule.cpp:58
static QString escapeToken(const QString &token)
Definition: rule.cpp:250
IconType
Definition: rule.h:48
@ Dialog
Definition: rule.h:50
@ Action
Definition: rule.h:49
bool isValid() const
Definition: rule.cpp:241
QPushButton * registerButton(QWidget *parent)
Definition: rule.cpp:136
~Rule() override
Definition: rule.cpp:73
void setIcon(const QString &pixmap)
Definition: rule.cpp:81
void setDescription(const QString &desc)
Definition: rule.cpp:104
ParseResults parse(ParseSettings &settings)
Definition: rule.cpp:267
bool useTokenMenu() const
Definition: rule.cpp:226
QString description() const
Definition: rule.cpp:109
qulonglong value
Definition: itemviewutilities.cpp:592
Definition: datefolderview.cpp:43
QList< Rule * > RulesList
Definition: rule.h:189