[Kde-hardware-devel] SolidBackendSelector API review

Dario Freddi drf54321 at gmail.com
Sat Mar 28 16:10:42 CET 2009


Hi Ben,

On Saturday 28 March 2009 04:21:25 Ben Cooksley wrote:
> Hi all,
> given that the new Solid backend selector I am creating will
> eventually be used by several different control modules, I thought it
> might be wise to post what I propose for its API.
> What will be present in the API really hinges on one question however:
> will it also be responsible for displaying information about the
> selected backend or not. The proposal below assumes that the
> information will be displayed seperately. A widget for this also would
> be provided along with the selector for use by the applications.

Sorry, but I quite don't get you here. The Solid Backend selector will be a 
module, correct? Adding another level of abstraction to kcmodule doesn't look 
like a great idea to me. If I understood correctly what you want to do, your 
approach is:

 - Create a new KCM
 - Adding a plugin structure to the KCM that lets people register the backend 
on it and let the KCM add a widget and handle the selection.

We surely would have a pro in having GUI consistancy, but I think this could 
be overkill. My take in this would be rather this one: implement a 
backendselector widget, that would have a similar API of the one you 
specified, and let each backend provide its own selector kcmodule under the 
category "backend selector".

This way, the user would click on the "Backend Selection" and will have a list 
of kcmodules on the left for each backend type to configure. I think this is 
the most sensible approach, since it would keep GUI consistancy, would allow 
reusing the widget somewhere else (one never knows), and would let backends 
specify what they like the most in their kcmodule. The effort for the 
programmer would be quite the same.

Such a widget could surely go into kdeui.

Thoughts/opinions on this?

>
> Visually, I propose using a approach similar to the widget used to
> select the Phonon backend, with "Defer" / "Prefer" buttons at the
> bottom of the list.
>
> Cheers,
> Ben
>
> === Proposed specification ==
>
> SolidBackendSelector( QWidget *parent, QString type ) // type is the
> backend type that is going to be configured
>
> Functions:
> void saveConfiguration()
> void defaultConfiguration()
> KIcon backendIcon()
> QString backendName()
> QString backendComment()
> QString backendVersion()
>
> Signals:
> void selectionChanged()
> _______________________________________________
> Kde-hardware-devel mailing list
> Kde-hardware-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kde-hardware-devel

-- 
-------------------

Dario Freddi
KDE Developer
GPG Key Signature: 511A9A3B

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/kde-hardware-devel/attachments/20090328/7192725d/attachment.sig 


More information about the Kde-hardware-devel mailing list