digiKam
dimgthreadedanalyser.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 : 2012-11-13
7  * Description : threaded image analys class.
8  * this class is dedicated to run algorithm in a separated thread
9  * over an image to process analys. No image data are changed.
10  *
11  * Copyright (C) 2012-2022 by Gilles Caulier <caulier dot gilles 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_DIMG_THREADED_ANALYSER_H
27 #define DIGIKAM_DIMG_THREADED_ANALYSER_H
28 
29 // Local includes
30 
31 #include "digikam_export.h"
32 #include "dimgthreadedfilter.h"
33 
34 namespace Digikam
35 {
36 
37 class DIGIKAM_EXPORT DImgThreadedAnalyser : public DImgThreadedFilter
38 {
39  Q_OBJECT
40 
41 public:
42 
50  explicit DImgThreadedAnalyser(QObject* const parent = nullptr, const QString& name = QString());
51 
58  explicit DImgThreadedAnalyser(DImg* const orgImage, QObject* const parent = nullptr,
59  const QString& name = QString());
60 
61  ~DImgThreadedAnalyser() override;
62 
63 private:
64 
65  FilterAction filterAction() override
66  {
67  // return null object
68  return FilterAction();
69  };
70 
71  void readParameters(const FilterAction&) override
72  {
73  // Do nothing.
74  };
75 
76  QString filterIdentifier() const override
77  {
78  // return null object
79  return QString();
80  };
81 
82  QList<int> supportedVersions() const override
83  {
84  // return null object
85  return QList<int>();
86  };
87 
88  void prepareDestImage() override
89  {
90  // No destination image is required here.
91  };
92 
93  void filterImage() override
94  {
95  startAnalyse();
96  };
97 
98 protected:
99 
103  virtual void startAnalyse() = 0;
104 };
105 
106 } // namespace Digikam
107 
108 #endif // DIGIKAM_DIMG_THREADED_ANALYSER_H
Definition: dimgthreadedanalyser.h:38
virtual void startAnalyse()=0
Definition: dimgthreadedfilter.h:41
Definition: dimg.h:62
Definition: filteraction.h:43
Definition: datefolderview.cpp:43