Bug 91812 - wishlist: viewer/editor for IPTC meta data
Summary: wishlist: viewer/editor for IPTC meta data
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Plugin-Generic-MetadataEdit (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-10-21 12:01 UTC by Nadav Kavalerchik
Modified: 2017-08-11 17:35 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 0.9.0


Attachments
Tag setting dialog mockup (9.84 KB, image/png)
2006-04-03 13:15 UTC, Loïc Brarda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nadav Kavalerchik 2004-10-21 12:01:01 UTC
Version:           0.7 beta1 (using KDE KDE 3.3.0)
OS:                Linux

viewer/editor for IPTC meta data for single and multiple images

( i use an excellent IPTC lib project called exiv2 you might want to use 
 http://home.arcor.de/ahuggel/exiv2/  )
Comment 1 Tristan. 2004-11-10 03:23:14 UTC
Agreed.

I move my images around a lot so I don't want to have tags etc stored within a database. Otherwise they'll be lost when I switch computers.
I'd love to have the tags stored in the image and mirrored in the SQL database. The Tags have precedence and the SQL is there just for speed.
Comment 2 franck-collineau 2004-11-27 14:32:11 UTC
*** This bug has been confirmed by popular vote. ***
Comment 3 Nadav Kavalerchik 2005-06-11 14:46:56 UTC
this lib can also help : http://libiptcdata.sourceforge.net/
Comment 4 ord 2005-07-22 11:05:56 UTC
In my opinion this more a requirement than a wish. Saving the tags in the image themself is the only reliable/good  solution. 

With time the photo management systems / OS /databases will change and most probably the tags will be lost. The photos will stay so the tags MUST be inside.
 
In addition the current implementation where the database has a link to an image path is far too easy to break since it is possible( == normal ) to access the image directly through the filesystem. 
Comment 5 Gerhard Kulzer 2005-07-22 15:26:28 UTC
I totally agree, we have to think of the future. Digital photography has only 
just begun, and we'll see many more people storing photos on their computer. 
And we want to to stay OPENSOURCE, which also means multi-access methods to 
data. 
Gerhard

[bugs.kde.org quoted mail]
Comment 6 Marc Cramdal 2005-08-28 23:50:45 UTC
I vote 20 for this bug.
First, standards are Good (tm) :-)
Then, for future usage.
Next, some time you exchange photos with friends. Then it allows to share comments as well.
Finally, one part of my familly run Windows (bahh :-)) and I share the photos between Windows and Linux. Picasa (from Google, Windows) stores comments as IPTC comments so I would like to be able to read them with Digikam (Linux).

So, it is a *really* good idea !

Marc.
Comment 7 Falk Dechent 2005-09-27 12:26:33 UTC
Well I'd love to have IPTC support, but:
it does not provide an possibility to store the names of the persons who are on the pictures.
I dont' know if the iptc people want to change this- but I really hope so
Comment 8 Christophe Muller 2005-12-01 18:12:33 UTC
I voted 20. IPTC is the right way to go for comments at least for now
(XMP will come later if it's public, open, and free of use enough :-).

To answer Marc Cramdal I agree that interoperability with Picasa would
be nice, but be aware that Picasa has problems with its own comments:
when modifying several times, they are not found in the IPTC fields any
more (!!?). Although this might just be a bug that will be fixed in
future releases.

An other good reason would be interoperability with some hand-written
scripts that would comment more or less automatically a bunch of pictures.
I like the fact that for music tags (Flac or Ogg or Mp3) you can work
on them at a script level and still they are recognized by nice GUIs.

At last, note that I would like IPTC (or XMP) to be the primary storage
but the tool's database could also be a cache of this data, just for
performance reasons (if needed! I have no idea..).

Anyway, keep up the good work! Digikam is a fantastic application! I really
think it could become one of the cornerstones of Linux as a "digital hub"
as Steve Jobs says, in par with Firefox, Gimp, Gaim, etc.

Cheers,
Christophe.

 = I keep trying to tell my boss that no, Satan is a tool =
 = of Linux, not the other way around.   --Anonymous      =
Comment 9 djib 2005-12-08 19:17:59 UTC
Hello,

I really agree, this would be AWESOME.

I have to say that I am using digikam and I'm very happy about it, but what if the database crashes ? what if I want to change program ?

Thanks !!!
Comment 10 caulier.gilles 2006-03-03 10:59:56 UTC
SVN commit 515268 by cgilles:

digikam from trunk : Metadata support using Exiv2 :

- New image properties sidebar tab named "Metadata" instead old "Exif". This area include :

* Standard Exif tags viewer.
* MarkerNote Exif tags viewer.
* IPTC records viewer.

- New capability to copy metadata in clipboard like text.
- New capability to print metadata.
- Tags name use the "user Friendly" conversion from Exiv2 instead the internal name provided by old Exif viewer based on libkexif.
- Capability to read metadata from CRW files (Canon RAW files)
- New class DMetadata to load/save metadata without loading image data. Actually JPEG, CRW, and PNG files are supported. About PNG (Exif and IPTC raw profiles generated by ImageMagick are supported.

To support new file formats (like NEF, MRW, TIFF, DNG, etc), new image file parsers must be added to Exiv2 library.

IMPORTANT: 

- Exiv2 do not support yet gettext for i18n rules. All informations in metadata viewers aren't yet i18n (tags name, tags values, and tags descriptions)
- Any tag names use internal Exiv2 name, not the user friendly text transformations. This point must be fixed in Exiv2 libs.

To 0.9.0, these tools are just metadata readers. Writting capabilities (metadata editors) will added later 0.9.0. The files in B.K.O directly or indirectly relevant of this commits are listed below :

*Pending:

103255
106103
115764
111560

*Partially fixed:

91812
96459
109253
110598
118501         

* To check before closing:

122264

* Fixed (can be closed):

103489
121371
105670
109319

CCMAIL: digikam-devel@kde.org,  Andreas Huggel <ahuggel@gmx.net>

CCBUGS: 103255, 106103, 115764, 111560, 91812, 96459, 109253, 110598, 118501, 122264, 103489, 121371, 105670, 109319


 M  +2 -1      libs/Makefile.am  
 M  +5 -4      libs/dimg/Makefile.am  
 M  +1 -1      libs/dimg/dimg.cpp  
 M  +1 -1      libs/dimg/dimg.h  
 M  +19 -1     libs/dimg/dimgloader.cpp  
 M  +4 -2      libs/dimg/dimgloader.h  
 M  +4 -61     libs/dimg/loaders/jpegloader.cpp  
 M  +5 -29     libs/dimg/loaders/pngloader.cpp  
 M  +2 -1      libs/dimg/loaders/rawloader.cpp  
 A             libs/dmetadata (directory)  
 A             libs/dmetadata/Makefile.am  
 A             libs/dmetadata/dmetadata.cpp   [License: GPL]
 A             libs/dmetadata/dmetadata.h   [License: GPL]
 A             libs/dmetadata/loaders (directory)  
 A             libs/dmetadata/loaders/Makefile.am  
 A             libs/dmetadata/loaders/dmetaloader.cpp   [License: GPL]
 A             libs/dmetadata/loaders/dmetaloader.h   [License: GPL]
 A             libs/dmetadata/loaders/jpegmetaloader.cpp   [License: GPL]
 A             libs/dmetadata/loaders/jpegmetaloader.h   [License: GPL]
 A             libs/dmetadata/loaders/pngmetaloader.cpp   [License: GPL]
 A             libs/dmetadata/loaders/pngmetaloader.h   [License: GPL]
 A             libs/dmetadata/loaders/rawmetaloader.cpp   [License: GPL]
 A             libs/dmetadata/loaders/rawmetaloader.h   [License: GPL]
 A             libs/dmetadata/loaders/tiffmetaloader.cpp   [License: GPL]
 A             libs/dmetadata/loaders/tiffmetaloader.h   [License: GPL]
 M  +3 -2      libs/imageproperties/Makefile.am  
 M  +82 -323   libs/imageproperties/imagepropertiesexiftab.cpp  
 M  +12 -25    libs/imageproperties/imagepropertiesexiftab.h  
 M  +19 -18    libs/imageproperties/imagepropertiessidebar.cpp  
 M  +10 -9     libs/imageproperties/imagepropertiessidebar.h  
 M  +27 -26    libs/imageproperties/imagepropertiessidebarcamgui.cpp  
 M  +2 -1      libs/imageproperties/imagepropertiessidebarcamgui.h  
 M  +16 -15    libs/imageproperties/imagepropertiessidebardb.cpp  
 M  +3 -1      libs/widgets/Makefile.am  
 A             libs/widgets/metadata (directory)  
 A             libs/widgets/metadata/Makefile.am  
 A             libs/widgets/metadata/exifwidget.cpp   [License: GPL]
 A             libs/widgets/metadata/exifwidget.h   [License: GPL]
 A             libs/widgets/metadata/iptcwidget.cpp   [License: GPL]
 A             libs/widgets/metadata/iptcwidget.h   [License: GPL]
 A             libs/widgets/metadata/makernotewidget.cpp   [License: GPL]
 A             libs/widgets/metadata/makernotewidget.h   [License: GPL]
 A             libs/widgets/metadata/mdkeylistviewitem.cpp   [License: GPL]
 A             libs/widgets/metadata/mdkeylistviewitem.h   [License: GPL]
 A             libs/widgets/metadata/metadatalistview.cpp   [License: GPL]
 A             libs/widgets/metadata/metadatalistview.h   [License: GPL]
 A             libs/widgets/metadata/metadatalistviewitem.cpp   [License: GPL]
 A             libs/widgets/metadata/metadatalistviewitem.h   [License: GPL]
 A             libs/widgets/metadata/metadatawidget.cpp   [License: GPL]
 A             libs/widgets/metadata/metadatawidget.h   [License: GPL]
 M  +24 -1     utilities/cameragui/cameraui.cpp  
Comment 11 Nadav Kavalerchik 2006-03-03 21:44:05 UTC
thank you thank you thank you so much :-)
Comment 12 Stefán Freyr Stefánsson 2006-03-21 15:36:37 UTC
absolutely brilliant!

When can this be expected to be released? I'm not familiar with the development cycle and what the current status is now, but just to put it in context with something I'm at least a bit more familiar with: is there any chance to see this feature in DigiKam in the next Kubuntu release (Dapper)?
Comment 13 caulier.gilles 2006-03-21 15:41:51 UTC
I think that digiKam and DigikamImagePlugins will be released in 0.9.0-beta1 during May 2006, depending of implementation progress. Actually, 85% is completed...

You can look on the previews on web project page :

http://www.digikam.org/?q=image

Gilles Caulier
Comment 14 Tom Albers 2006-03-21 17:03:25 UTC
Dapper is already in version freeze.
Comment 15 Loïc Brarda 2006-04-03 13:13:50 UTC
I was thinking about the way to mix digikam tags and IPTC tags. There could be setting in each tag to define if it is save to IPTC or not.
But we could go further and set in wich IPTC field we put it :
Example : For geographical information, we could save them in the country or sub-location or City.
I've made a short mockup of a tag setting dialog (I will attach it).
We could then enter IPTC infos simply by dropping tags on group of pictures.
Comment 16 Loïc Brarda 2006-04-03 13:15:40 UTC
Created attachment 15441 [details]
Tag setting dialog mockup
Comment 17 caulier.gilles 2006-04-07 10:44:46 UTC
digikam tags have already merged into IPTC. Look this file in B.K.O :

http://bugs.kde.org/show_bug.cgi?id=113997        

This file is now closed.

About to parse IPTC metadata at digikam startup, there is another file in B.K.O :

http://bugs.kde.org/show_bug.cgi?id=91811 

thanks to put your constructive comments at the right place.

Gilles Caulier
Comment 18 caulier.gilles 2006-10-12 21:23:44 UTC
SVN commit 594899 by cgilles:

kipiplugins from trunk : new plugin to edit EXIF photograph tags and IPTC tags of pictures
This tool can be used on single or batch mode.

Note: this plugin is under developement. It's not yet suitable. 

CCMAIL: digikam-devel@kde.org, kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 A             metadataedit (directory)  
 A             metadataedit/Makefile.am  
 A             metadataedit/iptccaption.cpp   [License: GPL]
 A             metadataedit/iptccaption.h   [License: GPL]
 A             metadataedit/iptccredits.cpp   [License: GPL]
 A             metadataedit/iptccredits.h   [License: GPL]
 A             metadataedit/iptceditdialog.cpp   [License: GPL]
 A             metadataedit/iptceditdialog.h   [License: GPL]
 A             metadataedit/kipiplugin_metadataedit.desktop  
 A             metadataedit/metadataeditdialog.cpp   [License: GPL]
 A             metadataedit/metadataeditdialog.h   [License: GPL]
 A             metadataedit/metadataitem.cpp   [License: GPL]
 A             metadataedit/metadataitem.h   [License: GPL]
 A             metadataedit/plugin_metadataedit.cpp   [License: GPL]
 A             metadataedit/plugin_metadataedit.h   [License: GPL]
Comment 19 caulier.gilles 2006-10-13 09:20:13 UTC
SVN commit 595026 by cgilles:

kipiplugins from trunk : MetadataEdit plugin:

"Et Voila"... The IPTC metadata can be changed/set from pictures. The IPTC data set to edit is not yet complete, but a more complete edit dialog coming soon...

CCMAIL: digikam-devel@kde.org, kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +17 -4     iptccaption.cpp  
 M  +18 -2     iptccredits.cpp  
 M  +1 -1      iptceditdialog.cpp  
 M  +5 -5      metadataeditdialog.cpp  
 M  +16 -7     metadataitem.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptccaption.cpp #595025:595026
@@ -36,6 +36,7 @@
 
 // Local includes.
 
+#include "exiv2iface.h"
 #include "iptccaption.h"
 #include "iptccaption.moc"
 
@@ -127,8 +128,7 @@
     vlay->addStretch();
                                          
     // --------------------------------------------------------
-    
-    
+        
     readMetadata(iptcData);
 }
 
