digiKam
defaultvaluemodifier.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-11-11
7  * Description : a modifier for setting a default value if option parsing failed
8  *
9  * Copyright (C) 2009-2012 by Andi Clemens <andi dot clemens at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_DEFAULT_VALUE_MODIFIER_H
25 #define DIGIKAM_DEFAULT_VALUE_MODIFIER_H
26 
27 // Local includes
28 
29 #include "modifier.h"
30 #include "ruledialog.h"
31 
32 class QLineEdit;
33 
34 namespace Digikam
35 {
36 
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit DefaultValueDialog(Rule* parent);
44  ~DefaultValueDialog() override;
45 
46  QLineEdit* valueInput;
47 
48 private:
49 
50  // Disable
51  explicit DefaultValueDialog(QWidget*) = delete;
53  DefaultValueDialog& operator=(const DefaultValueDialog&);
54 };
55 
56 // --------------------------------------------------------
57 
59 {
60  Q_OBJECT
61 
62 public:
63 
64  explicit DefaultValueModifier();
65  QString parseOperation(ParseSettings& settings, const QRegularExpressionMatch& match) override;
66 
67 private Q_SLOTS:
68 
69  void slotTokenTriggered(const QString& token) override;
70 
71 private:
72 
73  // Disable
74  explicit DefaultValueModifier(QObject*) = delete;
76  DefaultValueModifier& operator=(const DefaultValueModifier&) = delete;
77 };
78 
79 } // namespace Digikam
80 
81 #endif // DIGIKAM_DEFAULT_VALUE_MODIFIER_H
Definition: defaultvaluemodifier.h:38
~DefaultValueDialog() override
Definition: defaultvaluemodifier.cpp:72
QLineEdit * valueInput
Definition: defaultvaluemodifier.h:46
DefaultValueDialog(Rule *parent)
Definition: defaultvaluemodifier.cpp:43
Definition: defaultvaluemodifier.h:59
QString parseOperation(ParseSettings &settings, const QRegularExpressionMatch &match) override
Definition: defaultvaluemodifier.cpp:113
DefaultValueModifier()
Definition: defaultvaluemodifier.cpp:78
Definition: modifier.h:35
Definition: parsesettings.h:43
Definition: ruledialog.h:38
Definition: rule.h:42
Definition: datefolderview.cpp:43