digiKam
findduplicatesalbumitem.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-06-17
7  * Description : Find Duplicates tree-view search album item.
8  *
9  * Copyright (C) 2008-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_FIND_DUPLICATES_ALBUM_ITEM_H
25 #define DIGIKAM_FIND_DUPLICATES_ALBUM_ITEM_H
26 
27 // Qt includes
28 
29 #include <QTreeWidget>
30 #include <QUrl>
31 #include <QList>
32 
33 // Local includes
34 
35 #include "album.h"
36 #include "iteminfo.h"
37 #include "thumbnailloadthread.h"
38 
39 namespace Digikam
40 {
41 
42 class FindDuplicatesAlbumItem : public QTreeWidgetItem
43 {
44 
45 public:
46 
47  enum Column
48  {
53  AVG_SIMILARITY = 4
54  };
55 
56 public:
57 
58  explicit FindDuplicatesAlbumItem(QTreeWidget* const parent, SAlbum* const album);
59  ~FindDuplicatesAlbumItem() override;
60 
61  bool hasValidThumbnail() const;
62 
66  void calculateInfos(const QList<qlonglong>& deletedImages = QList<qlonglong>());
67 
71  int itemCount() const;
72 
73  SAlbum* album() const;
74  QUrl refUrl() const;
75 
76  void setThumb(const QPixmap& pix,
77  bool hasThumb = true);
78 
79  bool operator<(const QTreeWidgetItem& other) const override;
81 
82 private:
83 
84  class Private;
85  Private* const d;
86 
87 private:
88 
89  Q_DISABLE_COPY(FindDuplicatesAlbumItem)
90 };
91 
92 } // namespace Digikam
93 
94 #endif // DIGIKAM_FIND_DUPLICATES_ALBUM_ITEM_H
Definition: findduplicatesalbumitem.h:43
void setThumb(const QPixmap &pix, bool hasThumb=true)
Definition: findduplicatesalbumitem.cpp:197
~FindDuplicatesAlbumItem() override
Definition: findduplicatesalbumitem.cpp:96
QList< ItemInfo > duplicatedItems()
Definition: findduplicatesalbumitem.cpp:106
bool operator<(const QTreeWidgetItem &other) const override
Definition: findduplicatesalbumitem.cpp:232
void calculateInfos(const QList< qlonglong > &deletedImages=QList< qlonglong >())
Definition: findduplicatesalbumitem.cpp:134
QUrl refUrl() const
Definition: findduplicatesalbumitem.cpp:227
FindDuplicatesAlbumItem(QTreeWidget *const parent, SAlbum *const album)
Definition: findduplicatesalbumitem.cpp:70
bool hasValidThumbnail() const
Definition: findduplicatesalbumitem.cpp:101
Column
Definition: findduplicatesalbumitem.h:48
@ REFERENCE_ALBUM
Definition: findduplicatesalbumitem.h:51
@ REFERENCE_IMAGE
Definition: findduplicatesalbumitem.h:49
@ REFERENCE_DATE
Definition: findduplicatesalbumitem.h:50
@ AVG_SIMILARITY
Definition: findduplicatesalbumitem.h:53
@ RESULT_COUNT
Definition: findduplicatesalbumitem.h:52
SAlbum * album() const
Definition: findduplicatesalbumitem.cpp:222
int itemCount() const
Definition: findduplicatesalbumitem.cpp:192
Definition: album.h:493
Definition: datefolderview.cpp:43