digiKam
texturefilter.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 : 2005-05-25
7  * Description : TextureFilter threaded image filter.
8  *
9  * Copyright (C) 2005-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11  * Copyright (C) 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_TEXTURE_FILTER_H
27 #define DIGIKAM_TEXTURE_FILTER_H
28 
29 // Qt includes
30 
31 #include <QString>
32 
33 // Local includes
34 
35 #include "digikam_export.h"
36 #include "dimgthreadedfilter.h"
37 #include "texturecontainer.h"
38 
39 namespace Digikam
40 {
41 
42 class DIGIKAM_EXPORT TextureFilter : public DImgThreadedFilter
43 {
44  Q_OBJECT
45 
46 public:
47 
48  explicit TextureFilter(QObject* const parent = nullptr);
49  explicit TextureFilter(DImg* const orgImage,
50  QObject* const parent = nullptr,
51  const TextureContainer& settings = TextureContainer());
52 
53  ~TextureFilter() override;
54 
55  static QString FilterIdentifier()
56  {
57  return QLatin1String("digikam:TextureFilter");
58  }
59 
60  static QString DisplayableName();
61 
63  {
64  return QList<int>() << 2;
65  }
66 
67  static int CurrentVersion()
68  {
69  return 2;
70  }
71 
72  QString filterIdentifier() const override
73  {
74  return FilterIdentifier();
75  }
76 
77  FilterAction filterAction() override;
78  void readParameters(const FilterAction& action) override;
79 
80 private:
81 
82  void filterImage() override;
83 
84 private:
85 
86  TextureContainer m_settings;
87 };
88 
89 } // namespace Digikam
90 
91 #endif // DIGIKAM_TEXTURE_FILTER_H
Definition: dimgthreadedfilter.h:41
Definition: dimg.h:62
Definition: filteraction.h:43
Definition: texturecontainer.h:41
Definition: texturefilter.h:43
static int CurrentVersion()
Definition: texturefilter.h:67
static QString FilterIdentifier()
Definition: texturefilter.h:55
QString filterIdentifier() const override
Definition: texturefilter.h:72
static QList< int > SupportedVersions()
Definition: texturefilter.h:62
Definition: datefolderview.cpp:43