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