[Kde-imaging] extragear/libs/kipi-plugins/rawconverter
Gilles Caulier
caulier.gilles at free.fr
Thu Sep 14 13:14:21 CEST 2006
SVN commit 584218 by cgilles:
kipi-plugins from trunk : Raw Converter : add 'Default' button to set all settings to default values.
CCMAIL: kde-imaging at kde.org
CCBUGS: 107905, 128394
M +11 -5 batchdialog.cpp
M +1 -0 batchdialog.h
M +15 -0 dcrawsettingswidget.cpp
M +2 -0 dcrawsettingswidget.h
M +6 -0 savesettingswidget.cpp
M +2 -0 savesettingswidget.h
M +11 -5 singledialog.cpp
M +4 -3 singledialog.h
--- trunk/extragear/libs/kipi-plugins/rawconverter/batchdialog.cpp #584217:584218
@@ -76,7 +76,7 @@
BatchDialog::BatchDialog(QWidget* /*parent*/, const QString& dcrawVersion)
: KDialogBase(0, 0, false, i18n("Raw Images Batch Converter"),
- Help|User1|User2|Close, Close, true,
+ Help|Default|User1|User2|Close, Close, true,
i18n("Con&vert"), i18n("&Abort"))
{
m_currentConvertItem = 0;
@@ -214,6 +214,12 @@
KDialogBase::slotClose();
}
+void BatchDialog::slotDefault()
+{
+ m_decodingSettingsBox->setDefaultSettings();
+ m_saveSettingsBox->setDefaultSettings();
+}
+
void BatchDialog::readSettings()
{
KConfig config("kipirc");
@@ -233,6 +239,10 @@
(RawDecodingSettings::DecodingQuality)config.readNumEntry("Decoding Quality",
(int)(RawDecodingSettings::BILINEAR)));
+ m_decodingSettingsBox->setOutputColorSpace(
+ (RawDecodingSettings::OutputColorSpace)config.readNumEntry("Output Color Space",
+ (int)(RawDecodingSettings::SRGB)));
+
m_saveSettingsBox->setFileFormat(
(RawDecodingSettings::OutputFormat)config.readNumEntry("Output Format",
(int)(RawDecodingSettings::PNG)));
@@ -241,10 +251,6 @@
(SaveSettingsWidget::ConflictRule)config.readNumEntry("Conflict",
(int)(SaveSettingsWidget::OVERWRITE)));
- m_decodingSettingsBox->setOutputColorSpace(
- (RawDecodingSettings::OutputColorSpace)config.readNumEntry("Output Color Space",
- (int)(RawDecodingSettings::SRGB)));
-
resize(configDialogSize(config, QString("Batch Raw Converter Dialog")));
}
--- trunk/extragear/libs/kipi-plugins/rawconverter/batchdialog.h #584217:584218
@@ -79,6 +79,7 @@
private slots:
+ void slotDefault();
void slotClose();
void slotHelp();
void slotUser1();
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawsettingswidget.cpp #584217:584218
@@ -285,6 +285,21 @@
delete d;
}
+void DcrawSettingsWidget::setDefaultSettings()
+{
+ setCameraWB(true);
+ setAutoColorBalance(true);
+ setFourColor(false);
+ setUnclipColor(0);
+ setSecondarySensor(false);
+ setNoiseReduction(false);
+ setBrightness(1.0);
+ setSigmaDomain(2.0);
+ setSigmaRange(4.0);
+ setQuality(RawDecodingSettings::BILINEAR);
+ setOutputColorSpace(RawDecodingSettings::SRGB);
+}
+
void DcrawSettingsWidget::slotUnclipColorActivated(int v)
{
if (v == 2) // Reconstruct Highlight method
--- trunk/extragear/libs/kipi-plugins/rawconverter/dcrawsettingswidget.h #584217:584218
@@ -67,6 +67,8 @@
void setQuality(RawDecodingSettings::DecodingQuality q);
void setOutputColorSpace(RawDecodingSettings::OutputColorSpace c);
+ void setDefaultSettings();
+
private slots:
void slotUnclipColorActivated(int);
--- trunk/extragear/libs/kipi-plugins/rawconverter/savesettingswidget.cpp #584217:584218
@@ -121,6 +121,12 @@
delete d;
}
+void SaveSettingsWidget::setDefaultSettings()
+{
+ setFileFormat(RawDecodingSettings::PNG);
+ setConflictRule(SaveSettingsWidget::OVERWRITE);
+}
+
RawDecodingSettings::OutputFormat SaveSettingsWidget::fileFormat()
{
return(RawDecodingSettings::OutputFormat)(d->formatComboBox->currentItem());
--- trunk/extragear/libs/kipi-plugins/rawconverter/savesettingswidget.h #584217:584218
@@ -57,6 +57,8 @@
void setFileFormat(RawDecodingSettings::OutputFormat f);
void setConflictRule(ConflictRule r);
+ void setDefaultSettings();
+
signals:
void signalSaveFormatChanged();
--- trunk/extragear/libs/kipi-plugins/rawconverter/singledialog.cpp #584217:584218
@@ -67,7 +67,7 @@
SingleDialog::SingleDialog(const QString& file, QWidget *parent, const QString& dcrawVersion)
: KDialogBase(parent, 0, false, i18n("Raw Image Converter"),
- Help|User1|User2|User3|Close, Close, true,
+ Help|Default|User1|User2|User3|Close, Close, true,
i18n("&Preview"), i18n("Con&vert"), i18n("&Abort"))
{
m_inputFile = file;
@@ -208,6 +208,12 @@
KDialogBase::slotClose();
}
+void SingleDialog::slotDefault()
+{
+ m_decodingSettingsBox->setDefaultSettings();
+ m_saveSettingsBox->setDefaultSettings();
+}
+
void SingleDialog::readSettings()
{
KConfig config("kipirc");
@@ -227,6 +233,10 @@
(RawDecodingSettings::DecodingQuality)config.readNumEntry("Decoding Quality",
(int)(RawDecodingSettings::BILINEAR)));
+ m_decodingSettingsBox->setOutputColorSpace(
+ (RawDecodingSettings::OutputColorSpace)config.readNumEntry("Output Color Space",
+ (int)(RawDecodingSettings::SRGB)));
+
m_saveSettingsBox->setFileFormat(
(RawDecodingSettings::OutputFormat)config.readNumEntry("Output Format",
(int)(RawDecodingSettings::PNG)));
@@ -235,10 +245,6 @@
(SaveSettingsWidget::ConflictRule)config.readNumEntry("Conflict",
(int)(SaveSettingsWidget::OVERWRITE)));
- m_decodingSettingsBox->setOutputColorSpace(
- (RawDecodingSettings::OutputColorSpace)config.readNumEntry("Output Color Space",
- (int)(RawDecodingSettings::SRGB)));
-
resize(configDialogSize(config, QString("Single Raw Converter Dialog")));
}
--- trunk/extragear/libs/kipi-plugins/rawconverter/singledialog.h #584217:584218
@@ -75,13 +75,14 @@
void processingFailed(const QString&);
private slots:
-
+
+ void slotDefault();
+ void slotClose();
void slotHelp();
void slotUser1();
void slotUser2();
void slotUser3();
- void slotClose();
-
+
void slotIdentify();
void slotPreviewBlinkTimerDone();
More information about the Kde-imaging
mailing list