File indexing completed on 2025-01-19 03:53:22

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2005-05-06
0007  * Description : Albums folder view.
0008  *
0009  * SPDX-FileCopyrightText: 2005-2006 by Joern Ahrens <joern dot ahrens at kdemail dot net>
0010  * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0011  * SPDX-FileCopyrightText: 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com>
0012  * SPDX-FileCopyrightText: 2009-2011 by Johannes Wienke <languitar at semipol dot de>
0013  *
0014  * SPDX-License-Identifier: GPL-2.0-or-later
0015  *
0016  * ============================================================ */
0017 
0018 #ifndef DIGIKAM_ALBUM_SELECTION_TREE_VIEW_H
0019 #define DIGIKAM_ALBUM_SELECTION_TREE_VIEW_H
0020 
0021 // Qt includes
0022 
0023 #include <QTreeView>
0024 
0025 // Local includes
0026 
0027 #include "albummodel.h"
0028 #include "albumtreeview.h"
0029 #include "albummodificationhelper.h"
0030 
0031 namespace Digikam
0032 {
0033 
0034 /**
0035  * Album tree view used in the left sidebar to select PAlbums and perform
0036  * operations on them via a context menu.
0037  *
0038  * @author jwienke
0039  */
0040 class AlbumSelectionTreeView: public AlbumTreeView
0041 {
0042     Q_OBJECT
0043 
0044 public:
0045 
0046     AlbumSelectionTreeView(QWidget* const parent,
0047                            AlbumModel* const model,
0048                            AlbumModificationHelper* const albumModificationHelper);
0049     ~AlbumSelectionTreeView()         override;
0050 
0051     /**
0052      * Sets whether this widget shall display tool tips or not.
0053      */
0054     void setEnableToolTips(bool enable);
0055 
0056 Q_SIGNALS:
0057 
0058     /**
0059      * Emitted if a find duplicates search shall be invoked on the given album.
0060      *
0061      * @param album the album to find duplicates in
0062      */
0063     void signalFindDuplicates(const QList<PAlbum*>& albums);
0064 
0065 private Q_SLOTS:
0066 
0067     void slotFindDuplicates();
0068     void slotScanForFaces();
0069     void slotRepairHiddenItems();
0070     void slotRebuildThumbs();
0071 
0072 private:
0073 
0074     /**
0075      * Re-implemented to handle custom tool tips.
0076      *
0077      * @param event the event to process.
0078      */
0079     bool viewportEvent(QEvent* event) override;
0080 
0081 private:
0082 
0083     class Private;
0084     Private* const d;
0085 };
0086 
0087 } // namespace Digikam
0088 
0089 #endif // DIGIKAM_ALBUM_SELECTION_TREE_VIEW_H