digiKam
showfotofolderviewbar.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 : a tool bar for Showfoto folder 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_FOLDER_VIEW_BAR_H
25 #define SHOWFOTO_FOLDER_VIEW_BAR_H
26 
27 // Qt includes
28 
29 #include <QWidget>
30 #include <QList>
31 #include <QAction>
32 
33 // Local includes
34 
35 #include "slideshowsettings.h"
36 #include "dlayoutbox.h"
37 #include "dpluginaction.h"
38 
39 using namespace Digikam;
40 
41 namespace ShowFoto
42 {
43 
44 class ShowfotoFolderViewList;
45 class ShowfotoFolderViewSideBar;
46 
48 {
49  Q_OBJECT
50 
51 public:
52 
54  {
55  TYPE_MIME_JPEG = 0,
63  TYPE_MIME_ALL
64  };
65 
66 public:
67 
68  explicit ShowfotoFolderViewBar(ShowfotoFolderViewSideBar* const parent);
69  ~ShowfotoFolderViewBar() override;
70 
71  void setIconSize(int size);
72  int iconSize() const;
73 
74  void setFolderViewMode(int mode);
75  int folderViewMode() const;
76 
77  void setFolderViewTypeMime(int mime);
78  int folderViewTypeMime() const;
79 
80  void setBookmarksVisible(bool b);
81  bool bookmarksVisible() const;
82 
83  void setCurrentPath(const QString& path);
84  QString currentPath() const;
85 
86  QAction* toolBarAction(const QString& name) const;
87  QList<QAction*> pluginActions() const;
88 
89  void registerPluginActions(const QList<DPluginAction*>& actions);
90 
91 public Q_SLOTS:
92 
93  void slotPreviousEnabled(bool);
94  void slotNextEnabled(bool);
95 
96 Q_SIGNALS:
97 
98  void signalTypeMimesChanged(const QString&);
101  void signalSetup();
103  void signalGoHome();
104  void signalGoUp();
106  void signalGoNext();
107  void signalCustomPathChanged(const QString&);
111 
112 private Q_SLOTS:
113 
114  void slotCustomPathChanged();
115  void slotIconSizeChanged(int);
116  void slotOptionsChanged(QAction*);
117  void slotTypeMimesChanged(int index);
118 
119 private:
120 
121  class Private;
122  Private* const d;
123 };
124 
125 } // namespace ShowFoto
126 
127 #endif // SHOWFOTO_FOLDER_VIEW_BAR_H
Definition: dlayoutbox.h:75
Definition: showfotofolderviewbar.h:48
void signalCustomPathChanged(const QString &)
void signalTypeMimesChanged(const QString &)
FolderViewTypeMime
Definition: showfotofolderviewbar.h:54
@ TYPE_MIME_RAW
Definition: showfotofolderviewbar.h:61
@ TYPE_MIME_PNG
Definition: showfotofolderviewbar.h:57
@ TYPE_MIME_PGF
Definition: showfotofolderviewbar.h:58
@ TYPE_MIME_DNG
Definition: showfotofolderviewbar.h:60
@ TYPE_MIME_TIFF
Definition: showfotofolderviewbar.h:56
@ TYPE_MIME_NORAW
Definition: showfotofolderviewbar.h:62
@ TYPE_MIME_HEIF
Definition: showfotofolderviewbar.h:59
void signalPluginActionTriggered(QAction *)
Definition: showfotofolderviewsidebar.h:52
Definition: datefolderview.cpp:43
Definition: showfotofolderviewbar.cpp:52