digiKam
findduplicatesalbum.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 : 2008-05-19
7  * Description : Find Duplicates tree-view search album.
8  *
9  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2008-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11  * Copyright (C) 2009 by Andi Clemens <andi dot clemens at gmail dot com>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_FIND_DUPLICATES_ALBUM_H
27 #define DIGIKAM_FIND_DUPLICATES_ALBUM_H
28 
29 // Qt includes
30 
31 #include <QList>
32 #include <QWidget>
33 #include <QPixmap>
34 #include <QTreeWidget>
35 
36 // Local includes
37 
38 #include "album.h"
39 #include "thumbnailloadthread.h"
40 
41 namespace Digikam
42 {
43 
44 class FindDuplicatesAlbum : public QTreeWidget
45 {
46  Q_OBJECT
47 
48 public:
49 
50  explicit FindDuplicatesAlbum(QWidget* const parent = nullptr);
51  ~FindDuplicatesAlbum() override;
52 
53  void updateDuplicatesAlbumItems(const QList<SAlbum*>& sAlbumsToRebuild,
54  const QList<qlonglong>& deletedImages);
55 
56  void selectFirstItem();
57  QTreeWidgetItem* firstItem();
58  void removeDuplicates();
59 
60 private:
61 
62  void drawRow(QPainter* p,
63  const QStyleOptionViewItem& opt,
64  const QModelIndex& index) const override;
65 
66 private Q_SLOTS:
67 
68  void slotThumbnailLoaded(const LoadingDescription&, const QPixmap&);
69 
70 private:
71 
72  class Private;
73  Private* const d;
74 };
75 
76 } // namespace Digikam
77 
78 #endif // DIGIKAM_FIND_DUPLICATES_ALBUM_H
Definition: findduplicatesalbum.h:45
void selectFirstItem()
Definition: findduplicatesalbum.cpp:117
QTreeWidgetItem * firstItem()
Definition: findduplicatesalbum.cpp:98
~FindDuplicatesAlbum() override
Definition: findduplicatesalbum.cpp:93
FindDuplicatesAlbum(QWidget *const parent=nullptr)
Definition: findduplicatesalbum.cpp:63
void removeDuplicates()
Definition: findduplicatesalbum.cpp:184
void updateDuplicatesAlbumItems(const QList< SAlbum * > &sAlbumsToRebuild, const QList< qlonglong > &deletedImages)
Definition: findduplicatesalbum.cpp:156
Definition: loadingdescription.h:45
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43