1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date        : 2009-11-13
7  * Description : a tool to blend bracketed images.
8  *
9  * Copyright (C) 2009-2021 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2015      by Benjamin Girault <benjamin dot girault 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) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_ENFUSE_SETTINGS_H
25 #define DIGIKAM_ENFUSE_SETTINGS_H
26 
27 // Qt includes
28 
29 #include <QUrl>
30 #include <QWidget>
31 
32 // Locale includes
33 
34 #include "dsavesettingswidget.h"
35 
36 class KConfigGroup;
37 
38 using namespace Digikam;
39 
40 namespace DigikamGenericExpoBlendingPlugin
41 {
42 
43 class EnfuseSettings
44 {
45 public:
46 
EnfuseSettings()47     EnfuseSettings()
48         : autoLevels  (true),
49           hardMask    (false),
50           ciecam02    (false),
51           levels      (20),
52           exposure    (1.0),
53           saturation  (0.2),
54           contrast    (0.0),
55           outputFormat(DSaveSettingsWidget::OUTPUT_PNG)
56     {
57     }
58 
~EnfuseSettings()59     ~EnfuseSettings()
60     {
61     }
62 
63     QString asCommentString() const;
64 
65     QString inputImagesList() const;
66 
67 public:
68 
69     bool                              autoLevels;
70     bool                              hardMask;
71     bool                              ciecam02;
72 
73     int                               levels;
74 
75     double                            exposure;
76     double                            saturation;
77     double                            contrast;
78 
79     QString                           targetFileName;
80 
81     QList<QUrl>                       inputUrls;
82     QUrl                              previewUrl;
83 
84     DSaveSettingsWidget::OutputFormat outputFormat;
85 };
86 
87 // ------------------------------------------------------------------------
88 
89 
90 class EnfuseSettingsWidget : public QWidget
91 {
92     Q_OBJECT
93 
94 public:
95 
96     explicit EnfuseSettingsWidget(QWidget* const parent);
97     ~EnfuseSettingsWidget() override;
98 
99     void           setSettings(const EnfuseSettings& settings);
100     EnfuseSettings settings() const;
101 
102     void           resetToDefault();
103 
104     void readSettings(KConfigGroup& group);
105     void writeSettings(KConfigGroup& group);
106 
107 private:
108 
109     class Private;
110     Private* const d;
111 };
112 
113 } // namespace DigikamGenericExpoBlendingPlugin
114 
115 #endif // DIGIKAM_ENFUSE_SETTINGS_H
116