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        : 2012-01-20
0007  * Description : Duplicates items finder.
0008  *
0009  * SPDX-FileCopyrightText: 2012-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2015      by Mohamed_Anwer <m_dot_anwer at gmx dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 #ifndef DIGIKAM_DUPLICATES_FINDER_H
0017 #define DIGIKAM_DUPLICATES_FINDER_H
0018 
0019 // Qt includes
0020 
0021 #include <QString>
0022 #include <QObject>
0023 
0024 // Local includes
0025 
0026 #include "digikam_gui_export.h"
0027 #include "album.h"
0028 #include "maintenancetool.h"
0029 #include "haariface.h"
0030 
0031 namespace Digikam
0032 {
0033 
0034 class DIGIKAM_GUI_EXPORT DuplicatesFinder : public MaintenanceTool
0035 {
0036     Q_OBJECT
0037 
0038 public:
0039 
0040     /** Version to find all duplicates over a specific list to PAlbums and TAlbums
0041      */
0042     DuplicatesFinder(const AlbumList& albums,
0043                      const AlbumList& tags,
0044                      int albumTagRelation = 0,
0045                      int minSimilarity = 90,
0046                      int maxSimilarity = 100,
0047                      int searchResultRestriction = 0,
0048                      HaarIface::RefImageSelMethod method = HaarIface::RefImageSelMethod::OlderOrLarger,
0049                      const AlbumList& referenceImageAlbum = {},
0050                      ProgressItem* const parent = nullptr);
0051 
0052     ~DuplicatesFinder() override;
0053 
0054 private Q_SLOTS:
0055 
0056     void slotStart() override;
0057     void slotDone() override;
0058     void slotCancel() override;
0059     void slotDuplicatesProgress(int percentage);
0060 
0061 private:
0062 
0063     class Private;
0064     Private* const d;
0065 };
0066 
0067 } // namespace Digikam
0068 
0069 #endif // DIGIKAM_DUPLICATES_FINDER_H