[Kde-hardware-devel] SolidBackendSelector API review

Ben Cooksley sourtooth at gmail.com
Sat Mar 28 23:02:34 CET 2009


On Sun, Mar 29, 2009 at 4:10 AM, Dario Freddi <drf54321 at gmail.com> wrote:
> 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".

Apologies if I misunderstood it, but it seemed to me that this widget
would be integrated directly into the modules themselves ( Bluetooth
backend selection in the Bluetooth module, etc. ). If this wasn't the
idea then the API is definitely overkill.

>
> 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.
This seems quite sensible.
>
> 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
>
>


More information about the Kde-hardware-devel mailing list