File indexing completed on 2025-01-19 03:57:56
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2010-09-03 0007 * Description : Integrated, multithread face detection / recognition 0008 * 0009 * SPDX-FileCopyrightText: 2010-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_FACE_PREVIEW_LOADER_H 0016 #define DIGIKAM_FACE_PREVIEW_LOADER_H 0017 0018 // Local includes 0019 0020 #include "facepipeline_p.h" 0021 0022 namespace Digikam 0023 { 0024 0025 class Q_DECL_HIDDEN FacePreviewLoader : public PreviewLoadThread 0026 { 0027 Q_OBJECT 0028 0029 public: 0030 0031 explicit FacePreviewLoader(FacePipeline::Private* const dd); 0032 ~FacePreviewLoader() override; 0033 0034 void cancel(); 0035 bool sentOutLimitReached() const; 0036 void checkRestart(); 0037 0038 public Q_SLOTS: 0039 0040 void process(const FacePipelineExtendedPackage::Ptr& package); 0041 void slotImageLoaded(const LoadingDescription& loadingDescription, const DImg& img); 0042 0043 Q_SIGNALS: 0044 0045 void processed(const FacePipelineExtendedPackage::Ptr& package); 0046 0047 protected: 0048 0049 PackageLoadingDescriptionList scheduledPackages; 0050 int maximumSentOutPackages; 0051 FacePipeline::Private* const d; 0052 0053 private: 0054 0055 // Disable 0056 FacePreviewLoader(const FacePreviewLoader&) = delete; 0057 FacePreviewLoader& operator=(const FacePreviewLoader&) = delete; 0058 }; 0059 0060 } // namespace Digikam 0061 0062 #endif // DIGIKAM_FACE_PREVIEW_LOADER_H