digiKam
rawprocessingfilter.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-12-14
7  * Description : Filter to manage and help with raw loading
8  *
9  * Copyright (C) 2010-2011 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_RAW_PROCESSING_FILTERS_H
25 #define DIGIKAM_RAW_PROCESSING_FILTERS_H
26 
27 // Local includes
28 
29 #include "digikam_export.h"
30 #include "dimgthreadedfilter.h"
31 #include "drawdecoding.h"
32 #include "iccprofile.h"
33 
34 namespace Digikam
35 {
36 
37 class DImgLoaderObserver;
38 class FilterAction;
39 
47 class DIGIKAM_EXPORT RawProcessingFilter : public DImgThreadedFilter
48 {
49  Q_OBJECT
50 
51 public:
52 
57  explicit RawProcessingFilter(QObject* const parent = nullptr);
58 
62  RawProcessingFilter(DImg* const orgImage,
63  QObject* const parent,
64  const DRawDecoding& settings,
65  const QString& name = QString());
66 
70  RawProcessingFilter(const DRawDecoding& settings,
71  DImgThreadedFilter* const master,
72  const DImg& orgImage,
73  const DImg& destImage,
74  int progressBegin=0,
75  int progressEnd=100,
76  const QString& name=QString());
77 
78  ~RawProcessingFilter() override;
79 
84  void setSettings(const DRawDecoding& settings);
85  DRawDecoding settings() const;
86 
91  void setOutputProfile(const IccProfile& profile);
92 
98  void setObserver(DImgLoaderObserver* const observer, int progressBegin, int progressEnd);
99 
100  static QString FilterIdentifier()
101  {
102  return QLatin1String("digikam:RawConverter");
103  }
104 
105  static QString DisplayableName();
106 
108  {
109  return QList<int>() << 1;
110  }
111 
112  static int CurrentVersion()
113  {
114  return 1;
115  }
116 
117  void readParameters(const FilterAction& action) override;
118 
119  QString filterIdentifier() const override
120  {
121  return FilterIdentifier();
122  }
123 
124  FilterAction filterAction() override;
125 
126 protected:
127 
128  void postProgress(int); // not virtual
129  bool continueQuery() const; // not virtual
130 
131  void filterImage() override;
132 
133 protected:
134 
138 };
139 
140 } // namespace Digikam
141 
142 #endif // DIGIKAM_RAW_PROCESSING_FILTERS_H
Definition: dimgloaderobserver.h:41
Definition: dimgthreadedfilter.h:41
Definition: dimg.h:62
Definition: drawdecoding.h:48
Definition: filteraction.h:43
Definition: iccprofile.h:43
Definition: rawprocessingfilter.h:48
IccProfile m_customOutputProfile
Definition: rawprocessingfilter.h:136
DRawDecoding m_settings
Definition: rawprocessingfilter.h:135
QString filterIdentifier() const override
Definition: rawprocessingfilter.h:119
static QList< int > SupportedVersions()
Definition: rawprocessingfilter.h:107
DImgLoaderObserver * m_observer
Definition: rawprocessingfilter.h:137
static int CurrentVersion()
Definition: rawprocessingfilter.h:112
static QString FilterIdentifier()
Definition: rawprocessingfilter.h:100
Definition: datefolderview.cpp:43