digiKam
option.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 : an abstract option class
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_OPTION_H
25 #define DIGIKAM_OPTION_H
26 
27 // Local includes
28 
29 #include "rule.h"
30 
31 namespace Digikam
32 {
33 
34 class Option : public Rule
35 {
36  Q_OBJECT
37 
38 public:
39 
40  Option(const QString& name, const QString& description);
41  Option(const QString& name, const QString& description, const QString& icon);
42  ~Option() override;
43 
44 protected:
45 
46  QString parseOperation(ParseSettings& settings, const QRegularExpressionMatch &match) override = 0;
47 
48 private:
49 
50  // Disable
51  Option(QObject*) = delete;
52  Option(const Option&) = delete;
53  Option& operator=(const Option&) = delete;
54 
55 private:
56 
57  class Private;
58  Private* const d;
59 };
60 
61 } // namespace Digikam
62 
63 #endif // DIGIKAM_OPTION_H
Definition: option.h:35
Option(const QString &name, const QString &description)
Definition: option.cpp:40
~Option() override
Definition: option.cpp:54
QString parseOperation(ParseSettings &settings, const QRegularExpressionMatch &match) override=0
Definition: parsesettings.h:43
Definition: rule.h:42
QPixmap icon(Rule::IconType type=Rule::Action) const
Definition: rule.cpp:86
QString description() const
Definition: rule.cpp:109
Definition: datefolderview.cpp:43