@@ -137,12 +137,25 @@
     delete d;
 }
 
-void IPTCCaption::applyMetadata(QByteArray& iptcData)
+void IPTCCaption::readMetadata(QByteArray& iptcData)
 {
+    KIPIPlugins::Exiv2Iface exiv2Iface;
+    exiv2Iface.setIptc(iptcData);
+    d->captionEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Caption", false));
+    d->writerEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Writer", false));
+    d->headlineEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Headline", false));
+    d->specialInstructionEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.SpecialInstructions", false));
 }
 
-void IPTCCaption::readMetadata(QByteArray& iptcData)
+void IPTCCaption::applyMetadata(QByteArray& iptcData)
 {
+    KIPIPlugins::Exiv2Iface exiv2Iface;
+    exiv2Iface.setIptc(iptcData);
+    exiv2Iface.setIptcTagString("Iptc.Application2.Caption", d->captionEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Writer", d->writerEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Headline", d->headlineEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.SpecialInstructions", d->specialInstructionEdit->text());
+    iptcData = exiv2Iface.getIptc();
 }
 
 }  // namespace KIPIMetadataEditPlugin
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptccredits.cpp #595025:595026
@@ -35,6 +35,7 @@
 
 // Local includes.
 
+#include "exiv2iface.h"
 #include "iptccredits.h"
 #include "iptccredits.moc"
 
@@ -148,12 +149,27 @@
     delete d;
 }
 
-void IPTCCredits::applyMetadata(QByteArray& iptcData)
+void IPTCCredits::readMetadata(QByteArray& iptcData)
 {
+    KIPIPlugins::Exiv2Iface exiv2Iface;
+    exiv2Iface.setIptc(iptcData);
+    d->copyrightEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Copyright", false));
+    d->bylineEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Byline", false));
+    d->bylineTitleEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.BylineTitle", false));
+    d->creditEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Credit", false));
+    d->sourceEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Source", false));
 }
 
-void IPTCCredits::readMetadata(QByteArray& iptcData)
+void IPTCCredits::applyMetadata(QByteArray& iptcData)
 {
+    KIPIPlugins::Exiv2Iface exiv2Iface;
+    exiv2Iface.setIptc(iptcData);
+    exiv2Iface.setIptcTagString("Iptc.Application2.Copyright", d->copyrightEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Byline", d->bylineEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.BylineTitle", d->bylineTitleEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Credit", d->creditEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Source", d->sourceEdit->text());
+    iptcData = exiv2Iface.getIptc();
 }
 
 }  // namespace KIPIMetadataEditPlugin
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptceditdialog.cpp #595025:595026
@@ -128,7 +128,7 @@
 
 QByteArray IPTCEditDialog::getIPTCInfo()
 {
-    return QByteArray();
+    return d->iptcData;
 }
 
 void IPTCEditDialog::slotOk()
--- trunk/extragear/libs/kipi-plugins/metadataedit/metadataeditdialog.cpp #595025:595026
@@ -382,24 +382,24 @@
 
 void MetadataEditDialog::slotApply()
 {
-/*    KURL::List images;
+    KURL::List images;
 
     QListViewItemIterator it( d->listView );
     while ( it.current() ) 
     {
-        GPSListViewItem *item = (GPSListViewItem*) it.current();
+        MetadataItem *item = (MetadataItem*)it.current();
         d->listView->setSelected(item, true);
         d->listView->ensureItemVisible(item);
-        item->writeGPSInfoToFile();
+        item->writeMetadataToFile();
         images.append(item->getUrl());
 
-        // TODO : new libkipi method to store GPS info in host database.
+        // TODO : add libkipi method call to please the host to re-read metadata from pictures.
 
         ++it;
         kapp->processEvents();
     }
     
-    d->interface->refreshImages(images);*/
+    d->interface->refreshImages(images);
 }
 
 }  // NameSpace KIPIMetadataEditPlugin
--- trunk/extragear/libs/kipi-plugins/metadataedit/metadataitem.cpp #595025:595026
@@ -173,25 +173,34 @@
 {
     if (isEnabled() && isDirty())
     {
-/*        setPixmap(1, SmallIcon("run"));
+        setPixmap(1, SmallIcon("run"));
         KIPIPlugins::Exiv2Iface exiv2Iface;
         bool ret = exiv2Iface.load(d->url.path());
 
-        if (d->erase)
-            ret &= exiv2Iface.removeGPSInfo();
+        if (d->eraseExif)
+        {
+        //    ret &= exiv2Iface.removeExif();
+        }
         else
         {
-            ret &= exiv2Iface.setGPSInfo(d->gpsData.altitude(), 
-                                         d->gpsData.latitude(), 
-                                         d->gpsData.longitude());
+            ret &= exiv2Iface.setExif(d->exifData);
         }
 
+        if (d->eraseIptc)
+        {
+        //    ret &= exiv2Iface.removeIptc();
+        }
+        else
+        {
+            ret &= exiv2Iface.setIptc(d->iptcData);
+        }
+
         ret &= exiv2Iface.save(d->url.path());
         
         if (ret)
             setPixmap(1, SmallIcon("ok"));
         else
-            setPixmap(1, SmallIcon("cancel"));*/
+            setPixmap(1, SmallIcon("cancel"));
 	
 	    d->dirty = false;
     }
Comment 20 caulier.gilles 2006-10-13 11:16:44 UTC
SVN commit 595071 by cgilles:

kipiplugins from trunk : MetadataEdit plugin:

Added IPTC Status informations in IPTC Edit dialog

CCMAIL: kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +1 -1      Makefile.am  
 M  +1 -1      iptccredits.cpp  
 M  +10 -1     iptceditdialog.cpp  
 A             iptcstatus.cpp   [License: GPL]
 A             iptcstatus.h   [License: GPL]


--- trunk/extragear/libs/kipi-plugins/metadataedit/Makefile.am #595070:595071
@@ -11,7 +11,7 @@
 # Srcs for the plugin
 kipiplugin_metadataedit_la_SOURCES = plugin_metadataedit.cpp metadataeditdialog.cpp \
 	                                 metadataitem.cpp iptceditdialog.cpp iptccaption.cpp \
-	                                 iptccredits.cpp 
+	                                 iptccredits.cpp iptcstatus.cpp 
 
 # Libs needed by the plugin
 kipiplugin_metadataedit_la_LIBADD = $(top_builddir)/kipi-plugins/common/exiv2iface/libexiv2iface.la \
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptccredits.cpp #595070:595071
@@ -126,7 +126,7 @@
     d->sourceEdit  = new KLineEdit(parent);
     d->sourceEdit->setValidator(asciiValidator);
     d->sourceEdit->setMaxLength(32);
-    label4->setBuddy(d->sourceEdit);
+    label5->setBuddy(d->sourceEdit);
     vlay->addWidget(label5);
     vlay->addWidget(d->sourceEdit);
     QWhatsThis::add(d->sourceEdit, i18n("<p>Set here the original owner of content. "
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptceditdialog.cpp #595070:595071
@@ -40,6 +40,7 @@
 
 #include "iptccaption.h"
 #include "iptccredits.h"
+#include "iptcstatus.h"
 #include "iptceditdialog.h"
 #include "iptceditdialog.moc"
 
@@ -55,19 +56,22 @@
     {
         page_caption = 0;
         page_credits = 0;
+        page_status  = 0;
 
         captionPage  = 0;
         creditsPage  = 0;
+        statusPage   = 0;
     }
 
     QByteArray   iptcData;
 
     QFrame      *page_caption;
     QFrame      *page_credits;
+    QFrame      *page_status;
 
     IPTCCaption *captionPage;
     IPTCCredits *creditsPage;
-
+    IPTCStatus  *statusPage;
 };
 
 IPTCEditDialog::IPTCEditDialog(QWidget* parent, QByteArray iptcData, const QString& fileName)
@@ -87,6 +91,10 @@
                               BarIcon("identity", KIcon::SizeMedium));
     d->creditsPage  = new IPTCCredits(d->page_credits, d->iptcData);
 
+    d->page_status  = addPage(i18n("Status"), i18n("IPTC Status Informations"),
+                              BarIcon("messagebox_info", KIcon::SizeMedium));
+    d->statusPage   = new IPTCStatus(d->page_status, d->iptcData);
+
     readSettings();
     show();
 }
