[Kde-imaging] Selecting images for plugins

Jesper K. Pedersen blackie at blackie.dk
Mon Jun 28 18:00:59 CEST 2004


On Monday 28 June 2004 17:57, Renchi Raju wrote:
| On Mon, 28 Jun 2004, Jesper K. Pedersen wrote:
| > On Monday 28 June 2004 17:48, Renchi Raju wrote:
| > | On Mon, 28 Jun 2004, Aurélien Gâteau wrote:
| > | > What I want now is:
| > | > - All dialog based plugins use a libkipi widget (KIPI::AlbumSelector)
| > | > to select albums.
| > | > - All dialog less read-only plugins use currentSelection() or
| > | > currentScope(). - All dialog less plugins which modifies images use
| > | > currentSelection() only.
| > |
| > | sounds perfect. (still not hot about currentScope, though)
| >
| > Well current scope is what makes the plugin integrate smoothly into both
| > your and my application.
| >
| > default impl could be your way, fine by me:
| >
| > virtual ImageCollection Interface::currentScope() {
| >   return currentSelection();
| > }
| >
| > virtual ImageCollection KimDaBaInterface::currentScope() {
| >   if ( currentSelection().valid() )
| >     return currentSelection();
| >   else
| >     return currentAlbum();
| > }
|
| and how exactly does it value on top of just having
| currentSelection/currentAlbum.

Plugins use currentScope, and digikam/kimdaba chooses what it means.

It makes for a "default". In other words, the plugin uses what fits with teh 
rest of the host app. Without this function I need to change the 
implementation of currentSelection() and/or currentAlbum(), in which case a 
plugin would not be able to get the current selection and/or album anymore.


More information about the Kde-imaging mailing list