digiKam
Loading...
Searching...
No Matches
facepreviewloader.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-09-03
7 * Description : Integrated, multithread face detection / recognition
8 *
9 * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Local includes
18
19#include "facepipeline_p.h"
20
21namespace Digikam
22{
23
24class Q_DECL_HIDDEN FacePreviewLoader : public PreviewLoadThread
25{
26 Q_OBJECT
27
28public:
29
30 explicit FacePreviewLoader(FacePipeline::Private* const dd);
31 ~FacePreviewLoader() override = default;
32
33 void cancel();
34 bool sentOutLimitReached() const;
35 void checkRestart();
36
37public Q_SLOTS:
38
39 void process(const FacePipelineExtendedPackage::Ptr& package);
40 void slotImageLoaded(const LoadingDescription& loadingDescription, const DImg& img);
41
42Q_SIGNALS:
43
45
46protected:
47
49
51 int maximumSentOutPackages = qMin(QThread::idealThreadCount(), 4);
52
53 FacePipeline::Private* const d = nullptr;
54
55private:
56
57 // Disable
58 FacePreviewLoader(const FacePreviewLoader&) = delete;
59 FacePreviewLoader& operator=(const FacePreviewLoader&) = delete;
60};
61
62} // namespace Digikam
Definition dimg.h:52
QExplicitlySharedDataPointer< FacePipelineExtendedPackage > Ptr
Definition facepipelinepackage.h:163
Definition facepipeline_p.h:42
Definition facepreviewloader.h:25
~FacePreviewLoader() override=default
void processed(const FacePipelineExtendedPackage::Ptr &package)
PackageLoadingDescriptionList scheduledPackages
Definition facepreviewloader.h:48
Definition loadingdescription.h:35
Definition facepipelinepackage.h:169
Definition previewloadthread.h:26
Definition datefolderview.cpp:34