digiKam
filteractionfilter.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 : 2010-11-10
7  * Description : meta-filter to apply FilterActions
8  *
9  * Copyright (C) 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_FILTER_ACTION_FILTER_H
26 #define DIGIKAM_FILTER_ACTION_FILTER_H
27 
28 // Local includes
29 
30 #include "digikam_export.h"
31 #include "dimgthreadedfilter.h"
32 #include "filteraction.h"
33 
34 namespace Digikam
35 {
36 
37 class DIGIKAM_EXPORT FilterActionFilter : public DImgThreadedFilter
38 {
39  Q_OBJECT
40 
41 public:
42 
46  explicit FilterActionFilter(QObject* const parent = nullptr);
47  ~FilterActionFilter() override;
48 
54  void setContinueOnError(bool cont);
55 
59  void setFilterActions(const QList<FilterAction>& actions);
60  void addFilterActions(const QList<FilterAction>& actions);
61  void setFilterAction(const FilterAction& action);
62  void addFilterAction(const FilterAction& action);
63 
64  QList<FilterAction> filterActions() const;
65 
74  QList<FilterAction> appliedFilterActions() const;
75 
79  bool isReproducible() const;
80 
87  bool isComplexAction() const;
88 
92  bool isSupported() const;
93 
105  bool completelyApplied() const;
106  FilterAction failedAction() const;
107  int failedActionIndex() const;
108  QString failedActionMessage() const;
109 
114  {
115  return FilterAction();
116  }
117 
118  void readParameters(const FilterAction&) override
119  {
120  }
121 
122  QString filterIdentifier() const override
123  {
124  return QString();
125  }
126 
127 protected:
128 
129  void filterImage() override;
130 
131 private:
132 
133  class Private;
134  Private* const d;
135 };
136 
137 } // namespace Digikam
138 
139 #endif // DIGIKAM_FILTER_ACTION_FILTER_H
Definition: dimgthreadedfilter.h:41
Definition: filteractionfilter.h:38
QString filterIdentifier() const override
Definition: filteractionfilter.h:122
FilterAction filterAction() override
Definition: filteractionfilter.h:113
void readParameters(const FilterAction &) override
Definition: filteractionfilter.h:118
Definition: filteraction.h:43
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43