[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:21:59 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:21 -------
SVN commit 598735 by cgilles:

kipiplugins from trunk : MetadataEdit plugin: Exif Picture Adjustments informations editor: add Saturation settings

CCBUGS: 103255

 M  +31 -0     exifadjust.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/exifadjust.cpp #598734:598735
 @ -57,17 +57,21  @
         brightnessCheck  = 0;
         gainControlCheck = 0;
         contrastCheck    = 0;
+        saturationCheck  = 0;
         brightnessEdit   = 0;
         gainControlCB    = 0;
         contrastCB       = 0;
+        saturationCB     = 0;
     }
 
     QCheckBox      *brightnessCheck;
     QCheckBox      *gainControlCheck;
     QCheckBox      *contrastCheck;
+    QCheckBox      *saturationCheck;
 
     QComboBox      *gainControlCB;
     QComboBox      *contrastCB;
+    QComboBox      *saturationCB;
    
     KDoubleSpinBox *brightnessEdit;
 };
 @ -114,6 +118,18  @
     QWhatsThis::add(d->contrastCB, i18n("<p>Set here the direction of contrast processing "
                                         "applied by the camera to take the picture."));
 
+    // --------------------------------------------------------
+
+    d->saturationCheck = new QCheckBox(i18n("Saturation:"), parent);
+    d->saturationCB    = new QComboBox(false, parent);
+    d->saturationCB->insertItem(i18n("Normal"), 0);
+    d->saturationCB->insertItem(i18n("Low"),    1);
+    d->saturationCB->insertItem(i18n("High"),   2);
+    grid->addMultiCellWidget(d->saturationCheck, 3, 3, 0, 0);
+    grid->addMultiCellWidget(d->saturationCB, 3, 3, 2, 2);
+    QWhatsThis::add(d->saturationCB, i18n("<p>Set here the direction of saturation processing "
+                                          "applied by the camera to take the picture."));
+
     grid->setColStretch(1, 10);                     
     grid->setRowStretch(6, 10);                     
 
 @ -128,6 +144,9  @
     connect(d->contrastCheck, SIGNAL(toggled(bool)),
             d->contrastCB, SLOT(setEnabled(bool)));
 
+    connect(d->saturationCheck, SIGNAL(toggled(bool)),
+            d->saturationCB, SLOT(setEnabled(bool)));
+
     // --------------------------------------------------------
     
     readMetadata(exifData);
 @ -165,6 +184,13  @
         d->contrastCheck->setChecked(true);
     }
     d->contrastCB->setEnabled(d->contrastCheck->isChecked());
+
+    if (exiv2Iface.getExifTagLong("Exif.Photo.Saturation", val))
+    {
+        d->saturationCB->setCurrentItem(val);
+        d->saturationCheck->setChecked(true);
+    }
+    d->saturationCB->setEnabled(d->saturationCheck->isChecked());
 }
 
 void EXIFAdjust::applyMetadata(QByteArray& exifData)
 @ -191,6 +217,11  @
     else
         exiv2Iface.removeExifTag("Exif.Photo.Contrast");
 
+    if (d->saturationCheck->isChecked())
+        exiv2Iface.setExifTagLong("Exif.Photo.Saturation", d->saturationCB->currentItem());
+    else
+        exiv2Iface.removeExifTag("Exif.Photo.Saturation");
+
     exifData = exiv2Iface.getExif();
 }



More information about the Digikam-devel mailing list