digiKam
showfotostackviewfavorites.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-09-27
7  * Description : Showfoto stack view favorites
8  *
9  * Copyright (C) 2021-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef SHOWFOTO_STACK_VIEW_FAVORITES_H
25 #define SHOWFOTO_STACK_VIEW_FAVORITES_H
26 
27 // Qt includes
28 
29 #include <QList>
30 #include <QUrl>
31 #include <QAction>
32 #include <QWidget>
33 #include <QString>
34 #include <QStringList>
35 #include <QTreeWidgetItem>
36 
37 // Local includes
38 
39 #include "searchtextbar.h"
40 
41 using namespace Digikam;
42 
43 namespace ShowFoto
44 {
45 
46 class ShowfotoStackViewSideBar;
47 
48 class ShowfotoStackViewFavorites : public QWidget
49 {
50  Q_OBJECT
51 
52 public:
53 
55  ~ShowfotoStackViewFavorites() override;
56 
57  bool saveSettings();
58  bool readSettings();
59 
60  QTreeWidgetItem* topFavoritesItem() const;
61 
62  QAction* toolBarAction(const QString& name) const;
63  QList<QAction*> pluginActions() const;
64 
65  void loadContents();
66 
67 public Q_SLOTS:
68 
69  void slotItemListChanged(int nbitems);
70 
71 Q_SIGNALS:
72 
74  void signalLoadContentsFromFiles(const QStringList& files, const QString& current);
75 
76 private Q_SLOTS:
77 
78  void slotFavoriteDoubleClicked(QTreeWidgetItem*);
79  void slotItemSelectionChanged();
80  void slotAddFavorite(const QList<QUrl>& newUrls, const QUrl& current);
81  void slotAddFavorite();
82  void slotAddSubFolder();
83  void slotDelItem();
84  void slotEditItem();
85  void slotSearchTextChanged(const SearchTextSettings& settings);
86  void slotSearchResult(int found);
87 
88 private:
89 
90  class Private;
91  Private* const d;
92 };
93 
94 } // namespace ShowFoto
95 
96 #endif // SHOWFOTO_STACK_VIEW_FAVORITES_H
Definition: searchtextbar.h:43
Definition: showfotostackviewfavorites.h:49
void signalLoadContentsFromFiles(const QStringList &files, const QString &current)
Definition: showfotostackviewsidebar.h:55
Definition: datefolderview.cpp:43
Definition: showfotofolderviewbar.cpp:52