25 #ifndef DIGIKAM_DIMG_THREADED_FILTER_H
26 #define DIGIKAM_DIMG_THREADED_FILTER_H
52 explicit DImgThreadedFilter(QObject*
const parent =
nullptr,
const QString& name = QString());
61 QObject*
const parent,
62 const QString& name = QString());
71 void setupFilter(
const DImg& orgImage);
76 void setupAndStartDirectly(
const DImg& orgImage,
78 int progressBegin = 0,
79 int progressEnd = 100);
81 void setOriginalImage(
const DImg& orgImage);
82 void setFilterName(
const QString& name);
103 QList<int> multithreadedSteps(
int stop,
int start = 0)
const;
108 virtual void startFilter();
113 virtual void cancelFilter();
118 virtual void startFilterDirectly();
142 void setFilterVersion(
int version);
143 int filterVersion()
const;
156 virtual bool parametersSuccessfullyRead()
const;
157 virtual QString readParametersError(
const FilterAction& actionThatFailed)
const;
183 virtual void initFilter();
204 void postProgress(
int progress);
226 const DImg& orgImage,
227 const DImg& destImage,
228 int progressBegin = 0,
229 int progressEnd = 100,
230 const QString& name = QString());
237 int progressBegin = 0,
238 int progressEnd = 100);
249 virtual int modulateProgress(
int progress);
252 virtual void prepareDestImage();
257 template <
class Filter>
266 setDisplayableName(Filter::DisplayableName());
273 setDisplayableName(Filter::DisplayableName());
283 if (condition && (version <= m_version))
Definition: dimgthreadedfilter.h:260
void supportOlderVersionIf(int version, bool condition)
Definition: dimgthreadedfilter.h:281
DefaultFilterAction(bool isReproducible)
Definition: dimgthreadedfilter.h:269
DefaultFilterAction(FilterAction::Category category=FilterAction::ReproducibleFilter)
Definition: dimgthreadedfilter.h:263
Definition: dimgthreadedfilter.h:41
virtual void filterImage()=0
virtual QString filterIdentifier() const =0
DImg getTargetImage()
Definition: dimgthreadedfilter.h:84
virtual void cleanupFilter()
Definition: dimgthreadedfilter.h:199
bool m_wasCancelled
Definition: dimgthreadedfilter.h:295
DImg m_orgImage
Definition: dimgthreadedfilter.h:312
virtual FilterAction filterAction()=0
int m_version
Definition: dimgthreadedfilter.h:293
void progress(int progress)
QString m_name
Definition: dimgthreadedfilter.h:307
DImgThreadedFilter * m_master
Definition: dimgthreadedfilter.h:327
int m_progressBegin
Definition: dimgthreadedfilter.h:300
int m_progressCurrent
To prevent signals bombarding with progress indicator value in postProgress().
Definition: dimgthreadedfilter.h:302
virtual void readParameters(const FilterAction &)=0
void finished(bool success)
const QString & filterName()
Definition: dimgthreadedfilter.h:89
int m_progressSpan
Definition: dimgthreadedfilter.h:301
DImg m_destImage
Definition: dimgthreadedfilter.h:317
DImgThreadedFilter * m_slave
Definition: dimgthreadedfilter.h:322
Definition: dynamicthread.h:43
Definition: filteraction.h:43
Category
Definition: filteraction.h:47
@ ReproducibleFilter
Definition: filteraction.h:56
Definition: datefolderview.cpp:43