1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2004-12-06
7  * Description : Black and White conversion tool.
8  *
9  * Copyright (C) 2004-2005 by Renchi Raju <renchi dot raju at gmail dot com>
10  * Copyright (C) 2006-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_BW_SEPIA_TOOL_H
26 #define DIGIKAM_EDITOR_BW_SEPIA_TOOL_H
27 
28 // Local includes
29 
30 #include "editortool.h"
31 
32 using namespace Digikam;
33 
34 namespace DigikamEditorBWSepiaToolPlugin
35 {
36 
37 class BWSepiaTool : public EditorToolThreaded
38 {
39     Q_OBJECT
40 
41 public:
42 
43     explicit BWSepiaTool(QObject* const parent);
44     ~BWSepiaTool()              override;
45 
46 private Q_SLOTS:
47 
48     void slotInit()             override;
49     void slotSaveAsSettings()   override;
50     void slotLoadSettings()     override;
51     void slotResetSettings()    override;
52 
53 private:
54 
55     void readSettings()         override;
56     void writeSettings()        override;
57     void preparePreview()       override;
58     void prepareFinal()         override;
59     void setPreviewImage()      override;
60     void setFinalImage()        override;
61     void slotScaleChanged()     override;
62 
63 private:
64 
65     class Private;
66     Private* const d;
67 };
68 
69 } // namespace DigikamEditorBWSepiaToolPlugin
70 
71 #endif // DIGIKAM_EDITOR_BW_SEPIA_TOOL_H
72