[Kde-imaging] Image plugins question

ian geiser geiseri at yahoo.com
Wed Jan 12 13:56:55 CET 2005


Greetings,
 I recently added wrote an application that uses the libkipi plugins.  I had a 
few observations and would like to start a dialog so that the libkipi 
interface for host applications can become less painful.

 The first observation is that there is quite a bit of code to do simple 
things.  I have not written a plugin, but I was told this was so plugins are 
easier to write.  One thing I did notice was for the enormous amount of code 
that was needed to use libkipi in the host application there where no ways to 
do the following:
 1) configure the plugin via the host applications gui
 2) control options in the plugin via the host application 
  example: I have scripting support in my application but
   there is no way to set properties in the plugin and execute
   the plugins action.

 Now 1 is pretty simple, we can just export a QWidget that the host 
application can null check, and if its a valid pointer, slide it into the 
main config dialog.  2 is a bit more complicated.  Historicly most 
applications (in Win32 and MacOS classic land) would use a "property map" to 
set properties in the plugin, and then an "execute" method to tell the plugin 
what to do.  Personally I find this a bit inflexible because you don't get 
nice things like validation, or more complex operations on a plugin.  One 
option I am leaning towards is DCOP.   DCOP has some advantages here when 
used in a plugin.  When DCOP is used in process you do not have to go through 
the server, this means less overhead.  It also allows more complex 
functionality without resorting to direct linkage.  The drawback of DCOP is 
that there is no real good way to enforce a uniform interface.  In my case 
this is not a show stopper since scripts are accessing the plugins via 
KScriptInterface.

 Does anyone here have any thoughts on the issues?

Cheers
 -ian reinhart geiser


More information about the Kde-imaging mailing list