1 /** ===========================================================
2  * @file
3  *
4  * This file is a part of digiKam project
5  * <a href="https://www.digikam.org">https://www.digikam.org</a>
6  *
7  * @date   2006-09-13
8  * @brief  LibRaw settings widgets
9  *
10  * @author Copyright (C) 2006-2015 by Gilles Caulier
11  *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
12  * @author Copyright (C) 2006-2011 by Marcel Wiesweg
13  *         <a href="mailto:marcel dot wiesweg at gmx dot de">marcel dot wiesweg at gmx dot de</a>
14  * @author Copyright (C) 2007-2008 by Guillaume Castagnino
15  *         <a href="mailto:casta at xwing dot info">casta at xwing dot info</a>
16  *
17  * This program is free software; you can redistribute it
18  * and/or modify it under the terms of the GNU General
19  * Public License as published by the Free Software Foundation;
20  * either version 2, or (at your option)
21  * any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  * GNU General Public License for more details.
27  *
28  * ============================================================ */
29 
30 #ifndef DCRAW_SETTINGS_WIDGET_H
31 #define DCRAW_SETTINGS_WIDGET_H
32 
33 // Qt includes
34 
35 #include <QtCore/QString>
36 
37 // KDE includes
38 
39 #include <kconfiggroup.h>
40 
41 // Local includes
42 
43 
44 #include "rawdecodingsettings.h"
45 #include "rexpanderbox.h"
46 #include "rwidgetutils.h"
47 
48 namespace KDcrawIface
49 {
50 
51 class  DcrawSettingsWidget : public RExpanderBox
52 {
53     Q_OBJECT
54 
55 public:
56 
57     enum AdvancedSettingsOptions
58     {
59         SIXTEENBITS      = 0x00000001,
60         COLORSPACE       = 0x00000002,
61         POSTPROCESSING   = 0x00000004,
62         BLACKWHITEPOINTS = 0x00000008
63     };
64 
65     enum SettingsTabs
66     {
67         DEMOSAICING = 0,
68         WHITEBALANCE,
69         CORRECTIONS,
70         COLORMANAGEMENT
71     };
72 
73 public:
74 
75     /**
76      * @param advSettings the default value is COLORSPACE
77      */
78     explicit DcrawSettingsWidget(QWidget* const parent, int advSettings = COLORSPACE);
79     ~DcrawSettingsWidget() override;
80 
81     RFileSelector* inputProfileUrlEdit()  const;
82     RFileSelector* outputProfileUrlEdit() const;
83 
84     void setup(int advSettings);
85 
86     void setEnabledBrightnessSettings(bool b);
87     bool brightnessSettingsIsEnabled() const;
88 
89     void updateMinimumWidth();
90 
91     void resetToDefault();
92 
93     void setSettings(const RawDecodingSettings& settings);
94     RawDecodingSettings settings() const;
95 
96     void readSettings(KConfigGroup& group) override;
97     void writeSettings(KConfigGroup& group) override;
98 
99 Q_SIGNALS:
100 
101     void signalSixteenBitsImageToggled(bool);
102     void signalSettingsChanged();
103 
104 private Q_SLOTS:
105 
106     void slotWhiteBalanceToggled(int);
107     void slotsixteenBitsImageToggled(bool);
108     void slotUnclipColorActivated(int);
109     void slotNoiseReductionChanged(int);
110     void slotCACorrectionToggled(bool);
111     void slotExposureCorrectionToggled(bool);
112     void slotAutoCAToggled(bool);
113     void slotInputColorSpaceChanged(int);
114     void slotOutputColorSpaceChanged(int);
115     void slotRAWQualityChanged(int);
116     void slotExpoCorrectionShiftChanged(double);
117 
118 private:
119 
120     class Private;
121     Private* const d;
122 };
123 
124 } // NameSpace KDcrawIface
125 
126 #endif /* DCRAW_SETTINGS_WIDGET_H */
127