1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2009-09-19
7  * Description : a tool for color space conversion
8  *
9  * Copyright (C) 2009-2012 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
10  * Copyright (C) 2009-2021 by Gilles Caulier <caulier dot gilles at gmail dot com>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_EDITOR_PROFILE_CONVERSION_TOOL_H
26 #define DIGIKAM_EDITOR_PROFILE_CONVERSION_TOOL_H
27 
28 // Local includes
29 
30 #include "editortool.h"
31 #include "iccprofile.h"
32 
33 using namespace Digikam;
34 
35 namespace DigikamEditorProfileConversionToolPlugin
36 {
37 
38 class ProfileConversionTool : public EditorToolThreaded
39 {
40     Q_OBJECT
41 
42 public:
43 
44     explicit ProfileConversionTool(QObject* const parent);
45     ~ProfileConversionTool()    override;
46 
47     static QStringList favoriteProfiles();
48     static void fastConversion(const IccProfile& profile);
49 
50 private Q_SLOTS:
51 
52     void slotResetSettings()    override;
53     void slotCurrentProfInfo();
54     void slotProfileChanged();
55 
56 private:
57 
58     void readSettings()         override;
59     void writeSettings()        override;
60     void preparePreview()       override;
61     void prepareFinal()         override;
62     void setPreviewImage()      override;
63     void setFinalImage()        override;
64 
65     void updateTransform();
66 
67 private:
68 
69     class Private;
70     Private* const d;
71 };
72 
73 } // namespace DigikamEditorProfileConversionToolPlugin
74 
75 #endif // DIGIKAM_EDITOR_PROFILE_CONVERSION_TOOL_H
76