26 #ifndef DIGIKAM_IMAGE_EDITOR_WINDOW_H
27 #define DIGIKAM_IMAGE_EDITOR_WINDOW_H
39 #include <QProgressDialog>
45 #include "digikam_config.h"
56 class KToolBarPopupAction;
61 class DAdjustableLabel;
62 class DCategorizedView;
66 class EditorStackView;
67 class ExposureSettingsContainer;
69 class ICCSettingsContainer;
71 class SidebarSplitter;
72 class StatusProgressBar;
74 class VersionFileOperation;
95 explicit EditorWindow(
const QString& name, QWidget*
const parent =
nullptr);
98 void registerExtraPluginsActions(QString& dom)
override;
100 bool actionEnabledState()
const;
178 SaveVersionWithoutAsking = OverwriteWithoutAsking,
179 AlwaysNewVersion = AlwaysSaveAs
184 void saveStandardSettings();
185 void readStandardSettings();
186 void applyStandardSettings();
187 void applyIOSettings();
188 void applyColorManagementSettings();
190 void setupStandardConnections();
191 void setupStandardActions();
192 void setupStatusBar();
193 void setupContextMenu();
194 void setupSelectToolsAction();
195 void toggleStandardActions(
bool val);
196 void toggleZoomActions(
bool val);
197 void toggleNonDestructiveActions();
198 void toggleToolActions(
EditorTool* tool =
nullptr);
200 bool promptForOverWrite();
202 bool promptUserDelete(
const QUrl& url);
203 bool promptUserSave(
const QUrl& url, SaveAskMode mode = AskIfNeeded,
bool allowCancel =
true);
204 bool waitForSavingToComplete();
205 void startingSave(
const QUrl& url);
206 bool startingSaveAs(
const QUrl& url);
207 bool startingSaveCurrentVersion(
const QUrl& url);
208 bool startingSaveNewVersion(
const QUrl& url);
209 bool startingSaveNewVersionAs(
const QUrl& url);
210 bool startingSaveNewVersionInFormat(
const QUrl& url,
const QString& format);
211 bool checkPermissions(
const QUrl& url);
212 bool checkOverwrite(
const QUrl& url);
213 bool moveLocalFile(
const QString& src,
const QString& dest);
214 void movingSaveFileFinished(
bool successful);
216 void execSavingProgressDialog();
219 void resetOriginSwitchFile();
221 void addServicesMenuForUrl(
const QUrl& url);
222 void openWith(
const QUrl& url, QAction* action);
229 VersionFileOperation saveAsVersionFileOperation(
const QUrl& url,
const QUrl& saveLocation,
const QString& format);
232 virtual bool hasOriginalToRestore();
235 virtual void moveFile();
236 virtual void finishSaving(
bool success);
238 virtual void readSettings();
239 virtual void saveSettings();
240 virtual void toggleActions(
bool val);
269 void slotAboutToShowUndoMenu();
270 void slotAboutToShowRedoMenu();
272 void slotSelected(
bool);
274 void slotLoadingProgress(
const QString& filePath,
float progress);
275 void slotSavingProgress(
const QString& filePath,
float progress);
277 void slotNameLabelCancelButtonPressed();
279 void slotComponentsInfo()
override;
281 virtual void slotPrepareToLoad();
282 virtual void slotLoadingStarted(
const QString& filename);
283 virtual void slotLoadingFinished(
const QString& filename,
bool success);
284 virtual void slotSavingStarted(
const QString& filename);
285 virtual void slotFileOriginChanged(
const QString& filePath);
286 virtual void slotDiscardChanges();
287 virtual void slotOpenOriginal();
289 virtual bool saveOrSaveAs();
312 void slotSetUnderExposureIndicator(
bool);
313 void slotSetOverExposureIndicator(
bool);
314 void slotColorManagementOptionsChanged();
315 void slotToggleColorManagedView();
316 void slotSoftProofingOptions();
317 void slotUpdateSoftProofingState();
318 void slotSavingFinished(
const QString& filename,
bool success);
319 void slotZoomTo100Percents();
320 void slotZoomChanged(
bool isMax,
bool isMin,
double zoom);
321 void slotSelectionChanged(
const QRect& sel);
322 void slotSelectionSetText(
const QRect& sel);
323 void slotToggleFitToWindow();
324 void slotToggleOffFitToWindow();
325 void slotFitToSelect();
326 void slotIncreaseZoom();
327 void slotDecreaseZoom();
328 void slotCloseTool();
329 void slotApplyTool();
330 void slotUndoStateChanged();
331 void slotThemeChanged();
332 void slotToggleRightSideBar()
override;
333 void slotPreviousRightSideBarTab()
override;
334 void slotNextRightSideBarTab()
override;
337 void slotRotateLeftIntoQue();
338 void slotRotateRightIntoQue();
339 void slotFlipHIntoQue();
340 void slotFlipVIntoQue();
344 void enterWaitingLoop();
345 void quitWaitingLoop();
346 void showSideBars(
bool visible)
override;
347 void showThumbBar(
bool visible)
override;
348 void customizedFullScreenMode(
bool set)
override;
349 bool thumbbarVisibility()
const override;
350 void setColorManagedViewIndicatorToolTip(
bool available,
bool cmv);
351 void setUnderExposureToolTip(
bool uei);
352 void setOverExposureToolTip(
bool oei);
354 void setToolStartProgress(
const QString& toolName);
355 void setToolProgress(
int progress);
356 void setToolStopProgress();
358 void setToolInfoMessage(
const QString& txt);
360 bool startingSaveVersion(
const QUrl& url,
bool subversion,
bool saveAs,
const QString& format);
362 void setPreviewModeMask(
int mask);
365 bool showFileSaveDialog(
const QUrl& initialUrl, QUrl& newURL);
373 void setupTempSaveFile(
const QUrl& url);
383 QString selectValidSavingFormat(
const QUrl& targetUrl);
385 void addAction2ContextMenu(
const QString& actionName,
bool addDisabled =
false);
Definition: dexpanderbox.h:66
Definition: dimagehistory.h:49
Definition: dxmlguiwindow.h:98
Definition: editorstackview.h:42
Definition: editorwindow_p.h:164
Definition: editorwindow.h:78
static const QString CONFIG_GROUP_NAME
Definition: editorwindow.h:91
QSplitter * m_vSplitter
Definition: editorwindow.h:126
QAction * m_firstAction
Definition: editorwindow.h:143
QAction * m_openVersionAction
Definition: editorwindow.h:128
QString m_formatForRAWVersioning
Definition: editorwindow.h:165
virtual void addServicesMenu()=0
void signalNoCurrentItem()
void slotSetup() override=0
QAction * m_fileDeleteAction
Definition: editorwindow.h:138
QAction * m_revertAction
Definition: editorwindow.h:136
SidebarSplitter * m_splitter
Definition: editorwindow.h:125
QAction * m_saveNewVersionAsAction
Definition: editorwindow.h:133
virtual void setupConnections()=0
QAction * m_closeToolAction
Definition: editorwindow.h:146
virtual bool saveCurrentVersion()=0
StatusProgressBar * m_nameLabel
Definition: editorwindow.h:159
virtual bool saveNewVersion()=0
virtual bool saveNewVersionAs()=0
virtual Sidebar * rightSideBar() const =0
virtual void slotChanged()=0
QAction * m_discardChangesAction
Definition: editorwindow.h:137
EditorStackView * m_stackView
Definition: editorwindow.h:157
QMenu * m_servicesMenu
Definition: editorwindow.h:154
void signalSelectionChanged(const QRect &)
QPointer< QProgressDialog > m_savingProgressDialog
Definition: editorwindow.h:161
QAction * m_exportAction
Definition: editorwindow.h:135
QAction * m_lastAction
Definition: editorwindow.h:142
virtual void setupUserArea()=0
void signalPreviewModeChanged(int)
virtual void slotRevert()=0
QString m_formatForSubversions
Definition: editorwindow.h:166
QMenu * m_saveNewVersionInFormatAction
Definition: editorwindow.h:134
QColor m_bgColor
Definition: editorwindow.h:123
QAction * m_showBarAction
Definition: editorwindow.h:148
virtual void slotFileWithDefaultApplication()=0
virtual void setupActions()=0
IOFileSettings * m_IOFileSettings
Definition: editorwindow.h:160
QAction * m_forwardAction
Definition: editorwindow.h:139
bool m_setExifOrientationTag
Definition: editorwindow.h:117
virtual bool saveNewVersionInFormat(const QString &)=0
Canvas * m_canvas
Definition: editorwindow.h:158
virtual QUrl saveDestinationUrl()=0
virtual void slotDeleteCurrentItem()=0
QMenu * m_contextMenu
Definition: editorwindow.h:153
KToolBarPopupAction * m_saveNewVersionAction
Definition: editorwindow.h:131
virtual void slotOpenWith(QAction *action=nullptr)=0
KToolBarPopupAction * m_undoAction
Definition: editorwindow.h:150
QAction * m_saveAsAction
Definition: editorwindow.h:130
SaveAskMode
Definition: editorwindow.h:174
@ AlwaysSaveAs
Definition: editorwindow.h:177
@ AskIfNeeded
Definition: editorwindow.h:175
@ OverwriteWithoutAsking
Definition: editorwindow.h:176
QVector< TransformType > m_transformQue
NOTE: using QVector to store transforms.
Definition: editorwindow.h:169
virtual void saveVersionIsComplete()=0
virtual void slotLast()=0
virtual ThumbBarDock * thumbBar() const =0
QAction * m_saveCurrentVersionAction
Definition: editorwindow.h:132
QAction * m_saveAction
Definition: editorwindow.h:129
virtual void slotBackward()=0
virtual void slotForward()=0
KToolBarPopupAction * m_redoAction
Definition: editorwindow.h:151
virtual void slotUpdateItemInfo()=0
virtual void saveAsIsComplete()=0
bool m_actionEnabledState
Definition: editorwindow.h:119
bool m_nonDestructive
Definition: editorwindow.h:116
virtual void saveIsComplete()=0
SavingContext m_savingContext
Definition: editorwindow.h:163
virtual void slotAddedDropedItems(QDropEvent *e)=0
QAction * m_serviceAction
Definition: editorwindow.h:155
DAdjustableLabel * m_resLabel
Definition: editorwindow.h:121
virtual void slotContextMenu()=0
bool m_editingOriginalImage
Definition: editorwindow.h:118
virtual void slotFirst()=0
QAction * m_backwardAction
Definition: editorwindow.h:140
virtual void slotSetupICC()=0
TransformType
Definition: editorwindow.h:84
@ RotateLeft
Definition: editorwindow.h:85
@ FlipHorizontal
Definition: editorwindow.h:87
@ RotateRight
Definition: editorwindow.h:86
QAction * m_applyToolAction
Definition: editorwindow.h:145
Definition: exposurecontainer.h:39
Definition: iofilesettings.h:36
Definition: savingcontext.h:43
Definition: statusprogressbar.h:43
Definition: thumbbardock.h:84
Definition: versionfileoperation.h:72
Definition: versionmanager.h:46
Definition: datefolderview.cpp:43