File indexing completed on 2025-01-19 03:59:30
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-05-16 0007 * Description : finger-prints generator 0008 * 0009 * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * 0011 * SPDX-License-Identifier: GPL-2.0-or-later 0012 * 0013 * ============================================================ */ 0014 0015 #ifndef DIGIKAM_FINGERPRINTS_GENERATOR_H 0016 #define DIGIKAM_FINGERPRINTS_GENERATOR_H 0017 0018 // Qt includes 0019 0020 #include <QObject> 0021 0022 // Local includes 0023 0024 #include "album.h" 0025 #include "maintenancetool.h" 0026 0027 class QImage; 0028 0029 namespace Digikam 0030 { 0031 0032 class FingerPrintsGenerator : public MaintenanceTool 0033 { 0034 Q_OBJECT 0035 0036 public: 0037 0038 /** Constructor using AlbumList as argument. If list is empty, whole Albums collection is processed. 0039 */ 0040 explicit FingerPrintsGenerator(const bool rebuildAll, const AlbumList& list = AlbumList(), ProgressItem* const parent = nullptr); 0041 ~FingerPrintsGenerator() override; 0042 0043 void setUseMultiCoreCPU(bool b) override; 0044 0045 private: 0046 0047 void processOne(); 0048 0049 private Q_SLOTS: 0050 0051 void slotStart() override; 0052 void slotDone() override; 0053 void slotCancel() override; 0054 void slotAdvance(const QImage&); 0055 0056 private: 0057 0058 class Private; 0059 Private* const d; 0060 }; 0061 0062 } // namespace Digikam 0063 0064 #endif // DIGIKAM_FINGERPRINTS_GENERATOR_H