digiKam
icctransformfilter.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-09-19
7  * Description : ICC Transform threaded image filter.
8  *
9  * Copyright (C) 2009-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
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_ICC_TRANSFORM_FILTER_H
25 #define DIGIKAM_ICC_TRANSFORM_FILTER_H
26 
27 // Local includes
28 
29 #include "dimgloaderobserver.h"
30 #include "dimgthreadedfilter.h"
31 #include "icctransform.h"
32 
33 namespace Digikam
34 {
35 
36 class DIGIKAM_EXPORT IccTransformFilter : public DImgThreadedFilter,
37  public DImgLoaderObserver
38 {
39  Q_OBJECT
40 
41 public:
42 
43  explicit IccTransformFilter(QObject* const parent = nullptr);
44  explicit IccTransformFilter(DImg* const orgImage,
45  QObject* const parent,
46  const IccTransform& transform);
47  ~IccTransformFilter() override;
48 
49  static QString FilterIdentifier()
50  {
51  return QLatin1String("digikam:IccTransformFilter");
52  }
53 
54  static QString DisplayableName();
55 
57  {
58  return QList<int>() << 1;
59  }
60 
61  static int CurrentVersion()
62  {
63  return 1;
64  }
65 
66  QString filterIdentifier() const override
67  {
68  return FilterIdentifier();
69  }
70 
71  FilterAction filterAction() override;
72 
73  void readParameters(const FilterAction& action) override;
74  bool parametersSuccessfullyRead() const override;
75  QString readParametersError(const FilterAction& actionThatFailed) const override;
76 
77 protected:
78 
79  void progressInfo(float progress) override;
80  void filterImage() override;
81 
82 private:
83 
84  IccTransform m_transform;
85 };
86 
87 } // namespace Digikam
88 
89 #endif // DIGIKAM_ICC_TRANSFORM_FILTER_H
Definition: dimgloaderobserver.h:41
Definition: dimgthreadedfilter.h:41
Definition: dimg.h:62
Definition: filteraction.h:43
Definition: icctransformfilter.h:38
static int CurrentVersion()
Definition: icctransformfilter.h:61
static QString FilterIdentifier()
Definition: icctransformfilter.h:49
static QList< int > SupportedVersions()
Definition: icctransformfilter.h:56
QString filterIdentifier() const override
Definition: icctransformfilter.h:66
Definition: icctransform.h:49
Definition: datefolderview.cpp:43