digiKam
Loading...
Searching...
No Matches
showfoto.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 : 2004-11-22
7 * Description : stand alone digiKam image editor GUI
8 *
9 * SPDX-FileCopyrightText: 2004-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2006-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11 * SPDX-FileCopyrightText: 2009-2011 by Andi Clemens <andi dot clemens at gmail dot com>
12 * SPDX-FileCopyrightText: 2004-2005 by Renchi Raju <renchi dot raju at gmail dot com>
13 * SPDX-FileCopyrightText: 2005-2006 by Tom Albers <tomalbers at kde dot nl>
14 *
15 * SPDX-License-Identifier: GPL-2.0-or-later
16 *
17 * ============================================================ */
18
19#pragma once
20
21// Qt includes
22
23#include <QUrl>
24
25// Local includes
26
27#include "editorwindow.h"
28#include "showfotoiteminfo.h"
29
30namespace ShowFoto
31{
32
34{
35 Q_OBJECT
36
37public:
38
39 explicit Showfoto(const QList<QUrl>& urlList, QWidget* const parent = nullptr);
40 ~Showfoto() override;
41
42public:
43
44 DInfoInterface* infoIface(DPluginAction* const ac) override;
45
46 virtual void show();
47
48private:
49
50 bool queryClose() override;
51
52 Digikam::ThumbBarDock* thumbBar() const override;
53 Digikam::Sidebar* rightSideBar() const override;
54
55private Q_SLOTS:
56
57 void slotForward() override;
58 void slotBackward() override;
59 void slotLast() override;
60 void slotFirst() override;
61 void slotShowfotoItemInfoActivated(const ShowfotoItemInfo& info);
62 void slotClearThumbBar();
63 void slotRemoveItemInfos(const QList<ShowfotoItemInfo>& infos);
64
65 void slotChanged() override;
66 void slotUpdateItemInfo() override;
67
68 void slotOnlineVersionCheck() override;
69
70Q_SIGNALS:
71
73
74// -- Internal IO file methods implemented in showfoto_iofiles.cpp ----------------------------------------
75
76private:
77
78 bool save() override;
79 bool saveAs() override;
80 void moveFile() override;
81 void finishSaving(bool success) override;
82 QUrl saveDestinationUrl() override;
83 bool saveNewVersion() override;
84 bool saveCurrentVersion() override;
85 bool saveNewVersionAs() override;
86 bool saveNewVersionInFormat(const QString&) override;
87
88 void saveIsComplete() override;
89 void saveAsIsComplete() override;
90 void saveVersionIsComplete() override;
91
92private Q_SLOTS:
93
94 void slotRemoveImageFromAlbum(const QUrl& url);
95 void slotDeleteCurrentItem() override;
96
97 void slotPrepareToLoad() override;
98 void slotLoadingStarted(const QString& filename) override;
99 void slotLoadingFinished(const QString& filename,
100 bool success) override;
101 void slotSavingStarted(const QString& filename) override;
102
103 void slotRevert() override;
104
105Q_SIGNALS:
106
107 void signalLoadCurrentItem(const QList<QUrl>& urlList);
108
109// -- Internal open file methods implemented in showfoto_open.cpp ----------------------------------------
110
111private:
112
113 void openFolder(const QUrl& url);
114 void openUrls(const QList<QUrl>& urls);
115
116private Q_SLOTS:
117
118 void slotFileWithDefaultApplication() override;
119 void slotOpenWith(QAction* action = nullptr) override;
120 void slotOpenFile();
121 void slotOpenFolder();
122 void slotOpenFolderFromPath(const QString& path);
123 void slotOpenUrl(const ShowfotoItemInfo& info);
124 void slotAddedDropedItems(QDropEvent*) override;
125 void slotDroppedUrls(const QList<QUrl>& droppedUrls, bool dropped, const QUrl& current);
126 void slotOpenFilesfromPath(const QStringList& files, const QString& current);
127 void slotAppendFilesfromPath(const QStringList& files, const QString& current);
128
129Q_SIGNALS:
130
131 void signalOpenFolder(const QUrl&);
132 void signalOpenFile(const QList<QUrl>& urls);
133
134// -- Internal setup methods implemented in showfoto_config.cpp ----------------------------------------
135
136public Q_SLOTS:
137
138 void slotSetup() override;
139 void slotSetupICC() override;
140
141private Q_SLOTS:
142
143 void slotThemeChanged();
144
145private:
146
147 bool setup(bool iccSetupPage = false);
148 void applySettings();
149
153 void applySortSettings();
154
155 void readSettings() override;
156 void saveSettings() override;
157
158private Q_SLOTS:
159
160 void slotSetupMetadataFilters(int);
161 void slotSetupExifTool();
162
163// -- Internal setup methods implemented in showfoto_setup.cpp ----------------------------------------
164
165private:
166
167 void setupActions() override;
168 void setupConnections() override;
169 void setupUserArea() override;
170
171 void toggleActions(bool val) override;
172 void toggleNavigation(int index);
173 void addServicesMenu() override;
174
175private Q_SLOTS:
176
177 void slotContextMenu() override;
178
179// -- Import tools methods implemented in showfoto_import.cpp -------------------------------------
180
181private Q_SLOTS:
182
183 void slotImportedImagefromScanner(const QUrl& url);
184
185// -- Internal private container --------------------------------------------------------------------
186
187private:
188
189 class Private;
190 Private* const d = nullptr;
191};
192
193} // namespace ShowFoto
Definition dinfointerface.h:48
Definition dpluginaction.h:30
Definition editorwindow.h:68
Definition sidebar.h:324
Definition thumbbardock.h:74
Definition showfotoiteminfo.h:38
Definition showfoto_p.h:118
Definition showfoto.h:34
void signalOpenFolder(const QUrl &)
void signalInfoList(const ShowfotoItemInfoList &)
void slotSetup() override
Definition showfoto_config.cpp:20
virtual void show()
Definition showfoto.cpp:207
void signalOpenFile(const QList< QUrl > &urls)
~Showfoto() override
Definition showfoto.cpp:171
DInfoInterface * infoIface(DPluginAction *const ac) override
Definition showfoto.cpp:307
void signalLoadCurrentItem(const QList< QUrl > &urlList)
void slotSetupICC() override
Definition showfoto_config.cpp:25
Definition showfotofolderviewbar.cpp:43
QList< ShowfotoItemInfo > ShowfotoItemInfoList
Definition showfotoiteminfo.h:81