• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdegraphics API Reference
  • KDE Home
  • Contact Us
 

libs/libkdcraw/libkdcraw

  • sources
  • kde-4.14
  • kdegraphics
  • libs
  • libkdcraw
  • libkdcraw
dcrawsettingswidget.cpp
Go to the documentation of this file.
1 
30 #include "dcrawsettingswidget.moc"
31 
32 // C++ includes
33 
34 #include <cmath>
35 
36 // Qt includes
37 
38 #include <QCheckBox>
39 #include <QLabel>
40 #include <QLayout>
41 #include <QWhatsThis>
42 #include <QToolTip>
43 
44 // KDE includes
45 
46 #include <kapplication.h>
47 #include <kdialog.h>
48 #include <klocale.h>
49 #include <kurllabel.h>
50 #include <ktoolinvocation.h>
51 #include <kdebug.h>
52 
53 // Local includes
54 
55 #include "kdcraw.h"
56 #include "rnuminput.h"
57 #include "rcombobox.h"
58 #include "rexpanderbox.h"
59 
60 namespace KDcrawIface
61 {
62 
63 class DcrawSettingsWidget::Private
64 {
65 public:
66 
67  Private()
68  {
69  autoBrightnessBox = 0;
70  sixteenBitsImage = 0;
71  fourColorCheckBox = 0;
72  brightnessLabel = 0;
73  brightnessSpinBox = 0;
74  blackPointCheckBox = 0;
75  blackPointSpinBox = 0;
76  whitePointCheckBox = 0;
77  whitePointSpinBox = 0;
78  whiteBalanceComboBox = 0;
79  whiteBalanceLabel = 0;
80  customWhiteBalanceSpinBox = 0;
81  customWhiteBalanceLabel = 0;
82  customWhiteBalanceGreenSpinBox = 0;
83  customWhiteBalanceGreenLabel = 0;
84  unclipColorLabel = 0;
85  dontStretchPixelsCheckBox = 0;
86  RAWQualityComboBox = 0;
87  RAWQualityLabel = 0;
88  noiseReductionComboBox = 0;
89  NRSpinBox1 = 0;
90  NRSpinBox2 = 0;
91  NRLabel1 = 0;
92  NRLabel2 = 0;
93  enableCACorrectionBox = 0;
94  autoCACorrectionBox = 0;
95  caRedMultSpinBox = 0;
96  caBlueMultSpinBox = 0;
97  caRedMultLabel = 0;
98  caBlueMultLabel = 0;
99  unclipColorComboBox = 0;
100  reconstructLabel = 0;
101  reconstructSpinBox = 0;
102  outputColorSpaceLabel = 0;
103  outputColorSpaceComboBox = 0;
104  demosaicingSettings = 0;
105  whiteBalanceSettings = 0;
106  correctionsSettings = 0;
107  colormanSettings = 0;
108  medianFilterPassesSpinBox = 0;
109  medianFilterPassesLabel = 0;
110  inIccUrlEdit = 0;
111  outIccUrlEdit = 0;
112  inputColorSpaceLabel = 0;
113  inputColorSpaceComboBox = 0;
114  fixColorsHighlightsBox = 0;
115  refineInterpolationBox = 0;
116  noiseReductionLabel = 0;
117  expoCorrectionBox = 0;
118  expoCorrectionShiftSpinBox = 0;
119  expoCorrectionHighlightSpinBox = 0;
120  expoCorrectionShiftLabel = 0;
121  expoCorrectionHighlightLabel = 0;
122  }
123 
126  double shiftExpoFromEvToLinear(double ev) const
127  {
128  // From GUI : -2.0EV => 0.25
129  // +3.0EV => 8.00
130  return (1.55*ev + 3.35);
131  }
132 
135  double shiftExpoFromLinearToEv(double lin) const
136  {
137  // From GUI : 0.25 => -2.0EV
138  // 8.00 => +3.0EV
139  return ((lin-3.35) / 1.55);
140  }
141 
142 public:
143 
144  QWidget* demosaicingSettings;
145  QWidget* whiteBalanceSettings;
146  QWidget* correctionsSettings;
147  QWidget* colormanSettings;
148 
149  QLabel* whiteBalanceLabel;
150  QLabel* customWhiteBalanceLabel;
151  QLabel* customWhiteBalanceGreenLabel;
152  QLabel* brightnessLabel;
153  QLabel* RAWQualityLabel;
154  QLabel* NRLabel1;
155  QLabel* NRLabel2;
156  QLabel* caRedMultLabel;
157  QLabel* caBlueMultLabel;
158  QLabel* unclipColorLabel;
159  QLabel* reconstructLabel;
160  QLabel* inputColorSpaceLabel;
161  QLabel* outputColorSpaceLabel;
162  QLabel* medianFilterPassesLabel;
163  QLabel* noiseReductionLabel;
164  QLabel* expoCorrectionShiftLabel;
165  QLabel* expoCorrectionHighlightLabel;
166 
167  QCheckBox* blackPointCheckBox;
168  QCheckBox* whitePointCheckBox;
169  QCheckBox* sixteenBitsImage;
170  QCheckBox* autoBrightnessBox;
171  QCheckBox* fourColorCheckBox;
172  QCheckBox* dontStretchPixelsCheckBox;
173  QCheckBox* enableCACorrectionBox;
174  QCheckBox* autoCACorrectionBox;
175  QCheckBox* fixColorsHighlightsBox;
176  QCheckBox* refineInterpolationBox;
177  QCheckBox* expoCorrectionBox;
178 
179  KUrlRequester* inIccUrlEdit;
180  KUrlRequester* outIccUrlEdit;
181 
182  RComboBox* noiseReductionComboBox;
183  RComboBox* whiteBalanceComboBox;
184  RComboBox* RAWQualityComboBox;
185  RComboBox* unclipColorComboBox;
186  RComboBox* inputColorSpaceComboBox;
187  RComboBox* outputColorSpaceComboBox;
188 
189  RIntNumInput* customWhiteBalanceSpinBox;
190  RIntNumInput* reconstructSpinBox;
191  RIntNumInput* blackPointSpinBox;
192  RIntNumInput* whitePointSpinBox;
193  RIntNumInput* NRSpinBox1;
194  RIntNumInput* NRSpinBox2;
195  RIntNumInput* medianFilterPassesSpinBox;
196 
197  RDoubleNumInput* customWhiteBalanceGreenSpinBox;
198  RDoubleNumInput* caRedMultSpinBox;
199  RDoubleNumInput* caBlueMultSpinBox;
200  RDoubleNumInput* brightnessSpinBox;
201  RDoubleNumInput* expoCorrectionShiftSpinBox;
202  RDoubleNumInput* expoCorrectionHighlightSpinBox;
203 };
204 
205 DcrawSettingsWidget::DcrawSettingsWidget(QWidget* const parent, int advSettings)
206  : RExpanderBox(parent), d(new Private)
207 {
208  setup(advSettings);
209 }
210 
211 void DcrawSettingsWidget::setup(int advSettings)
212 {
213  setObjectName( QLatin1String("DCRawSettings Expander" ));
214 
215  // ---------------------------------------------------------------
216  // DEMOSAICING Settings panel
217 
218  d->demosaicingSettings = new QWidget(this);
219  QGridLayout* const demosaicingLayout = new QGridLayout(d->demosaicingSettings);
220 
221  int line = 0;
222 
223  d->sixteenBitsImage = new QCheckBox(i18nc("@option:check", "16 bits color depth"), d->demosaicingSettings);
224  d->sixteenBitsImage->setWhatsThis(i18nc("@info:whatsthis", "<para>If enabled, all RAW files will "
225  "be decoded in 16-bit color depth using a linear gamma curve. To "
226  "prevent dark picture rendering in the editor, it is recommended to "
227  "use Color Management in this mode.</para>"
228  "<para>If disabled, all RAW files will be decoded in 8-bit color "
229  "depth with a BT.709 gamma curve and a 99th-percentile white point. "
230  "This mode is faster than 16-bit decoding.</para>"));
231  demosaicingLayout->addWidget(d->sixteenBitsImage, 0, 0, 1, 2);
232 
233  if (advSettings & SIXTEENBITS)
234  {
235  d->sixteenBitsImage->show();
236  line = 1;
237  }
238  else
239  {
240  d->sixteenBitsImage->hide();
241  }
242 
243  d->fourColorCheckBox = new QCheckBox(i18nc("@option:check", "Interpolate RGB as four colors"), d->demosaicingSettings);
244  d->fourColorCheckBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Interpolate RGB as four "
245  "colors</title>"
246  "<para>The default is to assume that all green pixels are the same. "
247  "If even-row green pixels are more sensitive to ultraviolet light "
248  "than odd-row this difference causes a mesh pattern in the output; "
249  "using this option solves this problem with minimal loss of detail.</para>"
250  "<para>To resume, this option blurs the image a little, but it "
251  "eliminates false 2x2 mesh patterns with VNG quality method or "
252  "mazes with AHD quality method.</para>"));
253  demosaicingLayout->addWidget(d->fourColorCheckBox, line, 0, 1, line == 0 ? 2 : 3);
254  line++;
255 
256  KUrlLabel* const dcrawVersion = new KUrlLabel("http://www.libraw.org", QString("libraw %1")
257  .arg(KDcraw::librawVersion()), d->demosaicingSettings);
258  dcrawVersion->setAlignment(Qt::AlignRight);
259  dcrawVersion->setToolTip(i18nc("@info:tooltip", "Visit LibRaw project website"));
260  demosaicingLayout->addWidget(dcrawVersion, 0, 2, 1, 1);
261 
262  d->dontStretchPixelsCheckBox = new QCheckBox(i18nc("@option:check", "Do not stretch or rotate pixels"), d->demosaicingSettings);
263  d->dontStretchPixelsCheckBox->setWhatsThis(i18nc("@info:whatsthis",
264  "<title>Do not stretch or rotate pixels</title>"
265  "<para>For Fuji Super CCD cameras, show the image tilted 45 degrees. "
266  "For cameras with non-square pixels, do not stretch the image to "
267  "its correct aspect ratio. In any case, this option guarantees that "
268  "each output pixel corresponds to one RAW pixel.</para>"));
269  demosaicingLayout->addWidget(d->dontStretchPixelsCheckBox, line, 0, 1, 3);
270  line++;
271 
272  d->RAWQualityLabel = new QLabel(i18nc("@label:listbox", "Quality:"), d->demosaicingSettings);
273  d->RAWQualityComboBox = new RComboBox(d->demosaicingSettings);
274 
275  // Original dcraw demosaicing methods
276  d->RAWQualityComboBox->insertItem(RawDecodingSettings::BILINEAR, i18nc("@item:inlistbox Quality", "Bilinear"));
277  d->RAWQualityComboBox->insertItem(RawDecodingSettings::VNG, i18nc("@item:inlistbox Quality", "VNG"));
278  d->RAWQualityComboBox->insertItem(RawDecodingSettings::PPG, i18nc("@item:inlistbox Quality", "PPG"));
279  d->RAWQualityComboBox->insertItem(RawDecodingSettings::AHD, i18nc("@item:inlistbox Quality", "AHD"));
280 
281  // Extended demosaicing method from GPL2 pack
282  d->RAWQualityComboBox->insertItem(RawDecodingSettings::DCB, i18nc("@item:inlistbox Quality", "DCB"));
283  d->RAWQualityComboBox->insertItem(RawDecodingSettings::PL_AHD, i18nc("@item:inlistbox Quality", "AHD v2"));
284  d->RAWQualityComboBox->insertItem(RawDecodingSettings::AFD, i18nc("@item:inlistbox Quality", "AFD"));
285  d->RAWQualityComboBox->insertItem(RawDecodingSettings::VCD, i18nc("@item:inlistbox Quality", "VCD"));
286  d->RAWQualityComboBox->insertItem(RawDecodingSettings::VCD_AHD, i18nc("@item:inlistbox Quality", "VCD & AHD"));
287  d->RAWQualityComboBox->insertItem(RawDecodingSettings::LMMSE, i18nc("@item:inlistbox Quality", "LMMSE"));
288  // Extended demosaicing method from GPL3 pack
289  d->RAWQualityComboBox->insertItem(RawDecodingSettings::AMAZE, i18nc("@item:inlistbox Quality", "AMaZE"));
290 
291  // If Libraw do not support GPL2 pack, disable entries relevant.
292  if (!KDcraw::librawUseGPL2DemosaicPack())
293  {
294  for (int i=RawDecodingSettings::DCB ; i <=RawDecodingSettings::LMMSE ; ++i)
295  d->RAWQualityComboBox->combo()->setItemData(i, false, Qt::UserRole-1);
296  }
297 
298  // If Libraw do not support GPL3 pack, disable entries relevant.
299  if (!KDcraw::librawUseGPL3DemosaicPack())
300  {
301  d->RAWQualityComboBox->combo()->setItemData(RawDecodingSettings::AMAZE, false, Qt::UserRole-1);
302  }
303 
304  d->RAWQualityComboBox->setDefaultIndex(RawDecodingSettings::BILINEAR);
305  d->RAWQualityComboBox->setCurrentIndex(RawDecodingSettings::BILINEAR);
306  d->RAWQualityComboBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Quality (interpolation)</title>"
307  "<para>Select here the demosaicing method to use when decoding RAW "
308  "images. A demosaicing algorithm is a digital image process used to "
309  "interpolate a complete image from the partial raw data received "
310  "from the color-filtered image sensor, internal to many digital "
311  "cameras, in form of a matrix of colored pixels. Also known as CFA "
312  "interpolation or color reconstruction, another common spelling is "
313  "demosaicing. The following methods are available for demosaicing "
314  "RAW images:</para>"
315 
316  // Original dcraw demosaicing methods
317 
318  "<para><list><item><emphasis strong='true'>Bilinear</emphasis>: use "
319  "high-speed but low-quality bilinear interpolation (default - for "
320  "slow computers). In this method, the red value of a non-red pixel "
321  "is computed as the average of the adjacent red pixels, and similarly "
322  "for blue and green.</item>"
323 
324  "<item><emphasis strong='true'>VNG</emphasis>: use Variable Number "
325  "of Gradients interpolation. This method computes gradients near "
326  "the pixel of interest and uses the lower gradients (representing "
327  "smoother and more similar parts of the image) to make an estimate.</item>"
328 
329  "<item><emphasis strong='true'>PPG</emphasis>: use Patterned-Pixel-"
330  "Grouping interpolation. Pixel Grouping uses assumptions about "
331  "natural scenery in making estimates. It has fewer color artifacts "
332  "on natural images than the Variable Number of Gradients method.</item>"
333 
334  "<item><emphasis strong='true'>AHD</emphasis>: use Adaptive "
335  "Homogeneity-Directed interpolation. This method selects the "
336  "direction of interpolation so as to maximize a homogeneity metric, "
337  "thus typically minimizing color artifacts.</item>"
338 
339  // Extended demosaicing method
340 
341  "<item><emphasis strong='true'>DCB</emphasis>: DCB interpolation from "
342  "linuxphoto.org project.</item>"
343 
344  "<item><emphasis strong='true'>AHD v2</emphasis>: modified AHD "
345  "interpolation using Variance of Color Differences method.</item>"
346 
347  "<item><emphasis strong='true'>AFD</emphasis>: Adaptive Filtered "
348  "Demosaicing interpolation through 5 pass median filter from PerfectRaw "
349  "project.</item>"
350 
351  "<item><emphasis strong='true'>VCD</emphasis>: Variance of Color "
352  "Differences interpolation.</item>"
353 
354  "<item><emphasis strong='true'>VCD & AHD</emphasis>: Mixed demosaicing "
355  "between VCD and AHD.</item>"
356 
357  "<item><emphasis strong='true'>LMMSE</emphasis>: color demosaicing via "
358  "directional linear minimum mean-square error estimation interpolation "
359  "from PerfectRaw.</item>"
360 
361  "<item><emphasis strong='true'>AMaZE</emphasis>: Aliasing Minimization "
362  "interpolation and Zipper Elimination to apply color aberration removal "
363  "from RawTherapee project.</item></list></para>"
364 
365  "<para>Note: some methods can be unavailable if RAW decoder have been built "
366  "without extension packs.</para>"));
367 
368  demosaicingLayout->addWidget(d->RAWQualityLabel, line, 0, 1, 1);
369  demosaicingLayout->addWidget(d->RAWQualityComboBox, line, 1, 1, 2);
370  line++;
371 
372  d->medianFilterPassesSpinBox = new RIntNumInput(d->demosaicingSettings);
373  d->medianFilterPassesSpinBox->setRange(0, 10, 1);
374  d->medianFilterPassesSpinBox->setDefaultValue(0);
375  d->medianFilterPassesSpinBox->setSliderEnabled(true);
376  d->medianFilterPassesLabel = new QLabel(i18nc("@label:slider", "Pass:"), d->whiteBalanceSettings);
377  d->medianFilterPassesSpinBox->setWhatsThis( i18nc("@info:whatsthis", "<title>Pass</title>"
378  "<para>Set here the passes used by the median filter applied after "
379  "interpolation to Red-Green and Blue-Green channels.</para>"
380  "<para>This setting is only available for specific Quality options: "
381  "<emphasis strong='true'>Bilinear</emphasis>, <emphasis strong='true'>"
382  "VNG</emphasis>, <emphasis strong='true'>PPG</emphasis>, "
383  "<emphasis strong='true'>AHD</emphasis>, <emphasis strong='true'>"
384  "DCB</emphasis>, and <emphasis strong='true'>VCD & AHD</emphasis>.</para>"));
385  demosaicingLayout->addWidget(d->medianFilterPassesLabel, line, 0, 1, 1);
386  demosaicingLayout->addWidget(d->medianFilterPassesSpinBox, line, 1, 1, 2);
387  line++;
388 
389  d->refineInterpolationBox = new QCheckBox(i18nc("@option:check", "Refine interpolation"), d->demosaicingSettings);
390  d->refineInterpolationBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Refine interpolation</title>"
391  "<para>This setting is available only for few Quality options:</para>"
392  "<para><list><item><emphasis strong='true'>DCB</emphasis>: turn on "
393  "the enhance interpolated colors filter.</item>"
394  "<item><emphasis strong='true'>VCD & AHD</emphasis>: turn on the "
395  "enhanced effective color interpolation (EECI) refine to improve "
396  "sharpness.</item></list></para>"));
397  demosaicingLayout->addWidget(d->refineInterpolationBox, line, 0, 1, 2);
398 
399  // If Libraw do not support GPL2 pack, disable options relevant.
400  if (!KDcraw::librawUseGPL2DemosaicPack())
401  {
402  d->medianFilterPassesLabel->setEnabled(false);
403  d->medianFilterPassesSpinBox->setEnabled(false);
404  d->refineInterpolationBox->setEnabled(false);
405  }
406 
407  addItem(d->demosaicingSettings, SmallIcon("kdcraw"), i18nc("@label", "Demosaicing"), QString("demosaicing"), true);
408 
409  // ---------------------------------------------------------------
410  // WHITE BALANCE Settings Panel
411 
412  d->whiteBalanceSettings = new QWidget(this);
413  QGridLayout* const whiteBalanceLayout = new QGridLayout(d->whiteBalanceSettings);
414 
415  d->whiteBalanceLabel = new QLabel(i18nc("@label:listbox", "Method:"), d->whiteBalanceSettings);
416  d->whiteBalanceComboBox = new RComboBox(d->whiteBalanceSettings);
417  d->whiteBalanceComboBox->insertItem(RawDecodingSettings::NONE, i18nc("@item:inlistbox", "Default D65"));
418  d->whiteBalanceComboBox->insertItem(RawDecodingSettings::CAMERA, i18nc("@item:inlistbox", "Camera"));
419  d->whiteBalanceComboBox->insertItem(RawDecodingSettings::AUTO, i18nc("@item:inlistbox set while balance automatically", "Automatic"));
420  d->whiteBalanceComboBox->insertItem(RawDecodingSettings::CUSTOM, i18nc("@item:inlistbox set white balance manually", "Manual"));
421  d->whiteBalanceComboBox->setDefaultIndex(RawDecodingSettings::CAMERA);
422  d->whiteBalanceComboBox->setWhatsThis(i18nc("@info:whatsthis", "<title>White Balance</title>"
423  "<para>Configure the raw white balance:</para>"
424  "<para><list><item><emphasis strong='true'>Default D65</emphasis>: "
425  "Use a standard daylight D65 white balance.</item>"
426  "<item><emphasis strong='true'>Camera</emphasis>: Use the white "
427  "balance specified by the camera. If not available, reverts to "
428  "default neutral white balance.</item>"
429  "<item><emphasis strong='true'>Automatic</emphasis>: Calculates an "
430  "automatic white balance averaging the entire image.</item>"
431  "<item><emphasis strong='true'>Manual</emphasis>: Set a custom "
432  "temperature and green level values.</item></list></para>"));
433 
434  d->customWhiteBalanceSpinBox = new RIntNumInput(d->whiteBalanceSettings);
435  d->customWhiteBalanceSpinBox->setRange(2000, 12000, 10);
436  d->customWhiteBalanceSpinBox->setDefaultValue(6500);
437  d->customWhiteBalanceSpinBox->setSliderEnabled(true);
438  d->customWhiteBalanceLabel = new QLabel(i18nc("@label:slider", "T(K):"), d->whiteBalanceSettings);
439  d->customWhiteBalanceSpinBox->setWhatsThis( i18nc("@info:whatsthis", "<title>Temperature</title>"
440  "<para>Set here the color temperature in Kelvin.</para>"));
441 
442  d->customWhiteBalanceGreenSpinBox = new RDoubleNumInput(d->whiteBalanceSettings);
443  d->customWhiteBalanceGreenSpinBox->setDecimals(2);
444  d->customWhiteBalanceGreenSpinBox->setRange(0.2, 2.5, 0.01);
445  d->customWhiteBalanceGreenSpinBox->setDefaultValue(1.0);
446  d->customWhiteBalanceGreenLabel = new QLabel(i18nc("@label:slider Green component", "Green:"), d->whiteBalanceSettings);
447  d->customWhiteBalanceGreenSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<para>Set here the "
448  "green component to set magenta color cast removal level.</para>"));
449 
450  d->unclipColorLabel = new QLabel(i18nc("@label:listbox", "Highlights:"), d->whiteBalanceSettings);
451  d->unclipColorComboBox = new RComboBox(d->whiteBalanceSettings);
452  d->unclipColorComboBox->insertItem(0, i18nc("@item:inlistbox", "Solid white"));
453  d->unclipColorComboBox->insertItem(1, i18nc("@item:inlistbox", "Unclip"));
454  d->unclipColorComboBox->insertItem(2, i18nc("@item:inlistbox", "Blend"));
455  d->unclipColorComboBox->insertItem(3, i18nc("@item:inlistbox", "Rebuild"));
456  d->unclipColorComboBox->setDefaultIndex(0);
457  d->unclipColorComboBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Highlights</title>"
458  "<para>Select here the highlight clipping method:</para>"
459  "<para><list><item><emphasis strong='true'>Solid white</emphasis>: "
460  "clip all highlights to solid white</item>"
461  "<item><emphasis strong='true'>Unclip</emphasis>: leave highlights "
462  "unclipped in various shades of pink</item>"
463  "<item><emphasis strong='true'>Blend</emphasis>:Blend clipped and "
464  "unclipped values together for a gradual fade to white</item>"
465  "<item><emphasis strong='true'>Rebuild</emphasis>: reconstruct "
466  "highlights using a level value</item></list></para>"));
467 
468  d->reconstructLabel = new QLabel(i18nc("@label:slider Highlight reconstruct level", "Level:"), d->whiteBalanceSettings);
469  d->reconstructSpinBox = new RIntNumInput(d->whiteBalanceSettings);
470  d->reconstructSpinBox->setRange(0, 6, 1);
471  d->reconstructSpinBox->setDefaultValue(0);
472  d->reconstructSpinBox->setSliderEnabled(true);
473  d->reconstructSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Level</title>"
474  "<para>Specify the reconstruct highlight level. Low values favor "
475  "whites and high values favor colors.</para>"));
476 
477  d->expoCorrectionBox = new QCheckBox(i18nc("@option:check", "Exposure Correction (E.V)"), d->whiteBalanceSettings);
478  d->expoCorrectionBox->setWhatsThis(i18nc("@info:whatsthis", "<para>Turn on the exposure "
479  "correction before interpolation.</para>"));
480 
481  d->expoCorrectionShiftLabel = new QLabel(i18nc("@label:slider", "Linear Shift:"), d->whiteBalanceSettings);
482  d->expoCorrectionShiftSpinBox = new RDoubleNumInput(d->whiteBalanceSettings);
483  d->expoCorrectionShiftSpinBox->setDecimals(2);
484  d->expoCorrectionShiftSpinBox->setRange(-2.0, 3.0, 0.01);
485  d->expoCorrectionShiftSpinBox->setDefaultValue(0.0);
486  d->expoCorrectionShiftSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Shift</title>"
487  "<para>Linear Shift of exposure correction before interpolation in E.V</para>"));
488 
489  d->expoCorrectionHighlightLabel = new QLabel(i18nc("@label:slider", "Highlight:"), d->whiteBalanceSettings);
490  d->expoCorrectionHighlightSpinBox = new RDoubleNumInput(d->whiteBalanceSettings);
491  d->expoCorrectionHighlightSpinBox->setDecimals(2);
492  d->expoCorrectionHighlightSpinBox->setRange(0.0, 1.0, 0.01);
493  d->expoCorrectionHighlightSpinBox->setDefaultValue(0.0);
494  d->expoCorrectionHighlightSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Highlight</title>"
495  "<para>Amount of highlight preservation for exposure correction "
496  "before interpolation in E.V. Only take effect if Shift Correction is > 1.0 E.V</para>"));
497 
498  d->fixColorsHighlightsBox = new QCheckBox(i18nc("@option:check", "Correct false colors in highlights"), d->whiteBalanceSettings);
499  d->fixColorsHighlightsBox->setWhatsThis(i18nc("@info:whatsthis", "<para>If enabled, images with "
500  "overblown channels are processed much more accurately, without "
501  "'pink clouds' (and blue highlights under tungsten lamps).</para>"));
502 
503  d->autoBrightnessBox = new QCheckBox(i18nc("@option:check", "Auto Brightness"), d->whiteBalanceSettings);
504  d->autoBrightnessBox->setWhatsThis(i18nc("@info:whatsthis", "<para>If disable, use a fixed white level "
505  "and ignore the image histogram to adjust brightness.</para>"));
506 
507  d->brightnessLabel = new QLabel(i18nc("@label:slider", "Brightness:"), d->whiteBalanceSettings);
508  d->brightnessSpinBox = new RDoubleNumInput(d->whiteBalanceSettings);
509  d->brightnessSpinBox->setDecimals(2);
510  d->brightnessSpinBox->setRange(0.0, 10.0, 0.01);
511  d->brightnessSpinBox->setDefaultValue(1.0);
512  d->brightnessSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Brightness</title>"
513  "<para>Specify the brightness level of output image. The default "
514  "value is 1.0 (works in 8-bit mode only).</para>"));
515 
516  if (! (advSettings & POSTPROCESSING))
517  {
518  d->brightnessLabel->hide();
519  d->brightnessSpinBox->hide();
520  }
521 
522  d->blackPointCheckBox = new QCheckBox(i18nc("@option:check Black point", "Black:"), d->whiteBalanceSettings);
523  d->blackPointCheckBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Black point</title>"
524  "<para>Use a specific black point value to decode RAW pictures. If "
525  "you set this option to off, the Black Point value will be "
526  "automatically computed.</para>"));
527  d->blackPointSpinBox = new RIntNumInput(d->whiteBalanceSettings);
528  d->blackPointSpinBox->setRange(0, 1000, 1);
529  d->blackPointSpinBox->setDefaultValue(0);
530  d->blackPointSpinBox->setSliderEnabled(true);
531  d->blackPointSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Black point value</title>"
532  "<para>Specify specific black point value of the output image.</para>"));
533 
534  d->whitePointCheckBox = new QCheckBox(i18nc("@option:check White point", "White:"), d->whiteBalanceSettings);
535  d->whitePointCheckBox->setWhatsThis(i18nc("@info:whatsthis", "<title>White point</title>"
536  "<para>Use a specific white point value to decode RAW pictures. If "
537  "you set this option to off, the White Point value will be "
538  "automatically computed.</para>"));
539  d->whitePointSpinBox = new RIntNumInput(d->whiteBalanceSettings);
540  d->whitePointSpinBox->setRange(0, 20000, 1);
541  d->whitePointSpinBox->setDefaultValue(0);
542  d->whitePointSpinBox->setSliderEnabled(true);
543  d->whitePointSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>White point value</title>"
544  "<para>Specify specific white point value of the output image.</para>"));
545 
546  if (! (advSettings & BLACKWHITEPOINTS))
547  {
548  d->blackPointCheckBox->hide();
549  d->blackPointSpinBox->hide();
550  d->whitePointCheckBox->hide();
551  d->whitePointSpinBox->hide();
552  }
553 
554  whiteBalanceLayout->addWidget(d->whiteBalanceLabel, 0, 0, 1, 1);
555  whiteBalanceLayout->addWidget(d->whiteBalanceComboBox, 0, 1, 1, 2);
556  whiteBalanceLayout->addWidget(d->customWhiteBalanceLabel, 1, 0, 1, 1);
557  whiteBalanceLayout->addWidget(d->customWhiteBalanceSpinBox, 1, 1, 1, 2);
558  whiteBalanceLayout->addWidget(d->customWhiteBalanceGreenLabel, 2, 0, 1, 1);
559  whiteBalanceLayout->addWidget(d->customWhiteBalanceGreenSpinBox, 2, 1, 1, 2);
560  whiteBalanceLayout->addWidget(d->unclipColorLabel, 3, 0, 1, 1);
561  whiteBalanceLayout->addWidget(d->unclipColorComboBox, 3, 1, 1, 2);
562  whiteBalanceLayout->addWidget(d->reconstructLabel, 4, 0, 1, 1);
563  whiteBalanceLayout->addWidget(d->reconstructSpinBox, 4, 1, 1, 2);
564  whiteBalanceLayout->addWidget(d->expoCorrectionBox, 5, 0, 1, 2);
565  whiteBalanceLayout->addWidget(d->expoCorrectionShiftLabel, 6, 0, 1, 1);
566  whiteBalanceLayout->addWidget(d->expoCorrectionShiftSpinBox, 6, 1, 1, 2);
567  whiteBalanceLayout->addWidget(d->expoCorrectionHighlightLabel, 7, 0, 1, 1);
568  whiteBalanceLayout->addWidget(d->expoCorrectionHighlightSpinBox, 7, 1, 1, 2);
569  whiteBalanceLayout->addWidget(d->fixColorsHighlightsBox, 8, 0, 1, 3);
570  whiteBalanceLayout->addWidget(d->autoBrightnessBox, 9, 0, 1, 3);
571  whiteBalanceLayout->addWidget(d->brightnessLabel, 10, 0, 1, 1);
572  whiteBalanceLayout->addWidget(d->brightnessSpinBox, 10, 1, 1, 2);
573  whiteBalanceLayout->addWidget(d->blackPointCheckBox, 11, 0, 1, 1);
574  whiteBalanceLayout->addWidget(d->blackPointSpinBox, 11, 1, 1, 2);
575  whiteBalanceLayout->addWidget(d->whitePointCheckBox, 12, 0, 1, 1);
576  whiteBalanceLayout->addWidget(d->whitePointSpinBox, 12, 1, 1, 2);
577  whiteBalanceLayout->setSpacing(KDialog::spacingHint());
578  whiteBalanceLayout->setMargin(KDialog::spacingHint());
579 
580  addItem(d->whiteBalanceSettings, SmallIcon("kdcraw"), i18nc("@label", "White Balance"), QString("whitebalance"), true);
581 
582  // ---------------------------------------------------------------
583  // CORRECTIONS Settings panel
584 
585  d->correctionsSettings = new QWidget(this);
586  QGridLayout* const correctionsLayout = new QGridLayout(d->correctionsSettings);
587 
588  d->noiseReductionLabel = new QLabel(i18nc("@label:listbox", "Noise reduction:"), d->correctionsSettings);
589  d->noiseReductionComboBox = new RComboBox(d->colormanSettings);
590  d->noiseReductionComboBox->insertItem(RawDecodingSettings::NONR, i18nc("@item:inlistbox Noise Reduction", "None"));
591  d->noiseReductionComboBox->insertItem(RawDecodingSettings::WAVELETSNR, i18nc("@item:inlistbox Noise Reduction", "Wavelets"));
592  d->noiseReductionComboBox->insertItem(RawDecodingSettings::FBDDNR, i18nc("@item:inlistbox Noise Reduction", "FBDD"));
593  d->noiseReductionComboBox->insertItem(RawDecodingSettings::LINENR, i18nc("@item:inlistbox Noise Reduction", "CFA Line Denoise"));
594  d->noiseReductionComboBox->insertItem(RawDecodingSettings::IMPULSENR, i18nc("@item:inlistbox Noise Reduction", "Impulse Denoise"));
595  d->noiseReductionComboBox->setDefaultIndex(RawDecodingSettings::NONR);
596  d->noiseReductionComboBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Noise Reduction</title>"
597  "<para>Select here the noise reduction method to apply during RAW "
598  "decoding.</para>"
599  "<para><list><item><emphasis strong='true'>None</emphasis>: no "
600  "noise reduction.</item>"
601  "<item><emphasis strong='true'>Wavelets</emphasis>: wavelets "
602  "correction to erase noise while preserving real detail. It's "
603  "applied after interpolation.</item>"
604  "<item><emphasis strong='true'>FBDD</emphasis>: Fake Before "
605  "Demosaicing Denoising noise reduction. It's applied before "
606  "interpolation.</item>"
607  "<item><emphasis strong='true'>CFA Line Denoise</emphasis>: Banding "
608  "noise suppression. It's applied after interpolation.</item>"
609  "<item><emphasis strong='true'>Impulse Denoise</emphasis>: Impulse "
610  "noise suppression. It's applied after interpolation.</item></list></para>"));
611 
612  d->NRSpinBox1 = new RIntNumInput(d->correctionsSettings);
613  d->NRSpinBox1->setRange(100, 1000, 1);
614  d->NRSpinBox1->setDefaultValue(100);
615  d->NRSpinBox1->setSliderEnabled(true);
616  d->NRLabel1 = new QLabel(d->correctionsSettings);
617 
618  d->NRSpinBox2 = new RIntNumInput(d->correctionsSettings);
619  d->NRSpinBox2->setRange(100, 1000, 1);
620  d->NRSpinBox2->setDefaultValue(100);
621  d->NRSpinBox2->setSliderEnabled(true);
622  d->NRLabel2 = new QLabel(d->correctionsSettings);
623 
624  d->enableCACorrectionBox = new QCheckBox(i18nc("@option:check", "Enable Chromatic Aberration correction"), d->correctionsSettings);
625  d->enableCACorrectionBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Enable Chromatic "
626  "Aberration correction</title>"
627  "<para>Enlarge the raw red-green and blue-yellow axis by the given "
628  "factors (automatic by default).</para>"));
629 
630  d->autoCACorrectionBox = new QCheckBox(i18nc("@option:check", "Automatic color axis adjustments"), d->correctionsSettings);
631  d->autoCACorrectionBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Automatic Chromatic "
632  "Aberration correction</title>"
633  "<para>If this option is turned on, it will try to shift image "
634  "channels slightly and evaluate Chromatic Aberration change. Note "
635  "that if you shot blue-red pattern, the method may fail. In this "
636  "case, disable this option and tune manually color factors.</para>"));
637 
638  d->caRedMultLabel = new QLabel(i18nc("@label:slider", "Red-Green:"), d->correctionsSettings);
639  d->caRedMultSpinBox = new RDoubleNumInput(d->correctionsSettings);
640  d->caRedMultSpinBox->setDecimals(1);
641  d->caRedMultSpinBox->setRange(-4.0, 4.0, 0.1);
642  d->caRedMultSpinBox->setDefaultValue(0.0);
643  d->caRedMultSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Red-Green multiplier</title>"
644  "<para>Set here the amount of correction on red-green axis</para>"));
645 
646  d->caBlueMultLabel = new QLabel(i18nc("@label:slider", "Blue-Yellow:"), d->correctionsSettings);
647  d->caBlueMultSpinBox = new RDoubleNumInput(d->correctionsSettings);
648  d->caBlueMultSpinBox->setDecimals(1);
649  d->caBlueMultSpinBox->setRange(-4.0, 4.0, 0.1);
650  d->caBlueMultSpinBox->setDefaultValue(0.0);
651  d->caBlueMultSpinBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Blue-Yellow multiplier</title>"
652  "<para>Set here the amount of correction on blue-yellow axis</para>"));
653 
654  correctionsLayout->addWidget(d->noiseReductionLabel, 0, 0, 1, 1);
655  correctionsLayout->addWidget(d->noiseReductionComboBox, 0, 1, 1, 2);
656  correctionsLayout->addWidget(d->NRLabel1, 1, 0, 1, 1);
657  correctionsLayout->addWidget(d->NRSpinBox1, 1, 1, 1, 2);
658  correctionsLayout->addWidget(d->NRLabel2, 2, 0, 1, 1);
659  correctionsLayout->addWidget(d->NRSpinBox2, 2, 1, 1, 2);
660  correctionsLayout->addWidget(d->enableCACorrectionBox, 3, 0, 1, 3);
661  correctionsLayout->addWidget(d->autoCACorrectionBox, 4, 0, 1, 3);
662  correctionsLayout->addWidget(d->caRedMultLabel, 5, 0, 1, 1);
663  correctionsLayout->addWidget(d->caRedMultSpinBox, 5, 1, 1, 2);
664  correctionsLayout->addWidget(d->caBlueMultLabel, 6, 0, 1, 1);
665  correctionsLayout->addWidget(d->caBlueMultSpinBox, 6, 1, 1, 2);
666  correctionsLayout->setRowStretch(7, 10);
667  correctionsLayout->setSpacing(KDialog::spacingHint());
668  correctionsLayout->setMargin(KDialog::spacingHint());
669 
670  addItem(d->correctionsSettings, SmallIcon("kdcraw"), i18nc("@label", "Corrections"), QString("corrections"), false);
671 
672  // ---------------------------------------------------------------
673  // COLOR MANAGEMENT Settings panel
674 
675  d->colormanSettings = new QWidget(this);
676  QGridLayout* const colormanLayout = new QGridLayout(d->colormanSettings);
677 
678  d->inputColorSpaceLabel = new QLabel(i18nc("@label:listbox", "Camera Profile:"), d->colormanSettings);
679  d->inputColorSpaceComboBox = new RComboBox(d->colormanSettings);
680  d->inputColorSpaceComboBox->insertItem(RawDecodingSettings::NOINPUTCS, i18nc("@item:inlistbox Camera Profile", "None"));
681  d->inputColorSpaceComboBox->insertItem(RawDecodingSettings::EMBEDDED, i18nc("@item:inlistbox Camera Profile", "Embedded"));
682  d->inputColorSpaceComboBox->insertItem(RawDecodingSettings::CUSTOMINPUTCS, i18nc("@item:inlistbox Camera Profile", "Custom"));
683  d->inputColorSpaceComboBox->setDefaultIndex(RawDecodingSettings::NOINPUTCS);
684  d->inputColorSpaceComboBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Camera Profile</title>"
685  "<para>Select here the input color space used to decode RAW data.</para>"
686  "<para><list><item><emphasis strong='true'>None</emphasis>: no "
687  "input color profile is used during RAW decoding.</item>"
688  "<item><emphasis strong='true'>Embedded</emphasis>: use embedded "
689  "color profile from RAW file, if it exists.</item>"
690  "<item><emphasis strong='true'>Custom</emphasis>: use a custom "
691  "input color space profile.</item></list></para>"));
692 
693  d->inIccUrlEdit = new KUrlRequester(d->colormanSettings);
694  d->inIccUrlEdit->setMode(KFile::LocalOnly | KFile::ExistingOnly | KFile::File);
695  d->inIccUrlEdit->setFilter("*.icc *.icm|"+i18n("ICC Files (*.icc; *.icm)"));
696 
697  d->outputColorSpaceLabel = new QLabel(i18nc("@label:listbox", "Workspace:"), d->colormanSettings);
698  d->outputColorSpaceComboBox = new RComboBox( d->colormanSettings );
699  d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::RAWCOLOR, i18nc("@item:inlistbox Workspace", "Raw (no profile)"));
700  d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::SRGB, i18nc("@item:inlistbox Workspace", "sRGB"));
701  d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::ADOBERGB, i18nc("@item:inlistbox Workspace", "Adobe RGB"));
702  d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::WIDEGAMMUT, i18nc("@item:inlistbox Workspace", "Wide Gamut"));
703  d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::PROPHOTO, i18nc("@item:inlistbox Workspace", "Pro-Photo"));
704  d->outputColorSpaceComboBox->insertItem(RawDecodingSettings::CUSTOMOUTPUTCS, i18nc("@item:inlistbox Workspace", "Custom"));
705  d->outputColorSpaceComboBox->setDefaultIndex(RawDecodingSettings::SRGB);
706  d->outputColorSpaceComboBox->setWhatsThis(i18nc("@info:whatsthis", "<title>Workspace</title>"
707  "<para>Select here the output color space used to decode RAW data.</para>"
708  "<para><list><item><emphasis strong='true'>Raw (linear)</emphasis>: "
709  "in this mode, no output color space is used during RAW decoding.</item>"
710  "<item><emphasis strong='true'>sRGB</emphasis>: this is an RGB "
711  "color space, created cooperatively by Hewlett-Packard and "
712  "Microsoft. It is the best choice for images destined for the Web "
713  "and portrait photography.</item>"
714  "<item><emphasis strong='true'>Adobe RGB</emphasis>: this color "
715  "space is an extended RGB color space, developed by Adobe. It is "
716  "used for photography applications such as advertising and fine "
717  "art.</item>"
718  "<item><emphasis strong='true'>Wide Gamut</emphasis>: this color "
719  "space is an expanded version of the Adobe RGB color space.</item>"
720  "<item><emphasis strong='true'>Pro-Photo</emphasis>: this color "
721  "space is an RGB color space, developed by Kodak, that offers an "
722  "especially large gamut designed for use with photographic outputs "
723  "in mind.</item>"
724  "<item><emphasis strong='true'>Custom</emphasis>: use a custom "
725  "output color space profile.</item></list></para>"));
726 
727  d->outIccUrlEdit = new KUrlRequester(d->colormanSettings);
728  d->outIccUrlEdit->setMode(KFile::LocalOnly | KFile::File | KFile::ExistingOnly);
729  d->outIccUrlEdit->setFilter("*.icc *.icm|"+i18n("ICC Files (*.icc; *.icm)"));
730 
731  colormanLayout->addWidget(d->inputColorSpaceLabel, 0, 0, 1, 1);
732  colormanLayout->addWidget(d->inputColorSpaceComboBox, 0, 1, 1, 2);
733  colormanLayout->addWidget(d->inIccUrlEdit, 1, 0, 1, 3);
734  colormanLayout->addWidget(d->outputColorSpaceLabel, 2, 0, 1, 1);
735  colormanLayout->addWidget(d->outputColorSpaceComboBox, 2, 1, 1, 2);
736  colormanLayout->addWidget(d->outIccUrlEdit, 3, 0, 1, 3);
737  colormanLayout->setRowStretch(4, 10);
738  colormanLayout->setSpacing(KDialog::spacingHint());
739  colormanLayout->setMargin(KDialog::spacingHint());
740 
741  addItem(d->colormanSettings, SmallIcon("kdcraw"), i18nc("@label", "Color Management"), QString("colormanagement"), false);
742 
743  if (! (advSettings & COLORSPACE))
744  removeItem(COLORMANAGEMENT);
745 
746  addStretch();
747 
748  // ---------------------------------------------------------------
749 
750  connect(d->unclipColorComboBox, SIGNAL(activated(int)),
751  this, SLOT(slotUnclipColorActivated(int)));
752 
753  connect(d->whiteBalanceComboBox, SIGNAL(activated(int)),
754  this, SLOT(slotWhiteBalanceToggled(int)));
755 
756  connect(d->noiseReductionComboBox, SIGNAL(activated(int)),
757  this, SLOT(slotNoiseReductionChanged(int)));
758 
759  connect(d->enableCACorrectionBox, SIGNAL(toggled(bool)),
760  this, SLOT(slotCACorrectionToggled(bool)));
761 
762  connect(d->autoCACorrectionBox, SIGNAL(toggled(bool)),
763  this, SLOT(slotAutoCAToggled(bool)));
764 
765  connect(d->blackPointCheckBox, SIGNAL(toggled(bool)),
766  d->blackPointSpinBox, SLOT(setEnabled(bool)));
767 
768  connect(d->whitePointCheckBox, SIGNAL(toggled(bool)),
769  d->whitePointSpinBox, SLOT(setEnabled(bool)));
770 
771  connect(d->sixteenBitsImage, SIGNAL(toggled(bool)),
772  this, SLOT(slotsixteenBitsImageToggled(bool)));
773 
774  connect(dcrawVersion, SIGNAL(leftClickedUrl(QString)),
775  this, SLOT(processDcrawUrl(QString)));
776 
777  connect(d->inputColorSpaceComboBox, SIGNAL(activated(int)),
778  this, SLOT(slotInputColorSpaceChanged(int)));
779 
780  connect(d->outputColorSpaceComboBox, SIGNAL(activated(int)),
781  this, SLOT(slotOutputColorSpaceChanged(int)));
782 
783  connect(d->expoCorrectionBox, SIGNAL(toggled(bool)),
784  this, SLOT(slotExposureCorrectionToggled(bool)));
785 
786  connect(d->expoCorrectionShiftSpinBox, SIGNAL(valueChanged(double)),
787  this, SLOT(slotExpoCorrectionShiftChanged(double)));
788 
789  // Wrapper to emit signal when something is changed in settings.
790 
791  connect(d->inIccUrlEdit, SIGNAL(urlSelected(KUrl)),
792  this, SIGNAL(signalSettingsChanged()));
793 
794  connect(d->outIccUrlEdit, SIGNAL(urlSelected(KUrl)),
795  this, SIGNAL(signalSettingsChanged()));
796 
797  connect(d->whiteBalanceComboBox, SIGNAL(activated(int)),
798  this, SIGNAL(signalSettingsChanged()));
799 
800  connect(d->RAWQualityComboBox, SIGNAL(activated(int)),
801  this, SLOT(slotRAWQualityChanged(int)));
802 
803  connect(d->unclipColorComboBox, SIGNAL(activated(int)),
804  this, SIGNAL(signalSettingsChanged()));
805 
806  connect(d->inputColorSpaceComboBox, SIGNAL(activated(int)),
807  this, SIGNAL(signalSettingsChanged()));
808 
809  connect(d->outputColorSpaceComboBox, SIGNAL(activated(int)),
810  this, SIGNAL(signalSettingsChanged()));
811 
812  connect(d->blackPointCheckBox, SIGNAL(toggled(bool)),
813  this, SIGNAL(signalSettingsChanged()));
814 
815  connect(d->whitePointCheckBox, SIGNAL(toggled(bool)),
816  this, SIGNAL(signalSettingsChanged()));
817 
818  connect(d->sixteenBitsImage, SIGNAL(toggled(bool)),
819  this, SIGNAL(signalSettingsChanged()));
820 
821  connect(d->fixColorsHighlightsBox, SIGNAL(toggled(bool)),
822  this, SIGNAL(signalSettingsChanged()));
823 
824  connect(d->autoBrightnessBox, SIGNAL(toggled(bool)),
825  this, SIGNAL(signalSettingsChanged()));
826 
827  connect(d->fourColorCheckBox, SIGNAL(toggled(bool)),
828  this, SIGNAL(signalSettingsChanged()));
829 
830  connect(d->dontStretchPixelsCheckBox, SIGNAL(toggled(bool)),
831  this, SIGNAL(signalSettingsChanged()));
832 
833  connect(d->refineInterpolationBox, SIGNAL(toggled(bool)),
834  this, SIGNAL(signalSettingsChanged()));
835 
836  connect(d->customWhiteBalanceSpinBox, SIGNAL(valueChanged(int)),
837  this, SIGNAL(signalSettingsChanged()));
838 
839  connect(d->reconstructSpinBox, SIGNAL(valueChanged(int)),
840  this, SIGNAL(signalSettingsChanged()));
841 
842  connect(d->blackPointSpinBox, SIGNAL(valueChanged(int)),
843  this, SIGNAL(signalSettingsChanged()));
844 
845  connect(d->whitePointSpinBox, SIGNAL(valueChanged(int)),
846  this, SIGNAL(signalSettingsChanged()));
847 
848  connect(d->NRSpinBox1, SIGNAL(valueChanged(int)),
849  this, SIGNAL(signalSettingsChanged()));
850 
851  connect(d->NRSpinBox2, SIGNAL(valueChanged(int)),
852  this, SIGNAL(signalSettingsChanged()));
853 
854  connect(d->medianFilterPassesSpinBox, SIGNAL(valueChanged(int)),
855  this, SIGNAL(signalSettingsChanged()));
856 
857  connect(d->customWhiteBalanceGreenSpinBox, SIGNAL(valueChanged(double)),
858  this, SIGNAL(signalSettingsChanged()));
859 
860  connect(d->caRedMultSpinBox, SIGNAL(valueChanged(double)),
861  this, SIGNAL(signalSettingsChanged()));
862 
863  connect(d->caBlueMultSpinBox, SIGNAL(valueChanged(double)),
864  this, SIGNAL(signalSettingsChanged()));
865 
866  connect(d->brightnessSpinBox, SIGNAL(valueChanged(double)),
867  this, SIGNAL(signalSettingsChanged()));
868 
869  connect(d->expoCorrectionHighlightSpinBox, SIGNAL(valueChanged(double)),
870  this, SIGNAL(signalSettingsChanged()));
871 }
872 
873 DcrawSettingsWidget::~DcrawSettingsWidget()
874 {
875  delete d;
876 }
877 
878 void DcrawSettingsWidget::updateMinimumWidth()
879 {
880  int width = 0;
881 
882  for (int i = 0; i < count(); i++)
883  {
884  if (widget(i)->width() > width)
885  width = widget(i)->width();
886  }
887 
888  setMinimumWidth(width);
889 }
890 
891 void DcrawSettingsWidget::processDcrawUrl(const QString& url)
892 {
893  KToolInvocation::self()->invokeBrowser(url);
894 }
895 
896 KUrlRequester* DcrawSettingsWidget::inputProfileUrlEdit() const
897 {
898  return d->inIccUrlEdit;
899 }
900 
901 KUrlRequester* DcrawSettingsWidget::outputProfileUrlEdit() const
902 {
903  return d->outIccUrlEdit;
904 }
905 
906 void DcrawSettingsWidget::resetToDefault()
907 {
908  setSettings(RawDecodingSettings());
909 }
910 
911 void DcrawSettingsWidget::slotsixteenBitsImageToggled(bool b)
912 {
913  setEnabledBrightnessSettings(!b);
914  emit signalSixteenBitsImageToggled(d->sixteenBitsImage->isChecked());
915 }
916 
917 void DcrawSettingsWidget::slotWhiteBalanceToggled(int v)
918 {
919  if (v == 3)
920  {
921  d->customWhiteBalanceSpinBox->setEnabled(true);
922  d->customWhiteBalanceGreenSpinBox->setEnabled(true);
923  d->customWhiteBalanceLabel->setEnabled(true);
924  d->customWhiteBalanceGreenLabel->setEnabled(true);
925  }
926  else
927  {
928  d->customWhiteBalanceSpinBox->setEnabled(false);
929  d->customWhiteBalanceGreenSpinBox->setEnabled(false);
930  d->customWhiteBalanceLabel->setEnabled(false);
931  d->customWhiteBalanceGreenLabel->setEnabled(false);
932  }
933 }
934 
935 void DcrawSettingsWidget::slotUnclipColorActivated(int v)
936 {
937  if (v == 3) // Reconstruct Highlight method
938  {
939  d->reconstructLabel->setEnabled(true);
940  d->reconstructSpinBox->setEnabled(true);
941  }
942  else
943  {
944  d->reconstructLabel->setEnabled(false);
945  d->reconstructSpinBox->setEnabled(false);
946  }
947 }
948 
949 void DcrawSettingsWidget::slotNoiseReductionChanged(int item)
950 {
951  d->NRSpinBox1->setEnabled(true);
952  d->NRLabel1->setEnabled(true);
953  d->NRSpinBox2->setEnabled(true);
954  d->NRLabel2->setEnabled(true);
955  d->NRLabel1->setText(i18nc("@label", "Threshold:"));
956  d->NRSpinBox1->setWhatsThis(i18nc("@info:whatsthis", "<title>Threshold</title>"
957  "<para>Set here the noise reduction threshold value to use.</para>"));
958 
959  switch(item)
960  {
961  case RawDecodingSettings::WAVELETSNR:
962  case RawDecodingSettings::FBDDNR:
963  case RawDecodingSettings::LINENR:
964  d->NRSpinBox2->setVisible(false);
965  d->NRLabel2->setVisible(false);
966  break;
967 
968  case RawDecodingSettings::IMPULSENR:
969  d->NRLabel1->setText(i18nc("@label", "Luminance:"));
970  d->NRSpinBox1->setWhatsThis(i18nc("@info:whatsthis", "<title>Luminance</title>"
971  "<para>Amount of Luminance impulse noise reduction.</para>"));
972  d->NRLabel2->setText(i18nc("@label", "Chrominance:"));
973  d->NRSpinBox2->setWhatsThis(i18nc("@info:whatsthis", "<title>Chrominance</title>"
974  "<para>Amount of Chrominance impulse noise reduction.</para>"));
975  d->NRSpinBox2->setVisible(true);
976  d->NRLabel2->setVisible(true);
977  break;
978 
979  default:
980  d->NRSpinBox1->setEnabled(false);
981  d->NRLabel1->setEnabled(false);
982  d->NRSpinBox2->setEnabled(false);
983  d->NRLabel2->setEnabled(false);
984  d->NRSpinBox2->setVisible(false);
985  d->NRLabel2->setVisible(false);
986  break;
987  }
988 
989  emit signalSettingsChanged();
990 }
991 
992 void DcrawSettingsWidget::slotCACorrectionToggled(bool b)
993 {
994  d->autoCACorrectionBox->setEnabled(b);
995  slotAutoCAToggled(d->autoCACorrectionBox->isChecked());
996 }
997 
998 void DcrawSettingsWidget::slotAutoCAToggled(bool b)
999 {
1000  if (b)
1001  {
1002  d->caRedMultSpinBox->setValue(0.0);
1003  d->caBlueMultSpinBox->setValue(0.0);
1004  }
1005 
1006  bool mult = (!b) && (d->autoCACorrectionBox->isEnabled());
1007  d->caRedMultSpinBox->setEnabled(mult);
1008  d->caBlueMultSpinBox->setEnabled(mult);
1009  d->caRedMultLabel->setEnabled(mult);
1010  d->caBlueMultLabel->setEnabled(mult);
1011  emit signalSettingsChanged();
1012 }
1013 
1014 void DcrawSettingsWidget::slotExposureCorrectionToggled(bool b)
1015 {
1016  d->expoCorrectionShiftLabel->setEnabled(b);
1017  d->expoCorrectionShiftSpinBox->setEnabled(b);
1018  d->expoCorrectionHighlightLabel->setEnabled(b);
1019  d->expoCorrectionHighlightSpinBox->setEnabled(b);
1020 
1021  slotExpoCorrectionShiftChanged(d->expoCorrectionShiftSpinBox->value());
1022 }
1023 
1024 void DcrawSettingsWidget::slotExpoCorrectionShiftChanged(double ev)
1025 {
1026  // Only enable Highligh exposure correction if Shift correction is >= 1.0, else this settings do not take effect.
1027  bool b = (ev >= 1.0);
1028 
1029  d->expoCorrectionHighlightLabel->setEnabled(b);
1030  d->expoCorrectionHighlightSpinBox->setEnabled(b);
1031 
1032  emit signalSettingsChanged();
1033 }
1034 
1035 void DcrawSettingsWidget::slotInputColorSpaceChanged(int item)
1036 {
1037  d->inIccUrlEdit->setEnabled(item == RawDecodingSettings::CUSTOMINPUTCS);
1038 }
1039 
1040 void DcrawSettingsWidget::slotOutputColorSpaceChanged(int item)
1041 {
1042  d->outIccUrlEdit->setEnabled(item == RawDecodingSettings::CUSTOMOUTPUTCS);
1043 }
1044 
1045 void DcrawSettingsWidget::slotRAWQualityChanged(int quality)
1046 {
1047  switch(quality)
1048  {
1049  case RawDecodingSettings::DCB:
1050  case RawDecodingSettings::VCD_AHD:
1051  // These options can be only avaialble if Libraw use GPL2 pack.
1052  d->medianFilterPassesLabel->setEnabled(KDcraw::librawUseGPL2DemosaicPack());
1053  d->medianFilterPassesSpinBox->setEnabled(KDcraw::librawUseGPL2DemosaicPack());
1054  d->refineInterpolationBox->setEnabled(KDcraw::librawUseGPL2DemosaicPack());
1055  break;
1056 
1057  case RawDecodingSettings::PL_AHD:
1058  case RawDecodingSettings::AFD:
1059  case RawDecodingSettings::VCD:
1060  case RawDecodingSettings::LMMSE:
1061  case RawDecodingSettings::AMAZE:
1062  d->medianFilterPassesLabel->setEnabled(false);
1063  d->medianFilterPassesSpinBox->setEnabled(false);
1064  d->refineInterpolationBox->setEnabled(false);
1065  break;
1066 
1067  default: // BILINEAR, VNG, PPG, AHD
1068  d->medianFilterPassesLabel->setEnabled(true);
1069  d->medianFilterPassesSpinBox->setEnabled(true);
1070  d->refineInterpolationBox->setEnabled(false);
1071  break;
1072  }
1073 
1074  emit signalSettingsChanged();
1075 }
1076 
1077 void DcrawSettingsWidget::setEnabledBrightnessSettings(bool b)
1078 {
1079  d->brightnessLabel->setEnabled(b);
1080  d->brightnessSpinBox->setEnabled(b);
1081 }
1082 
1083 bool DcrawSettingsWidget::brightnessSettingsIsEnabled() const
1084 {
1085  return d->brightnessSpinBox->isEnabled();
1086 }
1087 
1088 void DcrawSettingsWidget::setSettings(const RawDecodingSettings& settings)
1089 {
1090  d->sixteenBitsImage->setChecked(settings.sixteenBitsImage);
1091 
1092  switch(settings.whiteBalance)
1093  {
1094  case RawDecodingSettings::CAMERA:
1095  d->whiteBalanceComboBox->setCurrentIndex(1);
1096  break;
1097  case RawDecodingSettings::AUTO:
1098  d->whiteBalanceComboBox->setCurrentIndex(2);
1099  break;
1100  case RawDecodingSettings::CUSTOM:
1101  d->whiteBalanceComboBox->setCurrentIndex(3);
1102  break;
1103  default:
1104  d->whiteBalanceComboBox->setCurrentIndex(0);
1105  break;
1106  }
1107  slotWhiteBalanceToggled(d->whiteBalanceComboBox->currentIndex());
1108 
1109  d->customWhiteBalanceSpinBox->setValue(settings.customWhiteBalance);
1110  d->customWhiteBalanceGreenSpinBox->setValue(settings.customWhiteBalanceGreen);
1111  d->fourColorCheckBox->setChecked(settings.RGBInterpolate4Colors);
1112  d->autoBrightnessBox->setChecked(settings.autoBrightness);
1113  d->fixColorsHighlightsBox->setChecked(settings.fixColorsHighlights);
1114 
1115  switch(settings.unclipColors)
1116  {
1117  case 0:
1118  d->unclipColorComboBox->setCurrentIndex(0);
1119  break;
1120  case 1:
1121  d->unclipColorComboBox->setCurrentIndex(1);
1122  break;
1123  case 2:
1124  d->unclipColorComboBox->setCurrentIndex(2);
1125  break;
1126  default: // Reconstruct Highlight method
1127  d->unclipColorComboBox->setCurrentIndex(3);
1128  d->reconstructSpinBox->setValue(settings.unclipColors-3);
1129  break;
1130  }
1131  slotUnclipColorActivated(d->unclipColorComboBox->currentIndex());
1132 
1133  d->dontStretchPixelsCheckBox->setChecked(settings.DontStretchPixels);
1134  d->brightnessSpinBox->setValue(settings.brightness);
1135  d->blackPointCheckBox->setChecked(settings.enableBlackPoint);
1136  d->blackPointSpinBox->setEnabled(settings.enableBlackPoint);
1137  d->blackPointSpinBox->setValue(settings.blackPoint);
1138  d->whitePointCheckBox->setChecked(settings.enableWhitePoint);
1139  d->whitePointSpinBox->setEnabled(settings.enableWhitePoint);
1140  d->whitePointSpinBox->setValue(settings.whitePoint);
1141 
1142  int q = settings.RAWQuality;
1143 
1144  // If Libraw do not support GPL2 pack, reset to BILINEAR.
1145  if (!KDcraw::librawUseGPL2DemosaicPack())
1146  {
1147  for (int i=RawDecodingSettings::DCB ; i <=RawDecodingSettings::LMMSE ; ++i)
1148  {
1149  if (q == i)
1150  {
1151  q = RawDecodingSettings::BILINEAR;
1152  kDebug() << "Libraw GPL2 pack not avaialble. Raw quality set to Bilinear";
1153  break;
1154  }
1155  }
1156  }
1157 
1158  // If Libraw do not support GPL3 pack, reset to BILINEAR.
1159  if (!KDcraw::librawUseGPL3DemosaicPack() && (q == RawDecodingSettings::AMAZE))
1160  {
1161  q = RawDecodingSettings::BILINEAR;
1162  kDebug() << "Libraw GPL3 pack not avaialble. Raw quality set to Bilinear";
1163  }
1164 
1165  d->RAWQualityComboBox->setCurrentIndex(q);
1166 
1167  switch(q)
1168  {
1169  case RawDecodingSettings::DCB:
1170  d->medianFilterPassesSpinBox->setValue(settings.dcbIterations);
1171  d->refineInterpolationBox->setChecked(settings.dcbEnhanceFl);
1172  break;
1173  case RawDecodingSettings::VCD_AHD:
1174  d->medianFilterPassesSpinBox->setValue(settings.eeciRefine);
1175  d->refineInterpolationBox->setChecked(settings.eeciRefine);
1176  break;
1177  default:
1178  d->medianFilterPassesSpinBox->setValue(settings.medianFilterPasses);
1179  d->refineInterpolationBox->setChecked(false); // option not used.
1180  break;
1181  }
1182 
1183  slotRAWQualityChanged(q);
1184 
1185  d->inputColorSpaceComboBox->setCurrentIndex((int)settings.inputColorSpace);
1186  slotInputColorSpaceChanged((int)settings.inputColorSpace);
1187  d->outputColorSpaceComboBox->setCurrentIndex((int)settings.outputColorSpace);
1188  slotOutputColorSpaceChanged((int)settings.outputColorSpace);
1189 
1190  d->noiseReductionComboBox->setCurrentIndex(settings.NRType);
1191  slotNoiseReductionChanged(settings.NRType);
1192  d->NRSpinBox1->setValue(settings.NRThreshold);
1193  d->NRSpinBox2->setValue(settings.NRChroThreshold);
1194 
1195  d->enableCACorrectionBox->setChecked(settings.enableCACorrection);
1196  d->caRedMultSpinBox->setValue(settings.caMultiplier[0]);
1197  d->caBlueMultSpinBox->setValue(settings.caMultiplier[1]);
1198  d->autoCACorrectionBox->setChecked((settings.caMultiplier[0] == 0.0) && (settings.caMultiplier[1] == 0.0));
1199  slotCACorrectionToggled(settings.enableCACorrection);
1200 
1201  d->expoCorrectionBox->setChecked(settings.expoCorrection);
1202  slotExposureCorrectionToggled(settings.expoCorrection);
1203  d->expoCorrectionShiftSpinBox->setValue(d->shiftExpoFromLinearToEv(settings.expoCorrectionShift));
1204  d->expoCorrectionHighlightSpinBox->setValue(settings.expoCorrectionHighlight);
1205 
1206  d->inIccUrlEdit->setUrl(KUrl(settings.inputProfile));
1207  d->outIccUrlEdit->setUrl(KUrl(settings.outputProfile));
1208 }
1209 
1210 RawDecodingSettings DcrawSettingsWidget::settings() const
1211 {
1212  RawDecodingSettings prm;
1213  prm.sixteenBitsImage = d->sixteenBitsImage->isChecked();
1214 
1215  switch(d->whiteBalanceComboBox->currentIndex())
1216  {
1217  case 1:
1218  prm.whiteBalance = RawDecodingSettings::CAMERA;
1219  break;
1220  case 2:
1221  prm.whiteBalance = RawDecodingSettings::AUTO;
1222  break;
1223  case 3:
1224  prm.whiteBalance = RawDecodingSettings::CUSTOM;
1225  break;
1226  default:
1227  prm.whiteBalance = RawDecodingSettings::NONE;
1228  break;
1229  }
1230 
1231  prm.customWhiteBalance = d->customWhiteBalanceSpinBox->value();
1232  prm.customWhiteBalanceGreen = d->customWhiteBalanceGreenSpinBox->value();
1233  prm.RGBInterpolate4Colors = d->fourColorCheckBox->isChecked();
1234  prm.autoBrightness = d->autoBrightnessBox->isChecked();
1235  prm.fixColorsHighlights = d->fixColorsHighlightsBox->isChecked();
1236 
1237  switch(d->unclipColorComboBox->currentIndex())
1238  {
1239  case 0:
1240  prm.unclipColors = 0;
1241  break;
1242  case 1:
1243  prm.unclipColors = 1;
1244  break;
1245  case 2:
1246  prm.unclipColors = 2;
1247  break;
1248  default: // Reconstruct Highlight method
1249  prm.unclipColors = d->reconstructSpinBox->value()+3;
1250  break;
1251  }
1252 
1253  prm.DontStretchPixels = d->dontStretchPixelsCheckBox->isChecked();
1254  prm.brightness = d->brightnessSpinBox->value();
1255  prm.enableBlackPoint = d->blackPointCheckBox->isChecked();
1256  prm.blackPoint = d->blackPointSpinBox->value();
1257  prm.enableWhitePoint = d->whitePointCheckBox->isChecked();
1258  prm.whitePoint = d->whitePointSpinBox->value();
1259 
1260  prm.RAWQuality = (RawDecodingSettings::DecodingQuality)d->RAWQualityComboBox->currentIndex();
1261  switch(prm.RAWQuality)
1262  {
1263  case RawDecodingSettings::DCB:
1264  prm.dcbIterations = d->medianFilterPassesSpinBox->value();
1265  prm.dcbEnhanceFl = d->refineInterpolationBox->isChecked();
1266  break;
1267  case RawDecodingSettings::VCD_AHD:
1268  prm.esMedPasses = d->medianFilterPassesSpinBox->value();
1269  prm.eeciRefine = d->refineInterpolationBox->isChecked();
1270  break;
1271  default:
1272  prm.medianFilterPasses = d->medianFilterPassesSpinBox->value();
1273  break;
1274  }
1275 
1276  prm.NRType = (RawDecodingSettings::NoiseReduction)d->noiseReductionComboBox->currentIndex();
1277  switch (prm.NRType)
1278  {
1279  case RawDecodingSettings::NONR:
1280  {
1281  prm.NRThreshold = 0;
1282  prm.NRChroThreshold = 0;
1283  break;
1284  }
1285  case RawDecodingSettings::WAVELETSNR:
1286  case RawDecodingSettings::FBDDNR:
1287  case RawDecodingSettings::LINENR:
1288  {
1289  prm.NRThreshold = d->NRSpinBox1->value();
1290  prm.NRChroThreshold = 0;
1291  break;
1292  }
1293  default: // IMPULSENR
1294  {
1295  prm.NRThreshold = d->NRSpinBox1->value();
1296  prm.NRChroThreshold = d->NRSpinBox2->value();
1297  break;
1298  }
1299  }
1300 
1301  prm.enableCACorrection = d->enableCACorrectionBox->isChecked();
1302  prm.caMultiplier[0] = d->caRedMultSpinBox->value();
1303  prm.caMultiplier[1] = d->caBlueMultSpinBox->value();
1304 
1305  prm.expoCorrection = d->expoCorrectionBox->isChecked();
1306  prm.expoCorrectionShift = d->shiftExpoFromEvToLinear(d->expoCorrectionShiftSpinBox->value());
1307  prm.expoCorrectionHighlight = d->expoCorrectionHighlightSpinBox->value();
1308 
1309  prm.inputColorSpace = (RawDecodingSettings::InputColorSpace)(d->inputColorSpaceComboBox->currentIndex());
1310  prm.outputColorSpace = (RawDecodingSettings::OutputColorSpace)(d->outputColorSpaceComboBox->currentIndex());
1311  prm.inputProfile = d->inIccUrlEdit->url().toLocalFile();
1312  prm.outputProfile = d->outIccUrlEdit->url().toLocalFile();
1313 
1314  return prm;
1315 }
1316 
1317 void DcrawSettingsWidget::writeSettings(KConfigGroup& group)
1318 {
1319  RawDecodingSettings prm = settings();
1320  prm.writeSettings(group);
1321  RExpanderBox::writeSettings(group);
1322 }
1323 
1324 void DcrawSettingsWidget::readSettings(KConfigGroup& group)
1325 {
1326  RawDecodingSettings prm;
1327  prm.readSettings(group);
1328  setSettings(prm);
1329  RExpanderBox::readSettings(group);
1330 }
1331 
1332 } // NameSpace KDcrawIface
KDcrawIface::RawDecodingSettings::whiteBalance
WhiteBalance whiteBalance
White balance type to use.
Definition: rawdecodingsettings.h:217
KDcrawIface::RawDecodingSettings::unclipColors
int unclipColors
Unclip Highlight color level: 0 = Clip all highlights to solid white.
Definition: rawdecodingsettings.h:242
KDcrawIface::RawDecodingSettings::RAWCOLOR
Definition: rawdecodingsettings.h:161
KDcrawIface::RawDecodingSettings::AFD
Definition: rawdecodingsettings.h:99
KDcrawIface::RawDecodingSettings::NONR
Definition: rawdecodingsettings.h:132
QWidget
KDcrawIface::RawDecodingSettings::brightness
double brightness
Brightness of output image.
Definition: rawdecodingsettings.h:276
KDcrawIface::KDcraw::librawVersion
static QString librawVersion()
Return LibRaw version string.
Definition: kdcraw.cpp:525
KDcrawIface::DcrawSettingsWidget::BLACKWHITEPOINTS
Definition: dcrawsettingswidget.h:62
KDcrawIface::RawDecodingSettings::DCB
Definition: rawdecodingsettings.h:97
KDcrawIface::RawDecodingSettings::dcbIterations
int dcbIterations
For DCB interpolation.
Definition: rawdecodingsettings.h:328
rnuminput.h
===========================================================This file is a part of digiKam project htt...
KDcrawIface::RawDecodingSettings::eeciRefine
bool eeciRefine
For VCD_AHD interpolation.
Definition: rawdecodingsettings.h:338
KDcrawIface::RawDecodingSettings::PROPHOTO
Definition: rawdecodingsettings.h:165
KDcrawIface::DcrawSettingsWidget::brightnessSettingsIsEnabled
bool brightnessSettingsIsEnabled() const
Definition: dcrawsettingswidget.cpp:1083
KDcrawIface::RawDecodingSettings::RGBInterpolate4Colors
bool RGBInterpolate4Colors
Turn on RAW file decoding using RGB interpolation as four colors.
Definition: rawdecodingsettings.h:226
KDcrawIface::RawDecodingSettings::AHD
Definition: rawdecodingsettings.h:95
KDcrawIface::RawDecodingSettings::PPG
Definition: rawdecodingsettings.h:94
KDcrawIface::RExpanderBox::removeItem
void removeItem(int index)
Definition: rexpanderbox.cpp:654
KDcrawIface::RIntNumInput
Definition: rnuminput.h:43
QGridLayout::addWidget
void addWidget(QWidget *widget, int row, int column, QFlags< Qt::AlignmentFlag > alignment)
KDcrawIface::RawDecodingSettings::AUTO
Definition: rawdecodingsettings.h:118
KDcrawIface::DcrawSettingsWidget::SIXTEENBITS
Definition: dcrawsettingswidget.h:59
KDcrawIface::DcrawSettingsWidget::readSettings
void readSettings(KConfigGroup &group)
Definition: dcrawsettingswidget.cpp:1324
KDcrawIface::RawDecodingSettings::inputProfile
QString inputProfile
Path to custom input ICC profile to define the camera's raw colorspace.
Definition: rawdecodingsettings.h:301
QScrollArea::widget
QWidget * widget() const
KDcrawIface::RawDecodingSettings::RAWQuality
DecodingQuality RAWQuality
RAW quality decoding factor value.
Definition: rawdecodingsettings.h:247
KDcrawIface::RawDecodingSettings::LMMSE
Definition: rawdecodingsettings.h:102
QWidget::setMinimumWidth
void setMinimumWidth(int minw)
KDcrawIface::RawDecodingSettings::expoCorrectionHighlight
double expoCorrectionHighlight
Amount of highlight preservation for exposure correction before interpolation in E.V.
Definition: rawdecodingsettings.h:364
KDcrawIface::RawDecodingSettings::esMedPasses
int esMedPasses
Use edge-sensitive median filtering for artifact supression after VCD demosaicing.
Definition: rawdecodingsettings.h:344
KDcrawIface::RawDecodingSettings::CUSTOM
Definition: rawdecodingsettings.h:119
KDcrawIface::RawDecodingSettings::outputProfile
QString outputProfile
Path to custom output ICC profile to define the color workspace.
Definition: rawdecodingsettings.h:310
QGridLayout
KDcrawIface::DcrawSettingsWidget::setEnabledBrightnessSettings
void setEnabledBrightnessSettings(bool b)
Definition: dcrawsettingswidget.cpp:1077
KDcrawIface::RawDecodingSettings::EMBEDDED
Definition: rawdecodingsettings.h:147
KDcrawIface::RawDecodingSettings::sixteenBitsImage
bool sixteenBitsImage
Turn on RAW file decoding in 16 bits per color per pixel instead 8 bits.
Definition: rawdecodingsettings.h:207
KDcrawIface::RawDecodingSettings::outputColorSpace
OutputColorSpace outputColorSpace
The output color profile used to decoded RAW data.
Definition: rawdecodingsettings.h:306
KDcrawIface::RExpanderBox::count
int count() const
Definition: rexpanderbox.cpp:685
QGridLayout::setSpacing
void setSpacing(int spacing)
KDcrawIface::KDcraw::librawUseGPL3DemosaicPack
static int librawUseGPL3DemosaicPack()
Return true or false if LibRaw use Demosaic Pack GPL3 or not.
Definition: kdcraw.cpp:569
KDcrawIface::RawDecodingSettings::dcbEnhanceFl
bool dcbEnhanceFl
Turn on the DCB interpolation with enhance interpolated colors.
Definition: rawdecodingsettings.h:332
KDcrawIface::RawDecodingSettings::NONE
Definition: rawdecodingsettings.h:116
QWidget::width
int width() const
rexpanderbox.h
===========================================================This file is a part of digiKam project htt...
KDcrawIface::RawDecodingSettings::NRThreshold
int NRThreshold
Noise reduction threshold value.
Definition: rawdecodingsettings.h:261
KDcrawIface::DcrawSettingsWidget::POSTPROCESSING
Definition: dcrawsettingswidget.h:61
KDcrawIface::RawDecodingSettings::InputColorSpace
InputColorSpace
Input color profile used to decoded image NOINPUTCS: No input color profile.
Definition: rawdecodingsettings.h:144
KDcrawIface::RawDecodingSettings::writeSettings
void writeSettings(KConfigGroup &group)
Definition: rawdecodingsettings.cpp:312
KDcrawIface::RDoubleNumInput
Definition: rnuminput.h:84
QWidget::setEnabled
void setEnabled(bool)
KDcrawIface::RawDecodingSettings::enableCACorrection
bool enableCACorrection
Turn on chromatic aberrations correction.
Definition: rawdecodingsettings.h:265
KDcrawIface::RExpanderBox::addStretch
void addStretch()
Definition: rexpanderbox.cpp:612
KDcrawIface::DcrawSettingsWidget::signalSixteenBitsImageToggled
void signalSixteenBitsImageToggled(bool)
QGridLayout::setRowStretch
void setRowStretch(int row, int stretch)
KDcrawIface::RawDecodingSettings::DecodingQuality
DecodingQuality
RAW decoding Interpolation methods.
Definition: rawdecodingsettings.h:89
KDcrawIface::RawDecodingSettings::PL_AHD
Definition: rawdecodingsettings.h:98
QCheckBox
QObject::setObjectName
void setObjectName(const QString &name)
KDcrawIface::RawDecodingSettings::caMultiplier
double caMultiplier[2]
Magnification factor for Red and Blue layers.
Definition: rawdecodingsettings.h:272
KDcrawIface::RExpanderBox::writeSettings
virtual void writeSettings(KConfigGroup &group)
Definition: rexpanderbox.cpp:769
KDcrawIface::RawDecodingSettings::whitePoint
int whitePoint
White Point value of output image.
Definition: rawdecodingsettings.h:292
KDcrawIface::RawDecodingSettings::ADOBERGB
Definition: rawdecodingsettings.h:163
KDcrawIface::RawDecodingSettings::blackPoint
int blackPoint
Black Point value of output image.
Definition: rawdecodingsettings.h:284
QString
KDcrawIface::RExpanderBox::addItem
void addItem(QWidget *const w, const QPixmap &pix, const QString &txt, const QString &objName, bool expandBydefault)
Add RLabelExpander item at end of box layout with these settings : 'w' : the widget hosted by RLabelE...
Definition: rexpanderbox.cpp:600
QLayout::setMargin
void setMargin(int margin)
KDcrawIface::RComboBox
Definition: rcombobox.h:42
KDcrawIface::RawDecodingSettings::CUSTOMINPUTCS
Definition: rawdecodingsettings.h:148
KDcrawIface::DcrawSettingsWidget::COLORSPACE
Definition: dcrawsettingswidget.h:60
KDcrawIface::RawDecodingSettings::AMAZE
Definition: rawdecodingsettings.h:104
KDcrawIface::RawDecodingSettings::NOINPUTCS
Definition: rawdecodingsettings.h:146
KDcrawIface::RawDecodingSettings::OutputColorSpace
OutputColorSpace
Output RGB color space used to decoded image RAWCOLOR: No output color profile (Linear RAW)...
Definition: rawdecodingsettings.h:159
KDcrawIface::DcrawSettingsWidget::setSettings
void setSettings(const RawDecodingSettings &settings)
Definition: dcrawsettingswidget.cpp:1088
KDcrawIface::DcrawSettingsWidget::~DcrawSettingsWidget
virtual ~DcrawSettingsWidget()
Definition: dcrawsettingswidget.cpp:873
KDcrawIface::RawDecodingSettings::IMPULSENR
Definition: rawdecodingsettings.h:136
KDcrawIface::RawDecodingSettings::CAMERA
Definition: rawdecodingsettings.h:117
KDcrawIface::DcrawSettingsWidget::updateMinimumWidth
void updateMinimumWidth()
Definition: dcrawsettingswidget.cpp:878
KDcrawIface::RawDecodingSettings::customWhiteBalance
int customWhiteBalance
The temperature and the green multiplier of the custom white balance.
Definition: rawdecodingsettings.h:221
kdcraw.h
===========================================================This file is a part of digiKam project htt...
KDcrawIface::RawDecodingSettings::NRChroThreshold
int NRChroThreshold
For IMPULSENR Noise reduction.
Definition: rawdecodingsettings.h:349
KDcrawIface::DcrawSettingsWidget::setup
void setup(int advSettings)
Definition: dcrawsettingswidget.cpp:211
KDcrawIface::DcrawSettingsWidget::resetToDefault
void resetToDefault()
Definition: dcrawsettingswidget.cpp:906
KDcrawIface::RawDecodingSettings::VCD
Definition: rawdecodingsettings.h:100
KDcrawIface::RawDecodingSettings::enableBlackPoint
bool enableBlackPoint
Turn on the black point setting to decode RAW image.
Definition: rawdecodingsettings.h:280
KDcrawIface::RawDecodingSettings::FBDDNR
Definition: rawdecodingsettings.h:134
QLatin1String
KDcrawIface::RawDecodingSettings::LINENR
Definition: rawdecodingsettings.h:135
KDcrawIface::KDcraw::librawUseGPL2DemosaicPack
static int librawUseGPL2DemosaicPack()
Return true or false if LibRaw use Demosaic Pack GPL2 or not.
Definition: kdcraw.cpp:556
KDcrawIface::RawDecodingSettings::expoCorrection
bool expoCorrection
Turn on the Exposure Correction before interpolation.
Definition: rawdecodingsettings.h:353
KDcrawIface::DcrawSettingsWidget::DcrawSettingsWidget
DcrawSettingsWidget(QWidget *const parent, int advSettings=COLORSPACE)
Definition: dcrawsettingswidget.cpp:205
KDcrawIface::DcrawSettingsWidget::COLORMANAGEMENT
Definition: dcrawsettingswidget.h:70
QWidget::QWidget
QWidget(QWidget *parent, QFlags< Qt::WindowType > f)
KDcrawIface::DcrawSettingsWidget::outputProfileUrlEdit
KUrlRequester * outputProfileUrlEdit() const
Definition: dcrawsettingswidget.cpp:901
KDcrawIface::RawDecodingSettings::readSettings
void readSettings(KConfigGroup &group)
Methods to read/write settings from/to a config file.
Definition: rawdecodingsettings.cpp:269
KDcrawIface::RawDecodingSettings::VCD_AHD
Definition: rawdecodingsettings.h:101
KDcrawIface::RawDecodingSettings::customWhiteBalanceGreen
double customWhiteBalanceGreen
Definition: rawdecodingsettings.h:222
KDcrawIface::DcrawSettingsWidget::writeSettings
void writeSettings(KConfigGroup &group)
Definition: dcrawsettingswidget.cpp:1317
KDcrawIface::RawDecodingSettings::inputColorSpace
InputColorSpace inputColorSpace
The input color profile used to decoded RAW data.
Definition: rawdecodingsettings.h:297
KDcrawIface::RawDecodingSettings::VNG
Definition: rawdecodingsettings.h:93
KDcrawIface::RawDecodingSettings
Definition: rawdecodingsettings.h:50
KDcrawIface::DcrawSettingsWidget::signalSettingsChanged
void signalSettingsChanged()
KDcrawIface::RawDecodingSettings::BILINEAR
Definition: rawdecodingsettings.h:92
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
KDcrawIface::RawDecodingSettings::SRGB
Definition: rawdecodingsettings.h:162
KDcrawIface::RExpanderBox
Definition: rexpanderbox.h:190
QLabel
KDcrawIface::RawDecodingSettings::NoiseReduction
NoiseReduction
Noise Reduction method to apply before demosaicing NONR: No noise reduction.
Definition: rawdecodingsettings.h:130
KDcrawIface::RawDecodingSettings::enableWhitePoint
bool enableWhitePoint
Turn on the white point setting to decode RAW image.
Definition: rawdecodingsettings.h:288
KDcrawIface::RExpanderBox::readSettings
virtual void readSettings(KConfigGroup &group)
Definition: rexpanderbox.cpp:755
KDcrawIface::RawDecodingSettings::DontStretchPixels
bool DontStretchPixels
For cameras with non-square pixels, do not stretch the image to its correct aspect ratio...
Definition: rawdecodingsettings.h:232
KDcrawIface::RawDecodingSettings::NRType
NoiseReduction NRType
Noise reduction method to apply before demosaicing.
Definition: rawdecodingsettings.h:256
KDcrawIface::RawDecodingSettings::WAVELETSNR
Definition: rawdecodingsettings.h:133
KDcrawIface::RawDecodingSettings::CUSTOMOUTPUTCS
Definition: rawdecodingsettings.h:166
KDcrawIface::RawDecodingSettings::expoCorrectionShift
double expoCorrectionShift
Shift of Exposure Correction before interpolation in linear scale.
Definition: rawdecodingsettings.h:358
KDcrawIface::RawDecodingSettings::WIDEGAMMUT
Definition: rawdecodingsettings.h:164
KDcrawIface::DcrawSettingsWidget::inputProfileUrlEdit
KUrlRequester * inputProfileUrlEdit() const
Definition: dcrawsettingswidget.cpp:896
KDcrawIface::RawDecodingSettings::medianFilterPasses
int medianFilterPasses
After interpolation, clean up color artifacts by repeatedly applying a 3x3 median filter to the R-G a...
Definition: rawdecodingsettings.h:252
KDcrawIface::RawDecodingSettings::fixColorsHighlights
bool fixColorsHighlights
If true, images with overblown channels are processed much more accurate, without 'pink clouds' (and ...
Definition: rawdecodingsettings.h:199
KDcrawIface::DcrawSettingsWidget::settings
RawDecodingSettings settings() const
Definition: dcrawsettingswidget.cpp:1210
KDcrawIface::RawDecodingSettings::autoBrightness
bool autoBrightness
If false, use a fixed white level, ignoring the image histogram.
Definition: rawdecodingsettings.h:203
rcombobox.h
===========================================================This file is a part of digiKam project htt...
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:19:36 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

libs/libkdcraw/libkdcraw

Skip menu "libs/libkdcraw/libkdcraw"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members

kdegraphics API Reference

Skip menu "kdegraphics API Reference"
  •     libkdcraw
  •     libkexiv2
  •     libkipi
  •     libksane
  • okular

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal