digiKam
Loading...
Searching...
No Matches
showfotofolderviewsidebar.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 : Side Bar Widget for the Showfoto folder view.
8 *
9 * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 *
11 * SPDX-License-Identifier: GPL-2.0-or-later
12 *
13 * ============================================================ */
14
15#pragma once
16
17// QT includes
18
19#include <QListView>
20#include <QPixmap>
21#include <QWidget>
22#include <QEvent>
23#include <QAction>
24#include <QStringList>
25#include <QModelIndex>
26
27// Local includes
28
29#include "statesavingobject.h"
31#include "dpluginaction.h"
32
33using namespace Digikam;
34
35namespace ShowFoto
36{
37
38class Showfoto;
39
40class ShowfotoFolderViewSideBar : public QWidget,
42{
43 Q_OBJECT
44
45public:
46
47 explicit ShowfotoFolderViewSideBar(Showfoto* const parent);
49
50 void doLoadState() override;
51 void doSaveState() override;
52 const QIcon getIcon();
53 const QString getCaption();
54
55 QString currentFolder() const;
56 QString currentPath() const;
57
58 void setCurrentPath(const QString& newPathNative);
59 void setCurrentPathWithoutUndo(const QString& newPath);
60
61 void setSortOrder(int order);
62 void setSortRole(int role);
63
64 void loadContents(const QModelIndex& index, bool append = false);
65
66 void registerPluginActions(const QList<DPluginAction*>& actions);
67 QList<QAction*> pluginActions() const;
68
69public Q_SLOTS:
70
71 void slotUndo();
72 void slotRedo();
73 void slotGoHome();
74 void slotGoUp();
75 void slotLoadContents();
76 void slotAppendContents();
77
78private Q_SLOTS:
79
80 void slotCustomPathChanged(const QString&);
81 void slotViewModeChanged(int);
82 void slotShowBookmarks(bool);
83 void slotPluginActionTriggered(QAction*);
84 void slotTypeMimesChanged(const QString& patterns);
85
86Q_SIGNALS:
87
90 void signalLoadContentsFromPath(const QString& path);
91 void signalLoadContentsFromFiles(const QStringList& files, const QString& current);
92 void signalAppendContentsFromFiles(const QStringList& files, const QString& current);
93
94private:
95
97
98private:
99
100 class Private;
101 Private* const d = nullptr;
102};
103
104} // namespace ShowFoto
Definition statesavingobject.h:66
Definition showfotofolderviewsidebar.h:42
void signalLoadContentsFromPath(const QString &path)
void registerPluginActions(const QList< DPluginAction * > &actions)
Definition showfotofolderviewsidebar.cpp:446
void signalLoadContentsFromFiles(const QStringList &files, const QString &current)
QString currentPath() const
Definition showfotofolderviewsidebar.cpp:270
void setSortOrder(int order)
Definition showfotofolderviewsidebar.cpp:429
void doSaveState() override
Definition showfotofolderviewsidebar.cpp:391
void slotAppendContents()
Definition showfotofolderviewsidebar.cpp:172
const QString getCaption()
Definition showfotofolderviewsidebar.cpp:364
void slotRedo()
Definition showfotofolderviewsidebar.cpp:226
QList< QAction * > pluginActions() const
Definition showfotofolderviewsidebar.cpp:470
void slotGoUp()
Definition showfotofolderviewsidebar.cpp:236
void slotGoHome()
Definition showfotofolderviewsidebar.cpp:231
void loadContents(const QModelIndex &index, bool append=false)
Definition showfotofolderviewsidebar.cpp:178
void doLoadState() override
Definition showfotofolderviewsidebar.cpp:369
void signalAppendContentsFromFiles(const QStringList &files, const QString &current)
void slotLoadContents()
Definition showfotofolderviewsidebar.cpp:166
void setCurrentPath(const QString &newPathNative)
Definition showfotofolderviewsidebar.cpp:282
~ShowfotoFolderViewSideBar() override
Definition showfotofolderviewsidebar.cpp:156
const QIcon getIcon()
Definition showfotofolderviewsidebar.cpp:359
QString currentFolder() const
Definition showfotofolderviewsidebar.cpp:258
void slotUndo()
Definition showfotofolderviewsidebar.cpp:221
void setCurrentPathWithoutUndo(const QString &newPath)
Definition showfotofolderviewsidebar.cpp:348
void setSortRole(int role)
Definition showfotofolderviewsidebar.cpp:435
Definition showfoto.h:34
Definition datefolderview.cpp:34
Definition showfotofolderviewbar.cpp:43