File indexing completed on 2025-03-09 04:09:46

0001 /** ===========================================================
0002  * @file
0003  *
0004  * This file is a part of digiKam project
0005  * <a href="https://www.digikam.org">https://www.digikam.org</a>
0006  *
0007  * @date   2006-09-13
0008  * @brief  LibRaw settings widgets
0009  *
0010  * @author Copyright (C) 2006-2015 by Gilles Caulier
0011  *         <a href="mailto:caulier dot gilles at gmail dot com">caulier dot gilles at gmail dot com</a>
0012  * @author Copyright (C) 2006-2011 by Marcel Wiesweg
0013  *         <a href="mailto:marcel dot wiesweg at gmx dot de">marcel dot wiesweg at gmx dot de</a>
0014  * @author Copyright (C) 2007-2008 by Guillaume Castagnino
0015  *         <a href="mailto:casta at xwing dot info">casta at xwing dot info</a>
0016  *
0017  * This program is free software; you can redistribute it
0018  * and/or modify it under the terms of the GNU General
0019  * Public License as published by the Free Software Foundation;
0020  * either version 2, or (at your option)
0021  * any later version.
0022  *
0023  * This program is distributed in the hope that it will be useful,
0024  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0025  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0026  * GNU General Public License for more details.
0027  *
0028  * ============================================================ */
0029 
0030 #ifndef DCRAW_SETTINGS_WIDGET_H
0031 #define DCRAW_SETTINGS_WIDGET_H
0032 
0033 // Qt includes
0034 
0035 #include <QtCore/QString>
0036 
0037 // KDE includes
0038 
0039 #include <kconfiggroup.h>
0040 
0041 // Local includes
0042 
0043 
0044 #include "rawdecodingsettings.h"
0045 #include "rexpanderbox.h"
0046 #include "rwidgetutils.h"
0047 
0048 namespace KDcrawIface
0049 {
0050 
0051 class  DcrawSettingsWidget : public RExpanderBox
0052 {
0053     Q_OBJECT
0054 
0055 public:
0056 
0057     enum AdvancedSettingsOptions
0058     {
0059         SIXTEENBITS      = 0x00000001,
0060         COLORSPACE       = 0x00000002,
0061         POSTPROCESSING   = 0x00000004,
0062         BLACKWHITEPOINTS = 0x00000008
0063     };
0064 
0065     enum SettingsTabs
0066     {
0067         DEMOSAICING = 0,
0068         WHITEBALANCE,
0069         CORRECTIONS,
0070         COLORMANAGEMENT
0071     };
0072 
0073 public:
0074 
0075     /**
0076      * @param advSettings the default value is COLORSPACE
0077      */
0078     explicit DcrawSettingsWidget(QWidget* const parent, int advSettings = COLORSPACE);
0079     ~DcrawSettingsWidget() override;
0080 
0081     RFileSelector* inputProfileUrlEdit()  const;
0082     RFileSelector* outputProfileUrlEdit() const;
0083 
0084     void setup(int advSettings);
0085 
0086     void setEnabledBrightnessSettings(bool b);
0087     bool brightnessSettingsIsEnabled() const;
0088 
0089     void updateMinimumWidth();
0090 
0091     void resetToDefault();
0092 
0093     void setSettings(const RawDecodingSettings& settings);
0094     RawDecodingSettings settings() const;
0095 
0096     void readSettings(KConfigGroup& group) override;
0097     void writeSettings(KConfigGroup& group) override;
0098 
0099 Q_SIGNALS:
0100 
0101     void signalSixteenBitsImageToggled(bool);
0102     void signalSettingsChanged();
0103 
0104 private Q_SLOTS:
0105 
0106     void slotWhiteBalanceToggled(int);
0107     void slotsixteenBitsImageToggled(bool);
0108     void slotUnclipColorActivated(int);
0109     void slotNoiseReductionChanged(int);
0110     void slotCACorrectionToggled(bool);
0111     void slotExposureCorrectionToggled(bool);
0112     void slotAutoCAToggled(bool);
0113     void slotInputColorSpaceChanged(int);
0114     void slotOutputColorSpaceChanged(int);
0115     void slotRAWQualityChanged(int);
0116     void slotExpoCorrectionShiftChanged(double);
0117 
0118 private:
0119 
0120     class Private;
0121     Private* const d;
0122 };
0123 
0124 } // NameSpace KDcrawIface
0125 
0126 #endif /* DCRAW_SETTINGS_WIDGET_H */