File indexing completed on 2025-01-05 03:59:40

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2008-08-20
0007  * Description : Image editor interface used by editor tools.
0008  *
0009  * SPDX-FileCopyrightText: 2008-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_IMAGE_EDITOR_TOOL_IFACE_H
0016 #define DIGIKAM_IMAGE_EDITOR_TOOL_IFACE_H
0017 
0018 // Qt includes
0019 
0020 #include <QObject>
0021 
0022 // Local includes
0023 
0024 #include "digikam_export.h"
0025 
0026 namespace Digikam
0027 {
0028 
0029 class EditorTool;
0030 class EditorWindow;
0031 class ExposureSettingsContainer;
0032 class ICCSettingsContainer;
0033 class DCategorizedView;
0034 
0035 class DIGIKAM_EXPORT EditorToolIface : public QObject
0036 {
0037     Q_OBJECT
0038 
0039 public:
0040 
0041     static EditorToolIface* editorToolIface();
0042 
0043     explicit EditorToolIface(EditorWindow* const editor);
0044     ~EditorToolIface() override;
0045 
0046     EditorTool* currentTool() const;
0047 
0048     void loadTool(EditorTool* const tool);
0049     void unLoadTool();
0050 
0051     void setPreviewModeMask(int mask);
0052     void setToolsIconView(DCategorizedView* const view);
0053 
0054     void setToolStartProgress(const QString& toolName);
0055     void setToolProgress(int progress);
0056     void setToolStopProgress();
0057 
0058     void setToolInfoMessage(const QString& txt);
0059 
0060     void setupICC();
0061 
0062     void themeChanged();
0063     void updateExposureSettings();
0064     void updateICCSettings();
0065 
0066 Q_SIGNALS:
0067 
0068     void signalPreviewModeChanged();
0069 
0070 public Q_SLOTS:
0071 
0072     void slotCloseTool();
0073     void slotToolAborted();
0074     void slotApplyTool();
0075     void slotToolApplied();
0076 
0077 private:
0078 
0079     // Disable
0080     EditorToolIface(QObject*) = delete;
0081 
0082 private:
0083 
0084     static EditorToolIface* m_iface;
0085 
0086     class Private;
0087     Private* const          d;
0088 };
0089 
0090 } // namespace Digikam
0091 
0092 #endif // DIGIKAM_IMAGE_EDITOR_TOOL_IFACE_H