[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:47:55 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:47 -------
SVN commit 598741 by cgilles:

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

CCBUGS: 103255

 M  +42 -12    exifadjust.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/exifadjust.cpp #598740:598741
 @ -54,16 +54,18  @
 
     EXIFAdjustPriv()
     {
-        brightnessCheck  = 0;
-        gainControlCheck = 0;
-        contrastCheck    = 0;
-        saturationCheck  = 0;
-        sharpnessCheck   = 0;
-        brightnessEdit   = 0;
-        gainControlCB    = 0;
-        contrastCB       = 0;
-        saturationCB     = 0;
-        sharpnessCB      = 0;
+        brightnessCheck     = 0;
+        gainControlCheck    = 0;
+        contrastCheck       = 0;
+        saturationCheck     = 0;
+        sharpnessCheck      = 0;
+        customRenderedCheck = 0;
+        brightnessEdit      = 0;
+        gainControlCB       = 0;
+        contrastCB          = 0;
+        saturationCB        = 0;
+        sharpnessCB         = 0;
+        customRenderedCB    = 0;
     }
 
     QCheckBox      *brightnessCheck;
 @ -71,11 +73,13  @
     QCheckBox      *contrastCheck;
     QCheckBox      *saturationCheck;
     QCheckBox      *sharpnessCheck;
+    QCheckBox      *customRenderedCheck;
 
     QComboBox      *gainControlCB;
     QComboBox      *contrastCB;
     QComboBox      *saturationCB;
     QComboBox      *sharpnessCB;
+    QComboBox      *customRenderedCB;
    
     KDoubleSpinBox *brightnessEdit;
 };
 @ -85,7 +89,7  @
 {
     d = new EXIFAdjustPriv;
 
-    QGridLayout* grid = new QGridLayout(parent, 5, 2, KDialog::spacingHint());
+    QGridLayout* grid = new QGridLayout(parent, 6, 2, KDialog::spacingHint());
 
     // --------------------------------------------------------
 
 @ -146,8 +150,19  @
     QWhatsThis::add(d->sharpnessCB, i18n("<p>Set here the direction of sharpness processing "
                                          "applied by the camera to take the picture."));
 
+    // --------------------------------------------------------
+
+    d->customRenderedCheck = new QCheckBox(i18n("Custom rendered:"), parent);
+    d->customRenderedCB    = new QComboBox(false, parent);
+    d->customRenderedCB->insertItem(i18n("Normal process"), 0);
+    d->customRenderedCB->insertItem(i18n("Custom process"), 1);
+    grid->addMultiCellWidget(d->customRenderedCheck, 5, 5, 0, 0);
+    grid->addMultiCellWidget(d->customRenderedCB, 5, 5, 2, 2);
+    QWhatsThis::add(d->customRenderedCB, i18n("<p>Set here the use of special processing on "
+                                              "image data, such as rendering geared to output."));
+
     grid->setColStretch(1, 10);                     
-    grid->setRowStretch(5, 10);                     
+    grid->setRowStretch(6, 10);                     
 
     // --------------------------------------------------------
 
 @ -166,6 +181,9  @
     connect(d->sharpnessCheck, SIGNAL(toggled(bool)),
             d->sharpnessCB, SLOT(setEnabled(bool)));
 
+    connect(d->customRenderedCheck, SIGNAL(toggled(bool)),
+            d->customRenderedCB, SLOT(setEnabled(bool)));
+
     // --------------------------------------------------------
     
     readMetadata(exifData);
 @ -217,6 +235,13  @
         d->sharpnessCheck->setChecked(true);
     }
     d->sharpnessCB->setEnabled(d->sharpnessCheck->isChecked());
+
+    if (exiv2Iface.getExifTagLong("Exif.Photo.CustomRendered", val))
+    {
+        d->customRenderedCB->setCurrentItem(val);
+        d->customRenderedCheck->setChecked(true);
+    }
+    d->customRenderedCB->setEnabled(d->customRenderedCheck->isChecked());
 }
 
 void EXIFAdjust::applyMetadata(QByteArray& exifData)
 @ -253,6 +278,11  @
     else
         exiv2Iface.removeExifTag("Exif.Photo.Sharpness");
 
+    if (d->customRenderedCheck->isChecked())
+        exiv2Iface.setExifTagLong("Exif.Photo.CustomRendered", d->customRenderedCB->currentItem());
+    else
+        exiv2Iface.removeExifTag("Exif.Photo.CustomRendered");
+
     exifData = exiv2Iface.getExif();
 }



More information about the Digikam-devel mailing list