@@ -135,6 +143,7 @@
 {
     d->captionPage->applyMetadata(d->iptcData);
     d->creditsPage->applyMetadata(d->iptcData);
+    d->statusPage->applyMetadata(d->iptcData);
 
     saveSettings();
     accept();
Comment 21 caulier.gilles 2006-10-13 14:10:47 UTC
SVN commit 595152 by cgilles:

kipiplugins from trunk : MetadataEdit plugin:

Added IPTC Origin informations in IPTC Edit dialog

CCMAIL: kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +1 -1      Makefile.am  
 M  +11 -2     iptceditdialog.cpp  
 M  +0 -13     iptceditdialog.h  
 A             iptcorigin.cpp   [License: GPL]
 A             iptcorigin.h   [License: GPL]


--- trunk/extragear/libs/kipi-plugins/metadataedit/Makefile.am #595151:595152
@@ -11,7 +11,7 @@
 # Srcs for the plugin
 kipiplugin_metadataedit_la_SOURCES = plugin_metadataedit.cpp metadataeditdialog.cpp \
 	                                 metadataitem.cpp iptceditdialog.cpp iptccaption.cpp \
-	                                 iptccredits.cpp iptcstatus.cpp 
+	                                 iptccredits.cpp iptcstatus.cpp iptcorigin.cpp 
 
 # Libs needed by the plugin
 kipiplugin_metadataedit_la_LIBADD = $(top_builddir)/kipi-plugins/common/exiv2iface/libexiv2iface.la \
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptceditdialog.cpp #595151:595152
@@ -41,6 +41,7 @@
 #include "iptccaption.h"
 #include "iptccredits.h"
 #include "iptcstatus.h"
+#include "iptcorigin.h"
 #include "iptceditdialog.h"
 #include "iptceditdialog.moc"
 
@@ -57,10 +58,12 @@
         page_caption = 0;
         page_credits = 0;
         page_status  = 0;
+        page_origin  = 0;
 
         captionPage  = 0;
         creditsPage  = 0;
         statusPage   = 0;
+        originPage   = 0;
     }
 
     QByteArray   iptcData;
@@ -68,10 +71,12 @@
     QFrame      *page_caption;
     QFrame      *page_credits;
     QFrame      *page_status;
+    QFrame      *page_origin;
 
     IPTCCaption *captionPage;
     IPTCCredits *creditsPage;
     IPTCStatus  *statusPage;
+    IPTCOrigin  *originPage;
 };
 
 IPTCEditDialog::IPTCEditDialog(QWidget* parent, QByteArray iptcData, const QString& fileName)
@@ -95,6 +100,10 @@
                               BarIcon("messagebox_info", KIcon::SizeMedium));
     d->statusPage   = new IPTCStatus(d->page_status, d->iptcData);
 
+    d->page_origin  = addPage(i18n("Origin"), i18n("IPTC Origin Informations"),
+                              BarIcon("www", KIcon::SizeMedium));
+    d->originPage   = new IPTCOrigin(d->page_origin, d->iptcData);
+
     readSettings();
     show();
 }
@@ -121,7 +130,7 @@
 {
     KConfig config("kipirc");
     config.setGroup("Metadata Edit Settings");
-    showPage(config.readNumEntry("IPTC Edit Page", Caption));
+    showPage(config.readNumEntry("IPTC Edit Page", 0));
     resize(configDialogSize(config, QString("IPTC Edit Dialog")));
 }
 
@@ -144,7 +153,7 @@
     d->captionPage->applyMetadata(d->iptcData);
     d->creditsPage->applyMetadata(d->iptcData);
     d->statusPage->applyMetadata(d->iptcData);
-
+    d->originPage->applyMetadata(d->iptcData);
     saveSettings();
     accept();
 }
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptceditdialog.h #595151:595152
@@ -40,19 +40,6 @@
 
 public:
 
-    enum Page 
-    {
-        LastPageUsed = -1,
-        Caption = 0,
-        Keywords,
-        Categories,
-        Credits,
-        Status,
-        Origin
-    };
-
-public:
-
     IPTCEditDialog(QWidget* parent, QByteArray iptcData, const QString& fileName);
     ~IPTCEditDialog();
 
Comment 22 caulier.gilles 2006-10-13 15:49:58 UTC
SVN commit 595192 by cgilles:

kipiplugins from trunk : MetadataEdit plugin:

Added IPTC Date & Time informations in IPTC Edit dialog

CCMAIL: kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +2 -1      Makefile.am  
 A             iptcdatetime.cpp   [License: GPL]
 A             iptcdatetime.h   [License: GPL]
 M  +38 -28    iptceditdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/Makefile.am #595191:595192
@@ -11,7 +11,8 @@
 # Srcs for the plugin
 kipiplugin_metadataedit_la_SOURCES = plugin_metadataedit.cpp metadataeditdialog.cpp \
 	                                 metadataitem.cpp iptceditdialog.cpp iptccaption.cpp \
-	                                 iptccredits.cpp iptcstatus.cpp iptcorigin.cpp 
+	                                 iptccredits.cpp iptcstatus.cpp iptcorigin.cpp \
+	                                 iptcdatetime.cpp 
 
 # Libs needed by the plugin
 kipiplugin_metadataedit_la_LIBADD = $(top_builddir)/kipi-plugins/common/exiv2iface/libexiv2iface.la \
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptceditdialog.cpp #595191:595192
@@ -42,6 +42,7 @@
 #include "iptccredits.h"
 #include "iptcstatus.h"
 #include "iptcorigin.h"
+#include "iptcdatetime.h"
 #include "iptceditdialog.h"
 #include "iptceditdialog.moc"
 
@@ -55,28 +56,32 @@
 
     IPTCEditDialogDialogPrivate()
     {
-        page_caption = 0;
-        page_credits = 0;
-        page_status  = 0;
-        page_origin  = 0;
+        page_caption  = 0;
+        page_credits  = 0;
+        page_status   = 0;
+        page_origin   = 0;
+        page_datetime = 0;
 
-        captionPage  = 0;
-        creditsPage  = 0;
-        statusPage   = 0;
-        originPage   = 0;
+        captionPage   = 0;
+        creditsPage   = 0;
+        statusPage    = 0;
+        originPage    = 0;
+        datetimePage  = 0;
     }
 
     QByteArray   iptcData;
 
-    QFrame      *page_caption;
-    QFrame      *page_credits;
-    QFrame      *page_status;
-    QFrame      *page_origin;
+    QFrame       *page_caption;
+    QFrame       *page_credits;
+    QFrame       *page_status;
+    QFrame       *page_origin;
+    QFrame       *page_datetime;
 
-    IPTCCaption *captionPage;
-    IPTCCredits *creditsPage;
-    IPTCStatus  *statusPage;
-    IPTCOrigin  *originPage;
+    IPTCCaption  *captionPage;
+    IPTCCredits  *creditsPage;
+    IPTCStatus   *statusPage;
+    IPTCOrigin   *originPage;
+    IPTCDateTime *datetimePage;
 };
 
 IPTCEditDialog::IPTCEditDialog(QWidget* parent, QByteArray iptcData, const QString& fileName)
@@ -88,22 +93,26 @@
 
     setHelp("metadataedit", "kipi-plugins");
 
-    d->page_caption = addPage(i18n("Caption"), i18n("IPTC Caption Informations"),
-                              BarIcon("editclear", KIcon::SizeMedium));
-    d->captionPage  = new IPTCCaption(d->page_caption, d->iptcData);
+    d->page_caption  = addPage(i18n("Caption"), i18n("IPTC Caption Informations"),
+                               BarIcon("editclear", KIcon::SizeMedium));
+    d->captionPage   = new IPTCCaption(d->page_caption, d->iptcData);
 
-    d->page_credits = addPage(i18n("Credits"), i18n("IPTC Credits Informations"),
-                              BarIcon("identity", KIcon::SizeMedium));
-    d->creditsPage  = new IPTCCredits(d->page_credits, d->iptcData);
+    d->page_credits  = addPage(i18n("Credits"), i18n("IPTC Credits Informations"),
+                               BarIcon("identity", KIcon::SizeMedium));
+    d->creditsPage   = new IPTCCredits(d->page_credits, d->iptcData);
 
-    d->page_status  = addPage(i18n("Status"), i18n("IPTC Status Informations"),
-                              BarIcon("messagebox_info", KIcon::SizeMedium));
-    d->statusPage   = new IPTCStatus(d->page_status, d->iptcData);
+    d->page_status   = addPage(i18n("Status"), i18n("IPTC Status Informations"),
+                               BarIcon("messagebox_info", KIcon::SizeMedium));
+    d->statusPage    = new IPTCStatus(d->page_status, d->iptcData);
 
-    d->page_origin  = addPage(i18n("Origin"), i18n("IPTC Origin Informations"),
-                              BarIcon("www", KIcon::SizeMedium));
-    d->originPage   = new IPTCOrigin(d->page_origin, d->iptcData);
+    d->page_origin   = addPage(i18n("Origin"), i18n("IPTC Origin Informations"),
+                               BarIcon("www", KIcon::SizeMedium));
+    d->originPage    = new IPTCOrigin(d->page_origin, d->iptcData);
 
+    d->page_datetime = addPage(i18n("Date & Time"), i18n("IPTC Date and Time Informations"),
+                               BarIcon("today", KIcon::SizeMedium));
+    d->datetimePage  = new IPTCDateTime(d->page_datetime, d->iptcData);
+
     readSettings();
     show();
 }
@@ -154,6 +163,7 @@
     d->creditsPage->applyMetadata(d->iptcData);
     d->statusPage->applyMetadata(d->iptcData);
     d->originPage->applyMetadata(d->iptcData);
+    d->datetimePage->applyMetadata(d->iptcData);
     saveSettings();
     accept();
 }
Comment 23 caulier.gilles 2006-10-13 16:12:20 UTC
SVN commit 595205 by cgilles:

kipiplugins from trunk : MetadataEdit plugin:

Missing IPTC Contact and Subject tags.

CCMAIL: kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +25 -9     iptccaption.cpp  
 M  +16 -1     iptccredits.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptccaption.cpp #595204:595205
@@ -50,11 +50,13 @@
     IPTCCaptionPriv()
     {
         captionEdit            = 0;
+        subjectEdit            = 0;
         writerEdit             = 0;
         headlineEdit           = 0;
         specialInstructionEdit = 0;
     }
 
+    KLineEdit *subjectEdit;
     KLineEdit *writerEdit;
     KLineEdit *headlineEdit;
 
@@ -86,36 +88,48 @@
 
     // --------------------------------------------------------
 
-    QLabel *label2 = new QLabel(i18n("Caption Writer:"), parent);
+    QLabel *label2 = new QLabel(i18n("Subject:"), parent);
+    d->subjectEdit = new KLineEdit(parent);
+    d->subjectEdit->setValidator(asciiValidator);
+    d->subjectEdit->setMaxLength(236);
+    label2->setBuddy(d->subjectEdit);
+    vlay->addWidget(label2);
+    vlay->addWidget(d->subjectEdit);
+    QWhatsThis::add(d->subjectEdit, i18n("<p>Set here the structured definition of the subject. "
+                    "This field is limited to 236 ASCII characters."));
+
+    // --------------------------------------------------------
+
+    QLabel *label3 = new QLabel(i18n("Caption Writer:"), parent);
     d->writerEdit  = new KLineEdit(parent);
     d->writerEdit->setValidator(asciiValidator);
     d->writerEdit->setMaxLength(32);
