[Digikam-devel] Reg Kipi-interface in Digikam

Caulier Gilles caulier.gilles at kdemail.net
Sat May 20 22:37:19 BST 2006


Le Samedi 20 Mai 2006 11:24 PM, Vardhman Jain a écrit :
> Hi,
>       I just commited the code for adding the tags support by attributes()
> function. On attributes function has been implemented, others like
> clearAttributes and addAttributes are not.

Well, still todo... yes?

> Albumdb class has a new method now, called getImageId(album Id, path) for
> the reasons discussed earlier.

ok. have you tested your code with a plugin ? Have you checked your 
implementation using valgrind (to be sure of course (:=))) ?

> Sorry i didn't know how to do CCMAIL in commit mesg, next time I would do
> that.

look here on the bottom of the page :

http://developer.kde.org/policies/commitpolicy.html

Thanks for your help

Gilles

>
> Vardhman
>
> On 5/9/06, Vardhman Jain <vardhman at gmail.com> wrote:
> > Hi,
> >        There is something extra which I guess needs to be discussed. Most
> > of the methods in KipiInterface just use albumDB interface to fetch/set
> > some data about the photo in the database. This construction doesn't
> > basically allow some temporary data storage which might be required for
> > the session purposes only, let me explain.
> >
> > If the user says he wants to upload the photos to flickr and wants to add
> > some extra tags to the photos when they are uploaded to flickr and
> > doesn't want to effect his original tags in digikam database. We cannot
> > use AlbumDB object here to store the temporary information.
> >
> > The solution in my opinion is to allow a
> > DigikamImageInfo::QMap<QString,QVariant> attributes; member in the
> > DigikamImageInfo to allow saving of data temporarily in the object using
> > addAttributes() by the host application, while using attributes() from
> > the plugin code to obtain the data ?
> >
> > Please let me know ur viewpoints...
> >
> > Vardhman
> >
> > On 5/8/06, Caulier Gilles < caulier.gilles at kdemail.net> wrote:
> > > Le Samedi 06 Mai 2006 11:46 AM, Vardhman Jain a écrit:
> > > > Hi,
> > > >        I am trying to hack in to the kipiinterface.cpp/.h files for
> > >
> > > adding
> > >
> > > > some functionality to the attributes/setAttributes etc functions. I
> > >
> > > have
> > >
> > > > some doubts whose clarfification will help me a great deal.
> > >
> > > You want said these methods :
> > >
> > > QMap<QString,QVariant> DigikamImageInfo::attributes()
> > > void DigikamImageInfo::clearAttributes()
> > > void DigikamImageInfo::addAttributes( const QMap<QString,QVariant>& )
> > >
> > > right ?
> > >
> > > > The function Albumdb->getItemTagNames( ImageId id)   takes an image
> > > > id
> > >
> > > as
> > >
> > > > an argument, while almost all other functions mostly use a
> > > > combination
> > >
> > > of
> > >
> > > > Album id and photo Url.
> > > > There are some functions which work on ImageId but they are not at
> > > > all
> > >
> > > used
> > >
> > > > in implementation.
> > > >
> > > > As far as I can see there is no easy way to obtain an ImageId given a
> > > > DigikamImageInfo object. Therefore I would like to ask if it would be
> > >
> > > okay
> > >
> > > > to add another method in albumDb interface to allow seeking the tag
> > >
> > > info by
> > >
> > > > combination of AlbumId and imageURL or a function should be added to
> > >
> > > return
> > >
> > > > the imageId of a image given its AlbumId and imageURL in the albumDB
> > >
> > > file
> > >
> > > > again ?
> > >
> > > Yes, you can do it. Just overload the current methods and don't touch
> > > the
> > > current implementation. Like this you don't unbreak the tests released
> > > on
> > > this methods for 0.9.0 release.
> > >
> > > Please, add comments in method headers, like others current methods
> > > using
> > > Doxygen syntax.
> > >
> > > When you commit, please CCMAIL on digikam-devel at kde.org . Thanks in
> > > advance...
> > >
> > > Gilles
> > > _______________________________________________
> > > Digikam-devel mailing list
> > > Digikam-devel at kde.org
> > > https://mail.kde.org/mailman/listinfo/digikam-devel
> >
> > --
> > Blogs: http://vardhman.blogspot.com



More information about the Digikam-devel mailing list