File indexing completed on 2025-01-05 03:57:12
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * date : 2006-09-13 0007 * Description : Raw Decoder settings widgets 0008 * 0009 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2006-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de> 0011 * SPDX-FileCopyrightText: 2007-2008 by Guillaume Castagnino <casta at xwing dot info> 0012 * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * 0015 * ============================================================ */ 0016 0017 #ifndef DIGIKAM_DRAW_DECODER_WIDGET_H 0018 #define DIGIKAM_DRAW_DECODER_WIDGET_H 0019 0020 // Qt includes 0021 0022 #include <QString> 0023 0024 // Local includes 0025 0026 #include "drawdecodersettings.h" 0027 #include "dlayoutbox.h" 0028 #include "dexpanderbox.h" 0029 #include "dfileselector.h" 0030 #include "digikam_export.h" 0031 0032 class KConfigGroup; 0033 0034 namespace Digikam 0035 { 0036 0037 class DIGIKAM_EXPORT DRawDecoderWidget : public DExpanderBox 0038 { 0039 Q_OBJECT 0040 0041 public: 0042 0043 enum AdvancedSettingsOptions 0044 { 0045 SIXTEENBITS = 0x00000001, 0046 COLORSPACE = 0x00000002, 0047 POSTPROCESSING = 0x00000004, 0048 BLACKWHITEPOINTS = 0x00000008 0049 }; 0050 0051 enum SettingsTabs 0052 { 0053 DEMOSAICING = 0, 0054 WHITEBALANCE, 0055 CORRECTIONS, 0056 COLORMANAGEMENT 0057 }; 0058 0059 public: 0060 0061 /** 0062 * @param advSettings the default value is COLORSPACE 0063 */ 0064 explicit DRawDecoderWidget(QWidget* const parent, int advSettings = COLORSPACE); 0065 ~DRawDecoderWidget() override; 0066 0067 DFileSelector* inputProfileUrlEdit() const; 0068 DFileSelector* outputProfileUrlEdit() const; 0069 0070 void setup(int advSettings); 0071 0072 void setEnabledBrightnessSettings(bool b); 0073 bool brightnessSettingsIsEnabled() const; 0074 0075 void updateMinimumWidth(); 0076 0077 void resetToDefault(); 0078 0079 void setSettings(const DRawDecoderSettings& settings); 0080 DRawDecoderSettings settings() const; 0081 0082 void readSettings(KConfigGroup& group) override; 0083 void writeSettings(KConfigGroup& group) override; 0084 0085 static void readSettings(DRawDecoderSettings& setting, KConfigGroup& group); 0086 static void writeSettings(const DRawDecoderSettings& setting, KConfigGroup& group); 0087 0088 Q_SIGNALS: 0089 0090 void signalSixteenBitsImageToggled(bool); 0091 void signalSettingsChanged(); 0092 0093 private Q_SLOTS: 0094 0095 void slotWhiteBalanceToggled(int); 0096 void slotsixteenBitsImageToggled(bool); 0097 void slotUnclipColorActivated(int); 0098 void slotNoiseReductionChanged(int); 0099 void slotExposureCorrectionToggled(bool); 0100 void slotInputColorSpaceChanged(int); 0101 void slotOutputColorSpaceChanged(int); 0102 void slotRAWQualityChanged(int); 0103 void slotExpoCorrectionShiftChanged(double); 0104 0105 private: 0106 0107 class Private; 0108 Private* const d; 0109 }; 0110 0111 } // NameSpace Digikam 0112 0113 #endif // DIGIKAM_DRAW_DECODER_WIDGET_H