-    label2->setBuddy(d->writerEdit);
-    vlay->addWidget(label2);
+    label3->setBuddy(d->writerEdit);
+    vlay->addWidget(label3);
     vlay->addWidget(d->writerEdit);
     QWhatsThis::add(d->writerEdit, i18n("<p>Set here the person responsible for caption. This field is limited "
                                         "to 32 ASCII characters."));
         
     // --------------------------------------------------------
 
-    QLabel *label3  = new QLabel(i18n("Headline:"), parent);
+    QLabel *label4  = new QLabel(i18n("Headline:"), parent);
     d->headlineEdit = new KLineEdit(parent);
     d->headlineEdit->setValidator(asciiValidator);
     d->headlineEdit->setMaxLength(256);
-    label3->setBuddy(d->headlineEdit);
-    vlay->addWidget(label3);
+    label4->setBuddy(d->headlineEdit);
+    vlay->addWidget(label4);
     vlay->addWidget(d->headlineEdit);
     QWhatsThis::add(d->headlineEdit, i18n("<p>Set here the content synopsis. This field is limited "
                                           "to 256 ASCII characters."));
 
     // --------------------------------------------------------
 
-    QLabel *label4            = new QLabel(i18n("Special Instructions:"), parent);
+    QLabel *label5            = new QLabel(i18n("Special Instructions:"), parent);
     d->specialInstructionEdit = new KTextEdit(parent);
 /*    d->specialInstructionEdit->setValidator(asciiValidator);
     d->specialInstructionEdit->setMaxLength(256);*/
-    label4->setBuddy(d->specialInstructionEdit);
-    vlay->addWidget(label4);
+    label5->setBuddy(d->specialInstructionEdit);
+    vlay->addWidget(label5);
     vlay->addWidget(d->specialInstructionEdit);
     QWhatsThis::add(d->specialInstructionEdit, i18n("<p>Set here the editorial usage instructions. "
                                                     "This field is limited to 256 ASCII characters."));
@@ -142,6 +156,7 @@
     KIPIPlugins::Exiv2Iface exiv2Iface;
     exiv2Iface.setIptc(iptcData);
     d->captionEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Caption", false));
+    d->subjectEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Subject", false));
     d->writerEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Writer", false));
     d->headlineEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Headline", false));
     d->specialInstructionEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.SpecialInstructions", false));
@@ -152,6 +167,7 @@
     KIPIPlugins::Exiv2Iface exiv2Iface;
     exiv2Iface.setIptc(iptcData);
     exiv2Iface.setIptcTagString("Iptc.Application2.Caption", d->captionEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Subject", d->subjectEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.Writer", d->writerEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.Headline", d->headlineEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.SpecialInstructions", d->specialInstructionEdit->text());
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptccredits.cpp #595204:595205
@@ -53,6 +53,7 @@
         bylineTitleEdit = 0;
         creditEdit      = 0;
         sourceEdit      = 0;
+        contactEdit     = 0;
     }
 
     KLineEdit *copyrightEdit;
@@ -60,6 +61,7 @@
     KLineEdit *bylineTitleEdit;
     KLineEdit *creditEdit;
     KLineEdit *sourceEdit;
+    KLineEdit *contactEdit;
 };
 
 IPTCCredits::IPTCCredits(QWidget* parent, QByteArray& iptcData)
@@ -134,6 +136,18 @@
 
     // --------------------------------------------------------
 
+    QLabel *label6 = new QLabel(i18n("Contact:"), parent);
+    d->contactEdit  = new KLineEdit(parent);
+    d->contactEdit->setValidator(asciiValidator);
+    d->contactEdit->setMaxLength(128);
+    label6->setBuddy(d->sourceEdit);
+    vlay->addWidget(label6);
+    vlay->addWidget(d->contactEdit);
+    QWhatsThis::add(d->contactEdit, i18n("<p>Set here the person or organisation to contact. "
+                                         "This field is limited to 128 ASCII characters."));
+
+    // --------------------------------------------------------
+
     QLabel *iptcNote = new QLabel(i18n("<b>Note: IPTC text tags only support printable "
                                        "ASCII characters set.</b>"), parent);
     vlay->addWidget(iptcNote);
@@ -158,6 +172,7 @@
     d->bylineTitleEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.BylineTitle", false));
     d->creditEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Credit", false));
     d->sourceEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Source", false));
+    d->contactEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.Contact", false));
 }
 
 void IPTCCredits::applyMetadata(QByteArray& iptcData)
@@ -168,7 +183,7 @@
     exiv2Iface.setIptcTagString("Iptc.Application2.Byline", d->bylineEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.BylineTitle", d->bylineTitleEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.Credit", d->creditEdit->text());
-    exiv2Iface.setIptcTagString("Iptc.Application2.Source", d->sourceEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.Source", d->sourceEdit->text());    exiv2Iface.setIptcTagString("Iptc.Application2.Contact", d->contactEdit->text());
     iptcData = exiv2Iface.getIptc();
 }
 
Comment 24 caulier.gilles 2006-10-13 16:32:44 UTC
SVN commit 595212 by cgilles:

kipiplugins from trunk : MetadataEdit plugin:

Missing IPTC LocationName and LocationCode tags.

CCMAIL: kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +36 -5     iptcorigin.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptcorigin.cpp #595211:595212
@@ -52,6 +52,8 @@
         provinceEdit      = 0;
         countryEdit       = 0;
         countryCodeEdit   = 0;
+        locationEdit      = 0;
+        locationCodeEdit  = 0;
         originalTransEdit = 0;
     }
 
@@ -61,6 +63,8 @@
     KLineEdit *provinceEdit;
     KLineEdit *countryEdit;
     KLineEdit *countryCodeEdit;
+    KLineEdit *locationEdit;
+    KLineEdit *locationCodeEdit;
     KLineEdit *originalTransEdit;
 };
 
@@ -89,6 +93,30 @@
 
     // --------------------------------------------------------
 
+    QLabel *label2  = new QLabel(i18n("Location:"), parent);
+    d->locationEdit = new KLineEdit(parent);
+    d->locationEdit->setValidator(asciiValidator);
+    d->locationEdit->setMaxLength(64);
+    label2->setBuddy(d->locationEdit);
+    grid->addMultiCellWidget(label2, 2, 2, 0, 0);
+    grid->addMultiCellWidget(d->locationEdit, 2, 2, 1, 2);
+    QWhatsThis::add(d->locationEdit, i18n("<p>Set here the full country name referenced by the content. "
+                                          "This field is limited to 64 ASCII characters."));
+
+    // --------------------------------------------------------
+
+    QLabel *label3      = new QLabel(i18n("Location code:"), parent);
+    d->locationCodeEdit = new KLineEdit(parent);
+    d->locationCodeEdit->setValidator(asciiValidator);
+    d->locationCodeEdit->setMaxLength(3);
+    label3->setBuddy(d->locationCodeEdit);
+    grid->addMultiCellWidget(label3, 3, 3, 0, 0);
+    grid->addMultiCellWidget(d->locationCodeEdit, 3, 3, 1, 1);
+    QWhatsThis::add(d->locationCodeEdit, i18n("<p>Set here the ISO country code referenced by the content. "
+                                              "This field is limited to 3 ASCII characters."));
+
+    // --------------------------------------------------------
+
     QLabel *label4 = new QLabel(i18n("City:"), parent);
     d->cityEdit    = new KLineEdit(parent);
     d->cityEdit->setValidator(asciiValidator);
@@ -117,7 +145,7 @@
     d->provinceEdit = new KLineEdit(parent);
     d->provinceEdit->setValidator(asciiValidator);
     d->provinceEdit->setMaxLength(32);
