digiKam
imagequalitysorter.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 : 2013-08-19
7  * Description : image quality sorter
8  *
9  * Copyright (C) 2013-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
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_IMAGE_QUALITY_SORTER_H
25 #define DIGIKAM_IMAGE_QUALITY_SORTER_H
26 
27 // Qt includes
28 
29 #include <QObject>
30 
31 // Local includes
32 
33 #include "album.h"
34 #include "maintenancetool.h"
35 #include "imagequalitycontainer.h"
36 
37 class QImage;
38 
39 namespace Digikam
40 {
41 
43 {
44  Q_OBJECT
45 
46 public:
47 
49  {
50  AllItems = 0, // Clean all Pick Labels assignments and re-scan all items.
51  NonAssignedItems // Scan only items with no Pick Labels assigned.
52  };
53 
54 public:
55 
58  explicit ImageQualitySorter(QualityScanMode mode,
59  const AlbumList& list=AlbumList(),
61  ProgressItem* const parent = nullptr);
62  ~ImageQualitySorter() override;
63 
64  void setUseMultiCoreCPU(bool b) override;
65 
66 private:
67 
68  void processOne();
69 
70 private Q_SLOTS:
71 
72  void slotStart() override;
73  void slotCancel() override;
74  void slotAdvance(const QImage&);
75 
76 private:
77 
78  class Private;
79  Private* const d;
80 };
81 
82 } // namespace Digikam
83 
84 #endif // DIGIKAM_IMAGE_QUALITY_SORTER_H
Definition: imagequalitycontainer.h:39
Definition: imagequalitysorter.h:43
QualityScanMode
Definition: imagequalitysorter.h:49
@ NonAssignedItems
Definition: imagequalitysorter.h:51
@ AllItems
Definition: imagequalitysorter.h:50
~ImageQualitySorter() override
Definition: imagequalitysorter.cpp:91
ImageQualitySorter(QualityScanMode mode, const AlbumList &list=AlbumList(), const ImageQualityContainer &quality=ImageQualityContainer(), ProgressItem *const parent=nullptr)
Definition: imagequalitysorter.cpp:69
void setUseMultiCoreCPU(bool b) override
Definition: imagequalitysorter.cpp:96
Definition: maintenancetool.h:41
Definition: progressmanager.h:45
ProgressItem * parent() const
Definition: progressmanager.cpp:299
Definition: datefolderview.cpp:43
QList< Album * > AlbumList
Definition: album.h:50