[Kde-imaging] Selecting images for plugins

Aurélien Gâteau aurelien.gateau at free.fr
Mon Jun 28 17:45:28 CEST 2004


Le lundi 28 Juin 2004 15:26, Jesper K. Pedersen a écrit :
e the following API:
> |
> | class AlbumSelector {
> |   void setMultiSelection(bool);
> |
> |   // Returns the selected image collection.
> |   // Only valid if multi collection is off
> |   ImageCollection imageCollection() const;
> |
> |   // Returns the images of all selected image collection.
> |   // An image won't appear twice in the returned list.
> |   KURL::List images() const;
> | }
> |
> | What do you think about this?
>
> images() is not needed is it? that is returned from ImageCollection.

It is for plugins which don't care about albums, but only want a set of 
images, like CD archiving plugin.


> Besides your AlbumsSelector inherits QWidget, right?

Yes. A better API would be:

class AlbumSelector : public QWidget {
  bool multiSelection() const;
  void setMultiSelection(bool);

  // Returns a list of all selected image collections.
  // If multiSelection is off, the list will only contain one item
  QValueList<ImageCollection> selectedImageCollections() const;

  // Returns the images of all selected image collections.
  // An image won't appear twice in the returned list.
  KURL::List images() const;
}


Aurélien


More information about the Kde-imaging mailing list