[Kde-imaging] feature list for host apps

Jesper K. Pedersen blackie at kde.org
Fri May 7 11:38:22 CEST 2004


I'm currently trying to port the acquireimag plugin, and that has raised a few 
questions (I'll address each in separate mails to focus each discussion)

As mentioned elsewhere in our discussion, I want in the end KimDaBa to be as 
easy to use that people not very used with computers can use it. Its 
therefore important to me that we do not have widgets around which never will 
do anything.

An example of such a widget is the "album comment" in the acquire image 
plugin.
In KimDaBa there really are no concept of albums, so whatever I make up to the 
plugins to look like albums would indeed never have a comment.

From KimDaba's point of view, I would like this widget to not show up at all.

We do indeed agree that code saying something like
if ( hostApp == "KimDaBa" )
  commentArea->hide();
is ugly,

But how about this idea:
How about in the KIPI::Interface class have the following code

namespace KIPI {
  enum Features { AlbumsHaveDescriptions = 0x0001, xxx = 0x0002, 
                  yyy = 0x0004, ... }
  Class Interface {
     int features();
     ...
  }
}

In plugins which want to integrate well into the apps, they could now have 
code like

if ( interface->features() & AlbumHaveDescriptions  == 0 ) {
   // Host app does not have the concept of album description
   commentsArea->hide();
}
 
Cheers
Jesper


More information about the Kde-imaging mailing list