-    label5->setBuddy(d->provinceEdit);
+    label6->setBuddy(d->provinceEdit);
     grid->addMultiCellWidget(label6, 8, 8, 0, 0);
     grid->addMultiCellWidget(d->provinceEdit, 8, 8, 1, 2);
     QWhatsThis::add(d->provinceEdit, i18n("<p>Set here the Province or State of content origin. "
@@ -129,10 +157,10 @@
     d->countryEdit = new KLineEdit(parent);
     d->countryEdit->setValidator(asciiValidator);
     d->countryEdit->setMaxLength(64);
-    label5->setBuddy(d->countryEdit);
+    label7->setBuddy(d->countryEdit);
     grid->addMultiCellWidget(label7, 9, 9, 0, 0);
     grid->addMultiCellWidget(d->countryEdit, 9, 9, 1, 2);
-    QWhatsThis::add(d->provinceEdit, i18n("<p>Set here the full country name of content origin. "
+    QWhatsThis::add(d->countryEdit, i18n("<p>Set here the full country name of content origin. "
                                           "This field is limited to 64 ASCII characters."));
 
     // --------------------------------------------------------
@@ -143,7 +171,7 @@
     d->countryCodeEdit->setMaxLength(3);
     label5->setBuddy(d->countryCodeEdit);
     grid->addMultiCellWidget(label8, 10, 10, 0, 0);
-    grid->addMultiCellWidget(d->countryCodeEdit, 10, 10, 1, 2);
+    grid->addMultiCellWidget(d->countryCodeEdit, 10, 10, 1, 1);
     QWhatsThis::add(d->countryCodeEdit, i18n("<p>Set here the ISO country code of content origin. "
                                              "This field is limited to 3 ASCII characters."));
 
@@ -183,6 +211,8 @@
     exiv2Iface.setIptc(iptcData);
 
     d->objectNameEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.ObjectName", false));
+    d->locationEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.LocationName", false));
+    d->locationCodeEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.LocationCode", false));
     d->cityEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.City", false));
     d->sublocationEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.SubLocation", false));
     d->provinceEdit->setText(exiv2Iface.getIptcTagString("Iptc.Application2.ProvinceState", false));
@@ -197,7 +227,8 @@
     exiv2Iface.setIptc(iptcData);
 
     exiv2Iface.setIptcTagString("Iptc.Application2.ObjectName", d->objectNameEdit->text());
-    exiv2Iface.setIptcTagString("Iptc.Application2.City", d->cityEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.LocationName", d->locationEdit->text());
+    exiv2Iface.setIptcTagString("Iptc.Application2.LocationCode", d->locationCodeEdit->text());    exiv2Iface.setIptcTagString("Iptc.Application2.City", d->cityEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.SubLocation", d->sublocationEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.ProvinceState", d->provinceEdit->text());
     exiv2Iface.setIptcTagString("Iptc.Application2.CountryName", d->countryEdit->text());
Comment 25 caulier.gilles 2006-10-15 18:32:14 UTC
SVN commit 595780 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : IPTC Keywords editor page is now implemented.

CCMAIL: digikam-devel@kde.org, kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +1 -1      Makefile.am  
 M  +10 -0     iptceditdialog.cpp  
 A             iptckeywords.cpp   [License: GPL]
 A             iptckeywords.h   [License: GPL]


--- trunk/extragear/libs/kipi-plugins/metadataedit/Makefile.am #595779:595780
@@ -12,7 +12,7 @@
 kipiplugin_metadataedit_la_SOURCES = plugin_metadataedit.cpp metadataeditdialog.cpp \
 	                                 metadataitem.cpp iptceditdialog.cpp iptccaption.cpp \
 	                                 iptccredits.cpp iptcstatus.cpp iptcorigin.cpp \
-	                                 iptcdatetime.cpp 
+	                                 iptcdatetime.cpp iptckeywords.cpp 
 
 # Libs needed by the plugin
 kipiplugin_metadataedit_la_LIBADD = $(top_builddir)/kipi-plugins/common/exiv2iface/libexiv2iface.la \
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptceditdialog.cpp #595779:595780
@@ -43,6 +43,7 @@
 #include "iptcstatus.h"
 #include "iptcorigin.h"
 #include "iptcdatetime.h"
+#include "iptckeywords.h"
 #include "iptceditdialog.h"
 #include "iptceditdialog.moc"
 
@@ -57,12 +58,14 @@
     IPTCEditDialogDialogPrivate()
     {
         page_caption  = 0;
+        page_keywords = 0;
         page_credits  = 0;
         page_status   = 0;
         page_origin   = 0;
         page_datetime = 0;
 
         captionPage   = 0;
+        keywordsPage  = 0;
         creditsPage   = 0;
         statusPage    = 0;
         originPage    = 0;
@@ -72,12 +75,14 @@
     QByteArray   iptcData;
 
     QFrame       *page_caption;
+    QFrame       *page_keywords;
     QFrame       *page_credits;
     QFrame       *page_status;
     QFrame       *page_origin;
     QFrame       *page_datetime;
 
     IPTCCaption  *captionPage;
+    IPTCKeywords *keywordsPage;
     IPTCCredits  *creditsPage;
     IPTCStatus   *statusPage;
     IPTCOrigin   *originPage;
@@ -97,6 +102,10 @@
                                BarIcon("editclear", KIcon::SizeMedium));
     d->captionPage   = new IPTCCaption(d->page_caption, d->iptcData);
 
+    d->page_keywords = addPage(i18n("Keywords"), i18n("IPTC Keywords Informations"),
+                               BarIcon("bookmark", KIcon::SizeMedium));
+    d->keywordsPage  = new IPTCKeywords(d->page_keywords, d->iptcData);
+
     d->page_credits  = addPage(i18n("Credits"), i18n("IPTC Credits Informations"),
                                BarIcon("identity", KIcon::SizeMedium));
     d->creditsPage   = new IPTCCredits(d->page_credits, d->iptcData);
@@ -160,6 +169,7 @@
 void IPTCEditDialog::slotOk()
 {
     d->captionPage->applyMetadata(d->iptcData);
+    d->keywordsPage->applyMetadata(d->iptcData);
     d->creditsPage->applyMetadata(d->iptcData);
     d->statusPage->applyMetadata(d->iptcData);
     d->originPage->applyMetadata(d->iptcData);
Comment 26 caulier.gilles 2006-10-16 09:38:59 UTC
SVN commit 595932 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : IPTC Categories editor page is now implemented.

CCMAIL: digikam-devel@kde.org, kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 A             iptccategories.cpp   [License: GPL]
 A             iptccategories.h   [License: GPL]
Comment 27 caulier.gilles 2006-10-16 11:03:06 UTC
SVN commit 595953 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : add ObjectType IPTC tag to status editor page.

CCBUGS: 91812, 133276, 103255

 M  +67 -12    iptcstatus.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptcstatus.cpp #595952:595953
@@ -50,12 +50,14 @@
     {
         priorityCB          = 0;
         objectCycleCB       = 0;
+        objectTypeCB        = 0;
         statusEdit          = 0;
         JobIDEdit           = 0;
         programEdit         = 0;
         programVersionEdit  = 0;
         priorityCheck       = 0;
         objectCycleCheck    = 0;
+        objectTypeCheck     = 0;
         statusCheck         = 0;
         JobIDCheck          = 0;
         programCheck        = 0;
@@ -63,6 +65,7 @@
     }
 
     QCheckBox *priorityCheck;
+    QCheckBox *objectTypeCheck;
     QCheckBox *objectCycleCheck;
     QCheckBox *statusCheck;
     QCheckBox *JobIDCheck;
@@ -71,8 +74,10 @@
 
     QComboBox *priorityCB;
     QComboBox *objectCycleCB;
+    QComboBox *objectTypeCB;
 
     KLineEdit *statusEdit;
+    KLineEdit *objectTypeDescEdit;
     KLineEdit *JobIDEdit;
     KLineEdit *programEdit;
     KLineEdit *programVersionEdit;
@@ -83,7 +88,7 @@
 {
     d = new IPTCStatusPriv;
 
-    QGridLayout* grid = new QGridLayout(parent, 11, 2, KDialog::spacingHint());
+    QGridLayout* grid = new QGridLayout(parent, 12, 2, KDialog::spacingHint());
 
     // IPTC only accept printable Ascii char.
     QRegExp asciiRx("[\x20-\x7F]+$");
@@ -121,21 +126,38 @@
 
     d->objectCycleCheck = new QCheckBox(i18n("Object Cycle:"), parent);
     d->objectCycleCB    = new QComboBox(false, parent);
-    d->objectCycleCB->insertItem(i18n("a: Morning"),   0);
-    d->objectCycleCB->insertItem(i18n("b: Afternoon"), 1);
-    d->objectCycleCB->insertItem(i18n("c: Evening"),   2);
+    d->objectCycleCB->insertItem(i18n("Morning"),   0);
+    d->objectCycleCB->insertItem(i18n("Afternoon"), 1);
+    d->objectCycleCB->insertItem(i18n("Evening"),   2);
     grid->addMultiCellWidget(d->objectCycleCheck, 3, 3, 0, 0);
     grid->addMultiCellWidget(d->objectCycleCB, 3, 3, 1, 1);
     QWhatsThis::add(d->objectCycleCB, i18n("<p>Select here the editorial cycle of content."));
       
     // --------------------------------------------------------
 
+    d->objectTypeCheck    = new QCheckBox(i18n("Object Type:"), parent);
+    d->objectTypeCB       = new QComboBox(false, parent);
+    d->objectTypeDescEdit = new KLineEdit(parent);
+    d->objectTypeDescEdit->setValidator(asciiValidator);
+    d->objectTypeDescEdit->setMaxLength(32);
+    d->objectTypeCB->insertItem(i18n("News"),     0);
+    d->objectTypeCB->insertItem(i18n("Data"),     1);
+    d->objectTypeCB->insertItem(i18n("Advisory"), 2);
+    grid->addMultiCellWidget(d->objectTypeCheck, 4, 4, 0, 0);
+    grid->addMultiCellWidget(d->objectTypeCB, 4, 4, 1, 1);
+    grid->addMultiCellWidget(d->objectTypeDescEdit, 4, 4, 2, 2);
+    QWhatsThis::add(d->objectTypeCB, i18n("<p>Select here the editorial type of content."));
+    QWhatsThis::add(d->objectTypeDescEdit, i18n("<p>Set here the editorial description of content. "
+                                                "This field is limited to 64 ASCII characters."));
+
+    // --------------------------------------------------------
+
     d->JobIDCheck = new QCheckBox(i18n("Job ID:"), parent);
     d->JobIDEdit  = new KLineEdit(parent);
     d->JobIDEdit->setValidator(asciiValidator);
     d->JobIDEdit->setMaxLength(32);
-    grid->addMultiCellWidget(d->JobIDCheck, 4, 4, 0, 2);
-    grid->addMultiCellWidget(d->JobIDEdit, 5, 5, 0, 2);
+    grid->addMultiCellWidget(d->JobIDCheck, 5, 5, 0, 2);
+    grid->addMultiCellWidget(d->JobIDEdit, 6, 6, 0, 2);
     QWhatsThis::add(d->JobIDEdit, i18n("<p>Set here the string that identifies content that recurs. "
                                        "This field is limited to 32 ASCII characters."));
 
@@ -145,8 +167,8 @@
     d->programEdit  = new KLineEdit(parent);
     d->programEdit->setValidator(asciiValidator);
     d->programEdit->setMaxLength(32);
-    grid->addMultiCellWidget(d->programCheck, 6, 6, 0, 2);
-    grid->addMultiCellWidget(d->programEdit, 7, 7, 0, 2);
+    grid->addMultiCellWidget(d->programCheck, 7, 7, 0, 2);
+    grid->addMultiCellWidget(d->programEdit, 8, 8, 0, 2);
     QWhatsThis::add(d->programEdit, i18n("<p>Set here the content creation program name. "
                                          "This field is limited to 32 ASCII characters."));
 
@@ -156,8 +178,8 @@
     d->programVersionEdit  = new KLineEdit(parent);
     d->programVersionEdit->setValidator(asciiValidator);
     d->programVersionEdit->setMaxLength(10);
-    grid->addMultiCellWidget(d->programVersionCheck, 8, 8, 0, 2);
-    grid->addMultiCellWidget(d->programVersionEdit, 9, 9, 0, 0);
+    grid->addMultiCellWidget(d->programVersionCheck, 9, 9, 0, 2);
+    grid->addMultiCellWidget(d->programVersionEdit, 10, 10, 0, 0);
     QWhatsThis::add(d->programVersionEdit, i18n("<p>Set here the content creation program version. "
                                                 "This field is limited to 10 ASCII characters."));
 
@@ -165,9 +187,9 @@
 
     QLabel *iptcNote = new QLabel(i18n("<b>Note: IPTC text tags only support printable "
                                        "ASCII characters set.</b>"), parent);
-    grid->addMultiCellWidget(iptcNote, 10, 10, 0, 2);
+    grid->addMultiCellWidget(iptcNote, 11, 11, 0, 2);
     grid->setColStretch(2, 10);                     
-    grid->setRowStretch(11, 10);                     
+    grid->setRowStretch(12, 10);                     
 
     // --------------------------------------------------------
 
@@ -177,6 +199,12 @@
     connect(d->objectCycleCheck, SIGNAL(toggled(bool)),
             d->objectCycleCB, SLOT(setEnabled(bool)));
 
+    connect(d->objectTypeCheck, SIGNAL(toggled(bool)),
+            d->objectTypeCB, SLOT(setEnabled(bool)));
+
+    connect(d->objectTypeCheck, SIGNAL(toggled(bool)),
+            d->objectTypeDescEdit, SLOT(setEnabled(bool)));
+
     connect(d->statusCheck, SIGNAL(toggled(bool)),
             d->statusEdit, SLOT(setEnabled(bool)));
 
@@ -213,6 +241,24 @@
     }
     d->statusEdit->setEnabled(d->statusCheck->isChecked());
 
+    data = exiv2Iface.getIptcTagString("Iptc.Application2.ObjectType", false);    
+    if (!data.isNull())
+    {
+        QString typeSec = data.section(":", 0, 0);
+        if (!typeSec.isEmpty())
+        {
+            int type = typeSec.toInt();
+            if (type < 3 && type >= 0)
+            {
+                d->objectTypeCB->setCurrentItem(type);
+                d->objectTypeDescEdit->setText(data.section(":", -1));
+                d->objectTypeCheck->setChecked(true);
+            }
+        }
+    }
+    d->objectTypeCB->setEnabled(d->objectTypeCheck->isChecked());
+    d->objectTypeDescEdit->setEnabled(d->objectTypeCheck->isChecked());
+
     data = exiv2Iface.getIptcTagString("Iptc.Application2.FixtureId", false);    
     if (!data.isNull())
     {
@@ -270,6 +316,15 @@
     else
         exiv2Iface.removeIptcTag("Iptc.Application2.EditStatus");
 
+    if (d->objectTypeCheck->isChecked())
+    {
+        QString objectType = QString("0%1:%2").arg(d->objectTypeCB->currentItem())
+                                              .arg(d->objectTypeDescEdit->text());
+        exiv2Iface.setIptcTagString("Iptc.Application2.ObjectType", objectType);
+    }
+    else
+        exiv2Iface.removeIptcTag("Iptc.Application2.ObjectType");
+
     if (d->JobIDCheck->isChecked())
         exiv2Iface.setIptcTagString("Iptc.Application2.FixtureId", d->JobIDEdit->text());
     else
Comment 28 caulier.gilles 2006-10-16 11:50:25 UTC
SVN commit 595961 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : add ObjectAttribute IPTC tag to status editor page.

CCBUGS: 91812, 133276, 103255

 M  +90 -16    iptcstatus.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptcstatus.cpp #595960:595961
@@ -67,6 +67,7 @@
     QCheckBox *priorityCheck;
     QCheckBox *objectTypeCheck;
     QCheckBox *objectCycleCheck;
+    QCheckBox *objectAttributeCheck;
     QCheckBox *statusCheck;
     QCheckBox *JobIDCheck;
     QCheckBox *programCheck;
@@ -75,9 +76,11 @@
     QComboBox *priorityCB;
     QComboBox *objectCycleCB;
     QComboBox *objectTypeCB;
+    QComboBox *objectAttributeCB;
 
     KLineEdit *statusEdit;
     KLineEdit *objectTypeDescEdit;
+    KLineEdit *objectAttributeDescEdit;
     KLineEdit *JobIDEdit;
     KLineEdit *programEdit;
     KLineEdit *programVersionEdit;
@@ -88,7 +91,7 @@
 {
     d = new IPTCStatusPriv;
 
-    QGridLayout* grid = new QGridLayout(parent, 12, 2, KDialog::spacingHint());
+    QGridLayout* grid = new QGridLayout(parent, 14, 2, KDialog::spacingHint());
 
     // IPTC only accept printable Ascii char.
     QRegExp asciiRx("[\x20-\x7F]+$");
@@ -139,25 +142,61 @@
     d->objectTypeCB       = new QComboBox(false, parent);
     d->objectTypeDescEdit = new KLineEdit(parent);
     d->objectTypeDescEdit->setValidator(asciiValidator);
-    d->objectTypeDescEdit->setMaxLength(32);
+    d->objectTypeDescEdit->setMaxLength(64);
     d->objectTypeCB->insertItem(i18n("News"),     0);
     d->objectTypeCB->insertItem(i18n("Data"),     1);
     d->objectTypeCB->insertItem(i18n("Advisory"), 2);
     grid->addMultiCellWidget(d->objectTypeCheck, 4, 4, 0, 0);
     grid->addMultiCellWidget(d->objectTypeCB, 4, 4, 1, 1);
-    grid->addMultiCellWidget(d->objectTypeDescEdit, 4, 4, 2, 2);
+    grid->addMultiCellWidget(d->objectTypeDescEdit, 5, 5, 0, 2);
     QWhatsThis::add(d->objectTypeCB, i18n("<p>Select here the editorial type of content."));
-    QWhatsThis::add(d->objectTypeDescEdit, i18n("<p>Set here the editorial description of content. "
+    QWhatsThis::add(d->objectTypeDescEdit, i18n("<p>Set here the editorial type description of content. "
                                                 "This field is limited to 64 ASCII characters."));
 
     // --------------------------------------------------------
 
+    d->objectAttributeCheck    = new QCheckBox(i18n("Object Attribute:"), parent);
+    d->objectAttributeCB       = new QComboBox(false, parent);
+    d->objectAttributeDescEdit = new KLineEdit(parent);
+    d->objectAttributeDescEdit->setValidator(asciiValidator);
+    d->objectAttributeDescEdit->setMaxLength(64);
+    d->objectAttributeCB->insertItem(i18n("Current"),                           0);
+    d->objectAttributeCB->insertItem(i18n("Analysis"),                          1);
+    d->objectAttributeCB->insertItem(i18n("Archive material"),                  2);
+    d->objectAttributeCB->insertItem(i18n("Background"),                        3);
+    d->objectAttributeCB->insertItem(i18n("Feature"),                           4);
+    d->objectAttributeCB->insertItem(i18n("Forecast"),                          5);
+    d->objectAttributeCB->insertItem(i18n("History"),                           6);
+    d->objectAttributeCB->insertItem(i18n("Obituary"),                          7);
+    d->objectAttributeCB->insertItem(i18n("Opinion"),                           8);
+    d->objectAttributeCB->insertItem(i18n("Polls & Surveys"),                   9);
+    d->objectAttributeCB->insertItem(i18n("Profile"),                           10);
+    d->objectAttributeCB->insertItem(i18n("Results Listings & Table"),          11);
+    d->objectAttributeCB->insertItem(i18n("Side bar & Supporting information"), 12);
+    d->objectAttributeCB->insertItem(i18n("Summary"),                           13);
+    d->objectAttributeCB->insertItem(i18n("Transcript & Verbatim"),             14);
+    d->objectAttributeCB->insertItem(i18n("Interview"),                         15);
+    d->objectAttributeCB->insertItem(i18n("From the Scene"),                    16);
+    d->objectAttributeCB->insertItem(i18n("Retrospective"),                     17);
+    d->objectAttributeCB->insertItem(i18n("Statistics"),                        18);
+    d->objectAttributeCB->insertItem(i18n("Update"),                            19);
+    d->objectAttributeCB->insertItem(i18n("Wrap-up"),                           20);
+    d->objectAttributeCB->insertItem(i18n("Press Release"),                     21);
+    grid->addMultiCellWidget(d->objectAttributeCheck, 6, 6, 0, 0);
+    grid->addMultiCellWidget(d->objectAttributeCB, 6, 6, 1, 2);
+    grid->addMultiCellWidget(d->objectAttributeDescEdit, 7, 7, 0, 2);
+    QWhatsThis::add(d->objectAttributeCB, i18n("<p>Select here the editorial attribute of content."));
+    QWhatsThis::add(d->objectAttributeDescEdit, i18n("<p>Set here the editorial attribute description of "
+                                                     "content. This field is limited to 64 ASCII characters."));
+
+    // --------------------------------------------------------
+
     d->JobIDCheck = new QCheckBox(i18n("Job ID:"), parent);
     d->JobIDEdit  = new KLineEdit(parent);
     d->JobIDEdit->setValidator(asciiValidator);
     d->JobIDEdit->setMaxLength(32);
-    grid->addMultiCellWidget(d->JobIDCheck, 5, 5, 0, 2);
-    grid->addMultiCellWidget(d->JobIDEdit, 6, 6, 0, 2);
+    grid->addMultiCellWidget(d->JobIDCheck, 8, 8, 0, 2);
+    grid->addMultiCellWidget(d->JobIDEdit, 9, 9, 0, 2);
     QWhatsThis::add(d->JobIDEdit, i18n("<p>Set here the string that identifies content that recurs. "
                                        "This field is limited to 32 ASCII characters."));
 
@@ -167,8 +206,8 @@
     d->programEdit  = new KLineEdit(parent);
     d->programEdit->setValidator(asciiValidator);
     d->programEdit->setMaxLength(32);
-    grid->addMultiCellWidget(d->programCheck, 7, 7, 0, 2);
-    grid->addMultiCellWidget(d->programEdit, 8, 8, 0, 2);
+    grid->addMultiCellWidget(d->programCheck, 10, 10, 0, 2);
+    grid->addMultiCellWidget(d->programEdit, 11, 11, 0, 2);
     QWhatsThis::add(d->programEdit, i18n("<p>Set here the content creation program name. "
                                          "This field is limited to 32 ASCII characters."));
 
@@ -178,8 +217,8 @@
     d->programVersionEdit  = new KLineEdit(parent);
     d->programVersionEdit->setValidator(asciiValidator);
     d->programVersionEdit->setMaxLength(10);
-    grid->addMultiCellWidget(d->programVersionCheck, 9, 9, 0, 2);
-    grid->addMultiCellWidget(d->programVersionEdit, 10, 10, 0, 0);
+    grid->addMultiCellWidget(d->programVersionCheck, 12, 12, 0, 2);
+    grid->addMultiCellWidget(d->programVersionEdit, 13, 13, 0, 0);
     QWhatsThis::add(d->programVersionEdit, i18n("<p>Set here the content creation program version. "
                                                 "This field is limited to 10 ASCII characters."));
 
@@ -187,9 +226,9 @@
 
     QLabel *iptcNote = new QLabel(i18n("<b>Note: IPTC text tags only support printable "
                                        "ASCII characters set.</b>"), parent);
-    grid->addMultiCellWidget(iptcNote, 11, 11, 0, 2);
+    grid->addMultiCellWidget(iptcNote, 14, 14, 0, 2);
     grid->setColStretch(2, 10);                     
-    grid->setRowStretch(12, 10);                     
+    grid->setRowStretch(14, 10);                     
 
     // --------------------------------------------------------
 
@@ -205,6 +244,12 @@
     connect(d->objectTypeCheck, SIGNAL(toggled(bool)),
             d->objectTypeDescEdit, SLOT(setEnabled(bool)));
 
+    connect(d->objectAttributeCheck, SIGNAL(toggled(bool)),
+            d->objectAttributeCB, SLOT(setEnabled(bool)));
+
+    connect(d->objectAttributeCheck, SIGNAL(toggled(bool)),
+            d->objectAttributeDescEdit, SLOT(setEnabled(bool)));
+
     connect(d->statusCheck, SIGNAL(toggled(bool)),
             d->statusEdit, SLOT(setEnabled(bool)));
 
@@ -247,7 +292,7 @@
         QString typeSec = data.section(":", 0, 0);
         if (!typeSec.isEmpty())
         {
-            int type = typeSec.toInt();
+            int type = typeSec.toInt()-1;
             if (type < 3 && type >= 0)
             {
                 d->objectTypeCB->setCurrentItem(type);
@@ -259,6 +304,24 @@
     d->objectTypeCB->setEnabled(d->objectTypeCheck->isChecked());
     d->objectTypeDescEdit->setEnabled(d->objectTypeCheck->isChecked());
 
+    data = exiv2Iface.getIptcTagString("Iptc.Application2.ObjectAttribute", false);    
+    if (!data.isNull())
+    {
+        QString attSec = data.section(":", 0, 0);
+        if (!attSec.isEmpty())
+        {
+            int att = attSec.toInt()-1;
+            if (att < 21 && att >= 0)
+            {
+                d->objectAttributeCB->setCurrentItem(att);
+                d->objectAttributeDescEdit->setText(data.section(":", -1));
+                d->objectAttributeCheck->setChecked(true);
+            }
+        }
+    }
+    d->objectAttributeCB->setEnabled(d->objectAttributeCheck->isChecked());
+    d->objectAttributeDescEdit->setEnabled(d->objectAttributeCheck->isChecked());
+
     data = exiv2Iface.getIptcTagString("Iptc.Application2.FixtureId", false);    
     if (!data.isNull())
     {
@@ -318,13 +381,24 @@
 
     if (d->objectTypeCheck->isChecked())
     {
-        QString objectType = QString("0%1:%2").arg(d->objectTypeCB->currentItem())
-                                              .arg(d->objectTypeDescEdit->text());
+        QString objectType;
+        objectType.sprintf("%2d", d->objectTypeCB->currentItem()+1);
+        objectType.append(QString(":%1").arg(d->objectTypeDescEdit->text()));
         exiv2Iface.setIptcTagString("Iptc.Application2.ObjectType", objectType);
     }
     else
-        exiv2Iface.removeIptcTag("Iptc.Application2.ObjectType");
+        exiv2Iface.removeIptcTag("Iptc.Application2.ObjectAttribute");
 
+    if (d->objectAttributeCheck->isChecked())
+    {
+        QString objectAttribute;
+        objectAttribute.sprintf("%3d", d->objectAttributeCB->currentItem()+1);
+        objectAttribute.append(QString(":%1").arg(d->objectAttributeDescEdit->text()));
+        exiv2Iface.setIptcTagString("Iptc.Application2.ObjectAttribute", objectAttribute);
+    }
+    else
+        exiv2Iface.removeIptcTag("Iptc.Application2.ObjectAttribute");
+
     if (d->JobIDCheck->isChecked())
         exiv2Iface.setIptcTagString("Iptc.Application2.FixtureId", d->JobIDEdit->text());
     else
Comment 29 caulier.gilles 2006-10-16 13:07:26 UTC
SVN commit 595975 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : polish source code : set automaticly IPTC Program/version tags

CCBUGS: 91812, 133276, 103255

 M  +7 -66     iptcstatus.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptcstatus.cpp #595974:595975
@@ -35,6 +35,7 @@
 
 // Local includes.
 
+#include "pluginsversion.h"
 #include "exiv2iface.h"
 #include "iptcstatus.h"
 #include "iptcstatus.moc"
@@ -53,15 +54,11 @@
         objectTypeCB        = 0;
         statusEdit          = 0;
         JobIDEdit           = 0;
-        programEdit         = 0;
-        programVersionEdit  = 0;
         priorityCheck       = 0;
         objectCycleCheck    = 0;
         objectTypeCheck     = 0;
         statusCheck         = 0;
         JobIDCheck          = 0;
-        programCheck        = 0;
-        programVersionCheck = 0;
     }
 
     QCheckBox *priorityCheck;
@@ -70,8 +67,6 @@
     QCheckBox *objectAttributeCheck;
     QCheckBox *statusCheck;
     QCheckBox *JobIDCheck;
-    QCheckBox *programCheck;
-    QCheckBox *programVersionCheck;
 
     QComboBox *priorityCB;
     QComboBox *objectCycleCB;
@@ -82,8 +77,6 @@
     KLineEdit *objectTypeDescEdit;
     KLineEdit *objectAttributeDescEdit;
     KLineEdit *JobIDEdit;
-    KLineEdit *programEdit;
-    KLineEdit *programVersionEdit;
 };
 
 IPTCStatus::IPTCStatus(QWidget* parent, QByteArray& iptcData)
@@ -91,7 +84,7 @@
 {
     d = new IPTCStatusPriv;
 
-    QGridLayout* grid = new QGridLayout(parent, 14, 2, KDialog::spacingHint());
+    QGridLayout* grid = new QGridLayout(parent, 11, 2, KDialog::spacingHint());
 
     // IPTC only accept printable Ascii char.
     QRegExp asciiRx("[\x20-\x7F]+$");
@@ -191,7 +184,7 @@
 
     // --------------------------------------------------------
 
-    d->JobIDCheck = new QCheckBox(i18n("Job ID:"), parent);
+    d->JobIDCheck = new QCheckBox(i18n("Job Identification:"), parent);
     d->JobIDEdit  = new KLineEdit(parent);
     d->JobIDEdit->setValidator(asciiValidator);
     d->JobIDEdit->setMaxLength(32);
@@ -202,33 +195,11 @@
 
     // --------------------------------------------------------
 
-    d->programCheck = new QCheckBox(i18n("Program:"), parent);
-    d->programEdit  = new KLineEdit(parent);
-    d->programEdit->setValidator(asciiValidator);
-    d->programEdit->setMaxLength(32);
-    grid->addMultiCellWidget(d->programCheck, 10, 10, 0, 2);
-    grid->addMultiCellWidget(d->programEdit, 11, 11, 0, 2);
-    QWhatsThis::add(d->programEdit, i18n("<p>Set here the content creation program name. "
-                                         "This field is limited to 32 ASCII characters."));
-
-    // --------------------------------------------------------
-
-    d->programVersionCheck = new QCheckBox(i18n("Program Version:"), parent);
-    d->programVersionEdit  = new KLineEdit(parent);
-    d->programVersionEdit->setValidator(asciiValidator);
-    d->programVersionEdit->setMaxLength(10);
-    grid->addMultiCellWidget(d->programVersionCheck, 12, 12, 0, 2);
-    grid->addMultiCellWidget(d->programVersionEdit, 13, 13, 0, 0);
-    QWhatsThis::add(d->programVersionEdit, i18n("<p>Set here the content creation program version. "
-                                                "This field is limited to 10 ASCII characters."));
-
-    // --------------------------------------------------------
-
     QLabel *iptcNote = new QLabel(i18n("<b>Note: IPTC text tags only support printable "
                                        "ASCII characters set.</b>"), parent);
-    grid->addMultiCellWidget(iptcNote, 14, 14, 0, 2);
+    grid->addMultiCellWidget(iptcNote, 10, 10, 0, 2);
     grid->setColStretch(2, 10);                     
-    grid->setRowStretch(14, 10);                     
+    grid->setRowStretch(11, 10);                     
 
     // --------------------------------------------------------
 
@@ -256,12 +227,6 @@
     connect(d->JobIDCheck, SIGNAL(toggled(bool)),
             d->JobIDEdit, SLOT(setEnabled(bool)));
 
-    connect(d->programCheck, SIGNAL(toggled(bool)),
-            d->programEdit, SLOT(setEnabled(bool)));
-
-    connect(d->programVersionCheck, SIGNAL(toggled(bool)),
-            d->programVersionEdit, SLOT(setEnabled(bool)));
-
     // --------------------------------------------------------
 
     readMetadata(iptcData);
@@ -330,22 +295,6 @@
     }
     d->JobIDEdit->setEnabled(d->JobIDCheck->isChecked());
 
-    data = exiv2Iface.getIptcTagString("Iptc.Application2.Program", false);    
-    if (!data.isNull())
-    {
-        d->programEdit->setText(data);
-        d->programCheck->setChecked(true);
-    }
-    d->programEdit->setEnabled(d->programCheck->isChecked());
-
-    data = exiv2Iface.getIptcTagString("Iptc.Application2.ProgramVersion", false);    
-    if (!data.isNull())
-    {
-        d->programVersionEdit->setText(data);
-        d->programVersionCheck->setChecked(true);
-    }
-    d->programVersionEdit->setEnabled(d->programVersionCheck->isChecked());
-
     data = exiv2Iface.getIptcTagString("Iptc.Application2.Urgency", false);    
     if (!data.isNull())
     {
@@ -404,16 +353,6 @@
     else
         exiv2Iface.removeIptcTag("Iptc.Application2.FixtureId");
 
-    if (d->programCheck->isChecked())
-        exiv2Iface.setIptcTagString("Iptc.Application2.Program", d->programEdit->text());
-    else
-        exiv2Iface.removeIptcTag("Iptc.Application2.Program");
-
-    if (d->programVersionCheck->isChecked())
-        exiv2Iface.setIptcTagString("Iptc.Application2.ProgramVersion", d->programVersionEdit->text());
-    else
-        exiv2Iface.removeIptcTag("Iptc.Application2.ProgramVersion");
-
     if (d->priorityCheck->isChecked())
         exiv2Iface.setIptcTagString("Iptc.Application2.Urgency", QString::number(d->priorityCB->currentItem()));
     else
@@ -439,6 +378,8 @@
     else
         exiv2Iface.removeIptcTag("Iptc.Application2.ObjectCycle");
 
+    exiv2Iface.setImageProgramId(QString("Kipi MetadataEdit"), QString(kipiplugins_version));
+
     iptcData = exiv2Iface.getIptc();
 }
 
Comment 30 caulier.gilles 2006-10-17 10:36:28 UTC
SVN commit 596354 by cgilles:

kipiplugins from trunk : MetadataEdit plugin: IPTC Origin informations editor now support all country codes define by ISO-3166 norm.

CCMAIL: kde-imaging@kde.org
CCBUGS: 91812, 133276, 103255

 M  +340 -103  iptcorigin.cpp  
Comment 31 caulier.gilles 2006-10-17 14:13:44 UTC
Ok guys.

Let's me resume the current implementation status about IPTC metadata management :

- digiKam from trunk (next 0.9.0-beta3 release) store digiKam tags to IPTC keywords _AND_ can restore/create digiKam tags from IPTC keywords.
- since digiKam 0.9.0-beta1, we have a full support of IPTC tags in album GUI and Editor using Exiv2 library. There is an IPTC viewer on right "Metadata" sidebar.
- in kipi-plugins from trunk (next 0.1.3 release), Exiv2 library is used ined libkexif. A new plugin named "MetadataEdit" have been added to edit in single or Batch mode IPTC metadata. Look this blog entry for details:

http://www.digikam.org/?q=node/148

Before to close this B.K.O file, i'm waiting your contructive comments. About the new plugin, please use the kipi-plugins B.K.O entry to make reports using "metadataedit" component.

Thanks in advance

Gilles Caulier

Comment 32 Mikolaj Machowski 2006-10-17 20:20:54 UTC
>
> Before to close this B.K.O file, i'm waiting your contructive comments.


Really impressive :)

Of course I have some remarks (as always ;):

- Main screen: Remove buttons are labeled "Remove...". Ellipsis is
  required only if button/menu entry opens new dialog with further input
  required.  Here it is not the case, simple "Remove" will be enough.
- Main screen: Remove action is strange. There is no way to know when
  this action was reverted or it is possible. If it is not possible
  warning would be appropriate
- Main screen: not sure if wording "IPTC actions" would be
  understandable for all users. "IPTC information" IMO would be better.

- General: better checking for non ASCII characters is needed, warning
  while applying, leaving section, whatever. Passive info in form of
  a note isn't enough.
- General: some link(s) to info what are those all fields would be great
  thing. While pros probably know all those keywords by heart all
  newbies will be overwhelmed and will have problems with proper use of
  those new possibilities. Import of dictionary in Digikam is
  overkill but links to IPTC spec on-line would be nice touch.
- General: placing of warning note in one place on all screens (bottom?)
  could be nice visual accent.


- Keywords/Categories: First button is labeled "Add...". Ellipsis is
  required only if button/menu entry opens new dialog with further input
  required.  Here it is not the case, simple "Add" will be enough.
- Date & Time - first line "Date/Time created", should be
  "Creation date/time" or "Date/Time of creation".
- Origin: Country - entries are ordered alphabetically according to
  three letter codes which are not common, better would be order them
  according to real names.

Nitpicking:

- General: Everywhere when checkboxes are used checkbox is highlighted
  when hovering on space outside of checkbox itself or label but when
  clicking nothing happens. Value of option is changed only when
  click was while hovering on checkbox or label. This is conflicting
  visual feedback - option should be changed each time when info about
  focus is given. Heh, checked few other places: this is general Qt/KDE
  problem :(
- Date & Time - IMO for date would be better to use KDE date widget, but
  I understand there are some dependency considerations

Wish:

Move "Comments editor" functionality to this new plugin and allow to
edit here also Digikam comments and other metadata not used by
EXIF/IPTC.

m.
Comment 33 caulier.gilles 2006-10-17 20:49:51 UTC
>Really impressive :)  

Thanks 

> Of course I have some remarks (as always ;): 

It's not a problem if it's constructive (:=)))
 
> - Main screen: Remove buttons are labeled "Remove...". Ellipsis is 
>   required only if button/menu entry opens new dialog with further input 
>   required.  Here it is not the case, simple "Remove" will be enough. 

I will fix it.

> - Main screen: Remove action is strange. There is no way to know when 
>   this action was reverted or it is possible. If it is not possible 
>   warning would be appropriate 

Right. Something is missing in listview, especially status. I will do it.

> - Main screen: not sure if wording "IPTC actions" would be 
>   understandable for all users. "IPTC information" IMO would be better. 

Not sure. I want a more large feedback about this point.
 
> - General: better checking for non ASCII characters is needed, warning 
>   while applying, leaving section, whatever. Passive info in form of 
>   a note isn't enough. 

Ah. This is a complex problem. I will trying to do something.

> - General: some link(s) to info what are those all fields would be great 
>   thing. While pros probably know all those keywords by heart all 
>   newbies will be overwhelmed and will have problems with proper use of 
>   those new possibilities. Import of dictionary in Digikam is 
>   overkill but links to IPTC spec on-line would be nice touch. 

Yes. I will fix it.

> - General: placing of warning note in one place on all screens (bottom?) 
>   could be nice visual accent. 
 
Already done by the Note on bottom...
 
> - Keywords/Categories: First button is labeled "Add...". Ellipsis is 
>   required only if button/menu entry opens new dialog with further input 
>   required.  Here it is not the case, simple "Add" will be enough. 

I will fix it.

> - Date & Time - first line "Date/Time created", should be 
>   "Creation date/time" or "Date/Time of creation". 

I will fix it.

> - Origin: Country - entries are ordered alphabetically according to 
>   three letter codes which are not common, better would be order them 
>   according to real names. 

Ah. About this point i have take a look into main application with have an IPTC editor. Bibblepro and xnview work like this.
 
> Nitpicking: 
 
> - General: Everywhere when checkboxes are used checkbox is highlighted 
>   when hovering on space outside of checkbox itself or label but when 
>   clicking nothing happens. Value of option is changed only when 
>   click was while hovering on checkbox or label. This is conflicting 
>   visual feedback - option should be changed each time when info about 
>   focus is given. Heh, checked few other places: this is general Qt/KDE 
>   problem :( 

This is a KDE theme problem on your computer. Here i cannot reproduce it.

> - Date & Time - IMO for date would be better to use KDE date widget, but 
>   I understand there are some dependency considerations 
 
I have tried to do something like that, but i'm a little bit tired (:=))

In TODO (:=)))

> Wish: 
 
> Move "Comments editor" functionality to this new plugin and allow to 
> edit here also Digikam comments and other metadata not used by 
> EXIF/IPTC. 

Well, i have planned to add new plugin action to use it in single mode. Like this i can start IPTC editor dialog directly from a simple "edit" econ on the top of "Metadata" sidebar tab. Also a new menu entry can be add accordinly.

This way will be the same with GPSSync plugin and Map location editor using Google maps.

Gilles
Comment 34 Mikolaj Machowski 2006-10-18 01:37:44 UTC
> > - General: placing of warning note in one place on all screens
> > (bottom?) could be nice visual accent.
>
> Already done by the Note on bottom...


This is not always in the same place. But it is minor problem.

> > - Origin: Country - entries are ordered alphabetically according to
> >   three letter codes which are not common, better would be order them
> >   according to real names.
>
> Ah. About this point i have take a look into main application with have
> an IPTC editor. Bibblepro and xnview work like this.


What Digikam inserts isn't important here. I am thinking primarily about
navigation through menu. Order of countries in this list is different
from order which is in 99% of such lists in Internet. That is my
primary concern.
Comment 35 caulier.gilles 2006-10-18 09:39:26 UTC
SVN commit 596690 by cgilles:

kipiplugins from trunk : MetadataEdit plugin: fix IPTC editor i18n following  Mikolaj Machowski tips.

CCBUGS: 91812

 M  +1 -1      iptccategories.cpp  
 M  +2 -2      iptcdatetime.cpp  
 M  +1 -1      iptckeywords.cpp  
 M  +2 -2      metadataeditdialog.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/iptccategories.cpp #596689:596690
@@ -103,7 +103,7 @@
     d->subCategoriesBox = new KListBox(parent);
     d->subCategoriesBox->setVScrollBarMode(QScrollView::AlwaysOn);
     
-    d->addSubCategoryButton = new QPushButton( i18n("&Add..."), parent);
+    d->addSubCategoryButton = new QPushButton( i18n("&Add"), parent);
     d->delSubCategoryButton = new QPushButton( i18n("&Delete"), parent);
     d->delSubCategoryButton->setEnabled(false);
 
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptcdatetime.cpp #596689:596690
@@ -97,8 +97,8 @@
 
     // --------------------------------------------------------
 
-    d->dateCreatedCheck = new QCheckBox(i18n("Date created"), parent);
-    d->timeCreatedCheck = new QCheckBox(i18n("Time created"), parent);
+    d->dateCreatedCheck = new QCheckBox(i18n("Creation date"), parent);
+    d->timeCreatedCheck = new QCheckBox(i18n("Creation time"), parent);
     d->dateCreatedSel   = new KDateWidget(parent);
     d->timeCreatedSel   = new KTimeWidget(parent);
     d->dateCreatedSel->setDate(QDate::currentDate());
--- trunk/extragear/libs/kipi-plugins/metadataedit/iptckeywords.cpp #596689:596690
@@ -92,7 +92,7 @@
     d->keywordsBox   = new KListBox(parent);
     d->keywordsBox->setVScrollBarMode(QScrollView::AlwaysOn);
     
-    d->addKeywordButton = new QPushButton( i18n("&Add..."), parent);
+    d->addKeywordButton = new QPushButton( i18n("&Add"), parent);
     d->delKeywordButton = new QPushButton( i18n("&Delete"), parent);
     d->delKeywordButton->setEnabled(false);
 
--- trunk/extragear/libs/kipi-plugins/metadataedit/metadataeditdialog.cpp #596689:596690
@@ -132,7 +132,7 @@
 
     QPushButton *editExifButton   = new QPushButton(i18n("Edit..."), exifBox);
     QPushButton *loadExifButton   = new QPushButton(i18n("Load..."), exifBox);
-    QPushButton *removeExifButton = new QPushButton(i18n("Remove..."), exifBox);
+    QPushButton *removeExifButton = new QPushButton(i18n("Remove"), exifBox);
 
     QWhatsThis::add(editExifButton, i18n("<p>Edit EXIF data of selected pictures from the list."));
     QWhatsThis::add(loadExifButton, i18n("<p>Load EXIF data from a picture and set it to selected "
@@ -151,7 +151,7 @@
 
     QPushButton *editIptcButton   = new QPushButton(i18n("Edit..."), iptcBox);
     QPushButton *loadIptcButton   = new QPushButton(i18n("Load..."), iptcBox);
-    QPushButton *removeIptcButton = new QPushButton(i18n("Remove..."), iptcBox);
+    QPushButton *removeIptcButton = new QPushButton(i18n("Remove"), iptcBox);
 
     QWhatsThis::add(editIptcButton, i18n("<p>Edit IPTC data of selected pictures from the list."));
     QWhatsThis::add(loadIptcButton, i18n("<p>Load IPTC data from a picture and set it to selected "
Comment 36 caulier.gilles 2006-10-22 10:08:18 UTC
SVN commit 597975 by cgilles:

kipi-plugins from trunk : MetadataEdit plugin : Finalize plugin

BUG: 91812, 103255

 M  +17 -14    metadataitem.cpp  


--- trunk/extragear/libs/kipi-plugins/metadataedit/metadataitem.cpp #597974:597975
@@ -44,15 +44,17 @@
 
     MetadataItemPriv()
     {
-        enabled    = false;
-        dirty      = false;
-        eraseExif  = false;
-        eraseIptc  = false;
-        readOnly   = false;
+        enabled   = false;
+        dirtyExif = false;
+        dirtyIptc = false;
+        eraseExif = false;
+        eraseIptc = false;
+        readOnly  = false;
     }
 
     bool       enabled;
-    bool       dirty;
+    bool       dirtyExif;
+    bool       dirtyIptc;
     bool       eraseExif;
     bool       eraseIptc;
     bool       readOnly;
@@ -103,7 +105,7 @@
 void MetadataItem::setExif(const QByteArray& exifData, bool dirty)
 {
     setEnabled(true);
-    d->dirty     = dirty;
+    d->dirtyExif = dirty;
     d->exifData  = exifData;
     d->eraseIptc = false;
     setText(2, hasExif() ? i18n("Yes") : i18n("No"));
@@ -113,7 +115,7 @@
 void MetadataItem::setIptc(const QByteArray& iptcData, bool dirty)
 {
     setEnabled(true);
-    d->dirty     = dirty;
+    d->dirtyIptc = dirty;
     d->iptcData  = iptcData;
     d->eraseIptc = false;
     setText(3, hasIptc() ? i18n("Yes") : i18n("No"));
@@ -135,7 +137,7 @@
     if (!isReadOnly())
     {
         d->eraseExif = true;
-        d->dirty     = true;
+        d->dirtyExif = true;
         setText(2, i18n("Removed!"));
         setText(4, i18n("Dirty!"));
         repaint();
@@ -147,7 +149,7 @@
     if (!isReadOnly())
     {
         d->eraseIptc = true;
-        d->dirty     = true;
+        d->dirtyIptc = true;
         setText(3, i18n("Removed!"));
         setText(4, i18n("Dirty!"));
         repaint();
@@ -181,7 +183,7 @@
         {
             ret &= exiv2Iface.clearExif();
         }
-        else
+        else if (d->dirtyExif)
         {
             ret &= exiv2Iface.setExif(d->exifData);
         }
@@ -190,7 +192,7 @@
         {
             ret &= exiv2Iface.clearIptc();
         }
-        else
+        else if (d->dirtyIptc)
         {
             ret &= exiv2Iface.setIptc(d->iptcData);
         }
@@ -202,7 +204,8 @@
         else
             setPixmap(1, SmallIcon("cancel"));
 	
-	    d->dirty = false;
+        d->dirtyExif = false;
+        d->dirtyIptc = false;
     }
 }
 
@@ -219,7 +222,7 @@
 
 bool MetadataItem::isDirty()    
 {
-    return d->dirty;
+    return (d->dirtyExif || d->dirtyIptc);
 }
 
 bool MetadataItem::isReadOnly()