File indexing completed on 2025-01-05 03:57:58
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2021-09-27 0007 * Description : Showfoto stack view favorites 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_STACK_VIEW_FAVORITES_H 0016 #define SHOWFOTO_STACK_VIEW_FAVORITES_H 0017 0018 // Qt includes 0019 0020 #include <QList> 0021 #include <QUrl> 0022 #include <QAction> 0023 #include <QWidget> 0024 #include <QString> 0025 #include <QStringList> 0026 #include <QTreeWidgetItem> 0027 0028 // Local includes 0029 0030 #include "searchtextbar.h" 0031 0032 using namespace Digikam; 0033 0034 namespace ShowFoto 0035 { 0036 0037 class ShowfotoStackViewSideBar; 0038 0039 class ShowfotoStackViewFavorites : public QWidget 0040 { 0041 Q_OBJECT 0042 0043 public: 0044 0045 explicit ShowfotoStackViewFavorites(ShowfotoStackViewSideBar* const sidebar); 0046 ~ShowfotoStackViewFavorites() override; 0047 0048 bool saveSettings(); 0049 bool readSettings(); 0050 0051 QTreeWidgetItem* topFavoritesItem() const; 0052 0053 QAction* toolBarAction(const QString& name) const; 0054 QList<QAction*> pluginActions() const; 0055 0056 void loadContents(); 0057 0058 public Q_SLOTS: 0059 0060 void slotItemListChanged(int nbitems); 0061 0062 Q_SIGNALS: 0063 0064 void signalLoadContents(); 0065 void signalLoadContentsFromFiles(const QStringList& files, const QString& current); 0066 0067 private Q_SLOTS: 0068 0069 void slotFavoriteDoubleClicked(QTreeWidgetItem*); 0070 void slotItemSelectionChanged(); 0071 void slotAddFavorite(const QList<QUrl>& newUrls, const QUrl& current); 0072 void slotAddFavorite(); 0073 void slotAddSubFolder(); 0074 void slotDelItem(); 0075 void slotEditItem(); 0076 void slotSearchTextChanged(const SearchTextSettings& settings); 0077 void slotSearchResult(int found); 0078 0079 private: 0080 0081 ShowfotoStackViewFavorites(QWidget*); 0082 0083 private: 0084 0085 class Private; 0086 Private* const d; 0087 }; 0088 0089 } // namespace ShowFoto 0090 0091 #endif // SHOWFOTO_STACK_VIEW_FAVORITES_H