[Digikam-devel] [Bug 103255] wish: *add* (not edit) EXIF headers like date, comment etc
Gilles Caulier
caulier.gilles at free.fr
Tue Oct 24 13:16:32 BST 2006
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
http://bugs.kde.org/show_bug.cgi?id=103255
------- Additional Comments From caulier.gilles free fr 2006-10-24 14:16 -------
SVN commit 598734 by cgilles:
kipiplugins from trunk : MetadataEdit plugin: Exif Picture Adjustments informations editor: add Contrast settings
CCBUGS: 103255
M +30 -0 exifadjust.cpp
--- trunk/extragear/libs/kipi-plugins/metadataedit/exifadjust.cpp #598733:598734
@ -56,14 +56,18 @
{
brightnessCheck = 0;
gainControlCheck = 0;
+ contrastCheck = 0;
brightnessEdit = 0;
gainControlCB = 0;
+ contrastCB = 0;
}
QCheckBox *brightnessCheck;
QCheckBox *gainControlCheck;
+ QCheckBox *contrastCheck;
QComboBox *gainControlCB;
+ QComboBox *contrastCB;
KDoubleSpinBox *brightnessEdit;
};
@ -98,7 +102,18 @
QWhatsThis::add(d->gainControlCB, i18n("<p>Set here the degree of overall image gain adjustment "
"used by camera to take the picture."));
+ // --------------------------------------------------------
+ d->contrastCheck = new QCheckBox(i18n("Contrast:"), parent);
+ d->contrastCB = new QComboBox(false, parent);
+ d->contrastCB->insertItem(i18n("Normal"), 0);
+ d->contrastCB->insertItem(i18n("Soft"), 1);
+ d->contrastCB->insertItem(i18n("Hard"), 2);
+ grid->addMultiCellWidget(d->contrastCheck, 2, 2, 0, 0);
+ grid->addMultiCellWidget(d->contrastCB, 2, 2, 2, 2);
+ QWhatsThis::add(d->contrastCB, i18n("<p>Set here the direction of contrast processing "
+ "applied by the camera to take the picture."));
+
grid->setColStretch(1, 10);
grid->setRowStretch(6, 10);
@ -110,6 +125,9 @
connect(d->gainControlCheck, SIGNAL(toggled(bool)),
d->gainControlCB, SLOT(setEnabled(bool)));
+ connect(d->contrastCheck, SIGNAL(toggled(bool)),
+ d->contrastCB, SLOT(setEnabled(bool)));
+
// --------------------------------------------------------
readMetadata(exifData);
@ -140,6 +158,13 @
d->gainControlCheck->setChecked(true);
}
d->gainControlCB->setEnabled(d->gainControlCheck->isChecked());
+
+ if (exiv2Iface.getExifTagLong("Exif.Photo.Contrast", val))
+ {
+ d->contrastCB->setCurrentItem(val);
+ d->contrastCheck->setChecked(true);
+ }
+ d->contrastCB->setEnabled(d->contrastCheck->isChecked());
}
void EXIFAdjust::applyMetadata(QByteArray& exifData)
@ -161,6 +186,11 @
else
exiv2Iface.removeExifTag("Exif.Photo.GainControl");
+ if (d->contrastCheck->isChecked())
+ exiv2Iface.setExifTagLong("Exif.Photo.Contrast", d->contrastCB->currentItem());
+ else
+ exiv2Iface.removeExifTag("Exif.Photo.Contrast");
+
exifData = exiv2Iface.getExif();
}
More information about the Digikam-devel
mailing list