[Kde-imaging] ImageCollection or Browser

Aurélien Gâteau aurelien.gateau at free.fr
Thu Jun 24 12:18:13 CEST 2004


Le mercredi 23 Juin 2004 21:34, vous avez écrit :
> | It seems we need "selection only" plugins. That is plugins which should
> | only be enabled if images are selected. I suggest the following:
> | - Add a slot named Interface::slotSelectionChanged() and a KIPI feature
> | named SelectionOnlyPlugin.
> | - The host app should call Interface::slotSelectionChanged() when the
> | selection changes.
> | - slotSelectionChanged() should loop on all plugins with the
> | SelectionOnlyPlugin feature and disable or enable them if there is a
> | selection.
>
> The host application already do emit signals, among these
> selectionChanged( bool hasSelection );
>
> Wouldn't it be better to connect it to such signals?

So maybe it can be fixed from within the plugin this way:

// Plugin constructor
MySelectionPlugin::MySelectionPlugin(KIPI::Interface* interface) {
   connect(interface, SIGNAL(selectionChanged(bool)),
   _mySelectionOnlyAction, SLOT(setEnabled(bool)) );
}

What do you think about this? I think it should solve your problem Renchi.

PS: Jesper, please ignore the previous mail which got sent to you instead of 
the list.

Aurélien


More information about the Kde-imaging mailing list