File indexing completed on 2025-01-19 03:57:59
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2008-05-19 0007 * Description : Find Duplicates View. 0008 * 0009 * SPDX-FileCopyrightText: 2016-2017 by Mario Frank <mario dot frank at uni minus potsdam dot de> 0010 * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0011 * SPDX-FileCopyrightText: 2008-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0012 * SPDX-FileCopyrightText: 2009 by Andi Clemens <andi dot clemens at gmail dot com> 0013 * 0014 * SPDX-License-Identifier: GPL-2.0-or-later 0015 * 0016 * ============================================================ */ 0017 0018 #ifndef DIGIKAM_FIND_DUPLICATES_VIEW_H 0019 #define DIGIKAM_FIND_DUPLICATES_VIEW_H 0020 0021 // Qt includes 0022 0023 #include <QWidget> 0024 #include <QList> 0025 0026 // Local includes 0027 0028 #include "album.h" 0029 0030 class QTreeWidgetItem; 0031 0032 namespace Digikam 0033 { 0034 0035 class FindDuplicatesView : public QWidget 0036 { 0037 Q_OBJECT 0038 0039 public: 0040 0041 explicit FindDuplicatesView(QWidget* const parent = nullptr); 0042 ~FindDuplicatesView() override; 0043 0044 QList<SAlbum*> currentFindDuplicatesAlbums() const; 0045 void setActive(bool val); 0046 void populateTreeView(); 0047 0048 public Q_SLOTS: 0049 0050 void slotSetSelectedAlbums(const QList<PAlbum*>& albums); 0051 void slotSetSelectedAlbums(const QList<TAlbum*>& albums); 0052 void slotRemoveDuplicates(); 0053 0054 private Q_SLOTS: 0055 0056 void initAlbumUpdateConnections(); 0057 void slotAlbumAdded(Album* a); 0058 void slotAlbumDeleted(Album* a); 0059 void slotSearchUpdated(SAlbum* a); 0060 void slotSelectItemsTimer(); 0061 /*! 0062 * \brief slotClear 0063 * Remove extradata from every album stored in the listview 0064 * This extra data is used to indicate that the album was already 0065 * processed 0066 */ 0067 void slotClear(); 0068 void slotFindDuplicates(); 0069 void slotUpdateDuplicates(const QList<SAlbum*>& sAlbumsToRebuild, 0070 const QList<qlonglong>& deletedImages); 0071 void slotDuplicatesAlbumActived(); 0072 void slotComplete(); 0073 void slotUpdateFingerPrints(); 0074 void slotCheckForValidSettings(); 0075 void slotApplicationSettingsChanged(); 0076 void slotReferenceSelectionMethodChanged(int index); 0077 0078 private: 0079 0080 void enableControlWidgets(bool); 0081 0082 void updateSimilarityRangeInterval(); 0083 0084 void resetAlbumsAndTags(); 0085 0086 private: 0087 0088 class Private; 0089 Private* const d; 0090 }; 0091 0092 } // namespace Digikam 0093 0094 #endif // DIGIKAM_FIND_DUPLICATES_VIEW_H