digiKam
Loading...
Searching...
No Matches
showfotofolderviewbookmarklist.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 : 2021-08-27
7 * Description : Showfoto folder view bookmarks list
8 *
9 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// Qt includes
18
19#include <QString>
20#include <QPoint>
21#include <QTreeWidget>
22#include <QTreeWidgetItem>
23#include <QDragEnterEvent>
24#include <QDragMoveEvent>
25#include <QDropEvent>
26#include <QContextMenuEvent>
27
28namespace ShowFoto
29{
30
31class ShowfotoFolderViewBookmarks;
32class ShowfotoFolderViewBookmarkItem;
33
34class ShowfotoFolderViewBookmarkList : public QTreeWidget
35{
36 Q_OBJECT
37
38public:
39
42
43 ShowfotoFolderViewBookmarkItem* bookmarkExists(const QString& path) const;
44 QString bookmarkBaseName(const QString& path) const;
45
46Q_SIGNALS:
47
48 void signalAddBookmark(const QString& path);
49 void signalLoadContents(const QString& path);
50
51private Q_SLOTS:
52
53 void slotContextMenu(const QPoint& pos);
54 void slotOpenInFileManager();
55 void slotLoadContents();
56
57private:
58
59 void dragEnterEvent(QDragEnterEvent*);
60 void dragMoveEvent(QDragMoveEvent*);
61 void dropEvent(QDropEvent*);
62
63#if (QT_VERSION >= QT_VERSION_CHECK(6, 0, 0))
64
65 QMimeData* mimeData(const QList<QTreeWidgetItem*>& items) const override;
66
67#else
68
69 // cppcheck-suppress passedByValue
70 QMimeData* mimeData(const QList<QTreeWidgetItem*> items) const override; // clazy:exclude=function-args-by-ref
71
72#endif
73
74 void startDrag(Qt::DropActions supportedActions) override;
75
76private:
77
79
80private:
81
82 class Private;
83 Private* const d = nullptr;
84};
85
86} // namespace ShowFoto
Definition showfotofolderviewbookmarkitem.h:27
Definition showfotofolderviewbookmarklist.h:35
void signalLoadContents(const QString &path)
QString bookmarkBaseName(const QString &path) const
Definition showfotofolderviewbookmarklist.cpp:305
~ShowfotoFolderViewBookmarkList() override
Definition showfotofolderviewbookmarklist.cpp:82
ShowfotoFolderViewBookmarkItem * bookmarkExists(const QString &path) const
Definition showfotofolderviewbookmarklist.cpp:281
void signalAddBookmark(const QString &path)
Definition showfotofolderviewbookmarks.h:33
Definition showfotofolderviewbar.cpp:43