[Kde-imaging] ImageCollection or Browser
Jesper K. Pedersen
blackie at blackie.dk
Mon Jun 21 00:25:04 CEST 2004
| I would like to start the discussion with the first issue: ImageCollection
| or Browser.
|
| This issue is described in the libkipi/design document, wrote by Jesper. In
| short, I suggested to modify all plugins to use a QListView which would
| display the available image collections, letting the user select an image
| collection within this list.
|
| Jesper had a problem with this because this model would not fit with the
| way KimDaBa works. Instead, he suggested to replace the current system with
| a new host-app implemented class: KIPI::Browser, which would provide to the
| plugins:
| - A widget to choose images from
| - A method to get the list of images the user selected.
|
| The big advantage of this method, is that libkipi would no longer force
| host apps to work in terms of image collections. It also allows for better
| integration between the application and the plugin.
|
| The (simplified) defintion would look like this:
|
| class Interface {
| ...
| virtual Browser browser() = 0;
| }
|
| class Browser {
| public:
| Browser( BrowserShared* );
| virtual QWidget* widget( QWidget* parent );
| KURL::List images();
| }
|
|
| While creating its GUI, the plugin would do:
|
| Browser browser=interface->browser();
| QWidget* browserWidget=browser->widget();
|
| // Assuming layout is a pointer to a QBoxLayout
| layout->addWidget(browserWidget);
|
|
| To process images, the plugin would do:
| Browser browser=interface->browser();
| KURL::List images=browser->images();
|
| for (image in images) {
| ...
| }
|
|
| This solution sounds great to me, and I guess Jesper likes it too :-).
| Renchi, Gilles, what do you think of this?
Actually I'm afraid that I've changed my mind on it after having slept on it
for quite a few nights ,-)
Unfortunately now isn't really the time to make deep thoughts, so I'll
postpone answerting this till tomorrow.
In the meantime, Aurelien, please lets reiterate, why is it we want to change
things as they are now?
More information about the Kde-imaging
mailing list