digiKam
showfotostackviewsidebar.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 : Side Bar Widget for the Showfoto stack view.
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_SIDEBAR_H
25 #define SHOWFOTO_STACK_VIEW_SIDEBAR_H
26 
27 // QT includes
28 
29 #include <QList>
30 #include <QUrl>
31 #include <QListView>
32 #include <QPixmap>
33 #include <QWidget>
34 #include <QEvent>
35 #include <QAction>
36 #include <QStringList>
37 #include <QModelIndex>
38 
39 // Local includes
40 
41 #include "statesavingobject.h"
43 #include "dpluginaction.h"
44 
45 using namespace Digikam;
46 
47 namespace ShowFoto
48 {
49 
50 class ShowfotoThumbnailBar;
51 class Showfoto;
52 
53 class ShowfotoStackViewSideBar : public QWidget,
54  public StateSavingObject
55 {
56  Q_OBJECT
57 
58 public:
59 
60  explicit ShowfotoStackViewSideBar(Showfoto* const parent);
61  ~ShowfotoStackViewSideBar() override;
62 
63  void setThumbbar(ShowfotoThumbnailBar* const thumbbar);
64 
65  void doLoadState() override;
66  void doSaveState() override;
67  const QIcon getIcon();
68  const QString getCaption();
69 
70  void setSortOrder(int order);
71  int sortOrder() const;
72 
73  void setSortRole(int role);
74  int sortRole() const;
75 
76  void registerPluginActions(const QList<DPluginAction*>& actions);
77  QList<QAction*> pluginActions() const;
78 
79  QList<QUrl> urls() const;
80  QUrl currentUrl() const;
81 
82  int iconSize() const;
83 
84 private Q_SLOTS:
85 
86  void slotPluginActionTriggered();
87 
88 Q_SIGNALS:
89 
91  void signalLoadContentsFromFiles(const QStringList& files, const QString& current);
95 
96 private:
97 
98  class Private;
99  Private* const d;
100 };
101 
102 } // namespace ShowFoto
103 
104 #endif // SHOWFOTO_STACK_VIEW_SIDEBAR_H
Definition: statesavingobject.h:76
Definition: showfotoiteminfo.h:48
Definition: showfotostackviewsidebar.h:55
void signalLoadContentsFromFiles(const QStringList &files, const QString &current)
void signalShowfotoItemInfoActivated(const ShowfotoItemInfo &info)
void signalRemoveItemInfos(const QList< ShowfotoItemInfo > &infos)
Definition: showfotothumbnailbar.h:38
Definition: showfoto.h:44
Definition: datefolderview.cpp:43
Definition: showfotofolderviewbar.cpp:52