File indexing completed on 2025-01-05 03:57:54

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2021-08-27
0007  * Description : Showfoto folder view bookmark places
0008  *
0009  * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef SHOWFOTO_FOLDER_VIEW_BOOKMARKS_H
0016 #define SHOWFOTO_FOLDER_VIEW_BOOKMARKS_H
0017 
0018 // Qt includes
0019 
0020 #include <QList>
0021 #include <QAction>
0022 #include <QWidget>
0023 #include <QString>
0024 #include <QTreeWidgetItem>
0025 
0026 class KConfigGroup;
0027 
0028 namespace ShowFoto
0029 {
0030 
0031 class ShowfotoFolderViewSideBar;
0032 
0033 class ShowfotoFolderViewBookmarks : public QWidget
0034 {
0035     Q_OBJECT
0036 
0037 public:
0038 
0039     explicit ShowfotoFolderViewBookmarks(ShowfotoFolderViewSideBar* const sidebar);
0040     ~ShowfotoFolderViewBookmarks()                     override;
0041 
0042     void saveSettings(KConfigGroup&);
0043     void readSettings(const KConfigGroup&);
0044 
0045     QTreeWidgetItem* topBookmarksItem()         const;
0046 
0047     QAction* toolBarAction(const QString& name) const;
0048     QList<QAction*> pluginActions()             const;
0049 
0050 Q_SIGNALS:
0051 
0052     void signalLoadContents();
0053 
0054 private Q_SLOTS:
0055 
0056     void slotLoadContents(const QString& path);
0057     void slotBookmarkDoubleClicked(QTreeWidgetItem*);
0058     void slotBookmarkSelectionChanged();
0059     void slotAddBookmark(const QString&);
0060     void slotAddBookmark();
0061     void slotDelBookmark();
0062     void slotEdtBookmark();
0063 
0064 private:
0065 
0066     ShowfotoFolderViewBookmarks(QWidget*);
0067 
0068 private:
0069 
0070     class Private;
0071     Private* const d;
0072 };
0073 
0074 } // namespace ShowFoto
0075 
0076 #endif // SHOWFOTO_FOLDER_VIEW_BOOKMARKS_H