| 1 |
/* ============================================================ |
| 2 |
* |
| 3 |
* This file is a part of digiKam project |
| 4 |
* https://www.digikam.org |
| 5 |
* |
| 6 |
* Date : 2005-05-06 |
| 7 |
* Description : Albums folder view. |
| 8 |
* |
| 9 |
* SPDX-FileCopyrightText: 2005-2006 by Joern Ahrens <joern dot ahrens at kdemail dot net> |
| 10 |
* SPDX-FileCopyrightText: 2006-2026 by Gilles Caulier <caulier dot gilles at gmail dot com> |
| 11 |
* SPDX-FileCopyrightText: 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com> |
| 12 |
* SPDX-FileCopyrightText: 2009-2011 by Johannes Wienke <languitar at semipol dot de> |
| 13 |
* |
| 14 |
* SPDX-License-Identifier: GPL-2.0-or-later |
| 15 |
* |
| 16 |
* ============================================================ */ |
| 17 |
|
| 18 |
#pragma once |
| 19 |
|
| 20 |
// Qt includes |
| 21 |
|
| 22 |
#include <QTreeView> |
| 23 |
|
| 24 |
// Local includes |
| 25 |
|
| 26 |
#include "albummodel.h" |
| 27 |
#include "albumtreeview.h" |
| 28 |
#include "albummodificationhelper.h" |
| 29 |
|
| 30 |
namespace Digikam |
| 31 |
{ |
| 32 |
|
| 33 |
/** |
| 34 |
* @brief Album tree view used in the left sidebar to select PAlbums and perform |
| 35 |
* operations on them via a context menu. |
| 36 |
*/ |
| 37 |
class AlbumSelectionTreeView: public AlbumTreeView |
| 38 |
{ |
| 39 |
Q_OBJECT |
| 40 |
|
| 41 |
public: |
| 42 |
|
| 43 |
AlbumSelectionTreeView(QWidget* const parent, |
| 44 |
AlbumModel* const model, |
| 45 |
AlbumModificationHelper* const albumModificationHelper); |
| 46 |
~AlbumSelectionTreeView() override; |
| 47 |
|
| 48 |
/** |
| 49 |
* @brief Sets whether this widget shall display tool tips or not. |
| 50 |
*/ |
| 51 |
void setEnableToolTips(bool enable); |
| 52 |
|
| 53 |
Q_SIGNALS: |
| 54 |
|
| 55 |
/** |
| 56 |
* @brief Emitted if a find duplicates search shall be invoked on the given album. |
| 57 |
* |
| 58 |
* @param albums the album to find duplicates in |
| 59 |
*/ |
| 60 |
void signalFindDuplicates(const QList<PAlbum*>& albums); |
| 61 |
|
| 62 |
private Q_SLOTS: |
| 63 |
|
| 64 |
void slotFindDuplicates(); |
| 65 |
void slotScanForFaces(); |
| 66 |
void slotRepairHiddenItems(); |
| 67 |
void slotRebuildThumbs(); |
| 68 |
|
| 69 |
private: |
| 70 |
|
| 71 |
/** |
| 72 |
* @brief Re-implemented to handle custom tool tips. |
| 73 |
* |
| 74 |
* @param event the event to process. |
| 75 |
*/ |
| 76 |
bool viewportEvent(QEvent* event) override; |
| 77 |
|
| 78 |
private: |
| 79 |
|
| 80 |
class Private; |
| 81 |
Private* const d = nullptr; |
| 82 |
}; |
| 83 |
|
| 84 |
} // namespace Digikam |