digiKam
dimgfiltermanager.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-06-24
7  * Description : manager for filters (registering, creating etc)
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_DIMG_FILTER_MANAGER_H
26 #define DIGIKAM_DIMG_FILTER_MANAGER_H
27 
28 // Qt includes
29 
30 #include <QStringList>
31 #include <QList>
32 #include <QString>
33 
34 // Local includes
35 
36 #include "dimgfiltergenerator.h"
37 #include "digikam_export.h"
38 
39 namespace Digikam
40 {
41 
42 class FilterAction;
43 
44 class DIGIKAM_EXPORT DImgFilterManager : public DImgFilterGenerator
45 {
46 public:
47 
48  static DImgFilterManager* instance();
49 
53  QStringList supportedFilters() override;
54 
58  QList<int> supportedVersions(const QString& filterIdentifier) override;
59 
65  QString displayableName(const QString& filterIdentifier) override;
66 
70  QString i18nDisplayableName(const QString& filterIdentifier);
71  QString i18nDisplayableName(const FilterAction& action);
72 
77  QString filterIcon(const QString& filterIdentifier);
78  QString filterIcon(const FilterAction& action);
79 
84  bool isSupported(const QString& filterIdentifier) override;
85  bool isSupported(const QString& filterIdentifier, int version) override;
86 
91  bool isRawConversion(const QString& filterIdentifier);
92 
99  DImgThreadedFilter* createFilter(const QString& filterIdentifier,
100  int version) override;
101 
105  void addGenerator(DImgFilterGenerator* const generator);
106  void removeGenerator(DImgFilterGenerator* const generator);
107 
108 private:
109 
110  // Disable
112  ~DImgFilterManager() override;
113  DImgFilterManager(const DImgFilterManager&) = delete;
114  DImgFilterManager& operator=(const DImgFilterManager&) = delete;
115 
116 private:
117 
118  friend class DImgFilterManagerCreator;
119 
120  class Private;
121  Private* const d;
122 };
123 
124 } // namespace Digikam
125 
126 #endif // DIGIKAM_DIMG_FILTER_MANAGER_H
Definition: dimgfiltergenerator.h:43
Definition: dimgfiltermanager.h:45
Definition: dimgthreadedfilter.h:41
Definition: filteraction.h:43
Definition: datefolderview.cpp:43