[Digikam-devel] Question regarding KIPI::ImageInfo

Renchi Raju renchi at pooh.tam.uiuc.edu
Sun Jul 10 22:23:31 BST 2005


Vardhman Jain wrote:
> Hi,
>      In a plugin I am trying to make, I have a list(array) of files to
> be processed, I followed some example and understood that QPair is
> being used in most of them as the base element in a Queue, most
> example use QPair<QString, QString> as they need some simple
> data(second QString) along with the file path(the first QString), but
> in my case I want to pass the complete KIPI::ImageInfo as the second
> argument. That will allow me extract lots of information when the
> element is actually processed. So I wrote this code
> [snip]
>     typedef QPair<QString,KIPI::ImageInfo> Pair;
>     m_uploadQueue.clear();
>     for (KURL::List::iterator it = urls.begin(); it != urls.end(); ++it)
>     {
>         KIPI::ImageInfo info = m_interface->info( *it );
>         kdDebug( 50001 ) <<" Adding images to the list"<<endl;
>         m_uploadQueue.append( Pair( (*it).path(), info ) );
>     }
> [/snip]
> The code doesn't compile saying KIPI::ImageInfo::ImageInfo() is a
> private contructor,(which is true), what is the way of storing whole
> ImageInfo object in the array. It is not supposed to be done, also
> will it have some adverse effect on performance? (Due to size of the
> ImageInfo objects?)

the plugin should not create ImageInfo objects. these are created on the 
host end and the properties are set there. you will need to store 
pointers to the imageinfo:
typedef QPair<QString, KIPI::ImageInfo*> Pair;

> Second Question: how would I extract tags of a image given ImageInfo object? 

tag is not an attribute which is exported currently from digikam; its 
available only as a imagecollection object. it needs fixing.

renchi



More information about the Digikam-devel mailing list