[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-panel-devel
Subject: Re: DataEngine and actions
From: Alex Merry <huntedhacker () tiscali ! co ! uk>
Date: 2008-07-31 11:02:00
Message-ID: 200807311202.01344.huntedhacker () tiscali ! co ! uk
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
On Thursday 31 July 2008 09:23:53 Ivan Čukić wrote:
> For example, tasks in the tasks data engine could have the activities
> 'minimize', 'close', 'activate'... the places engine could have 'open',
> 'unmount'... the contacts engine.. etc. You get the picture.
> This implies that Plasmoid developers should know KDE's APIs even for the
> simplest tasks (creating a device notifier should really be trivial).
Isn't this what Plasma::Service provides?
So the tasks engine would, for example, implement serviceForSource to return a
Plasma::Service for a given task id. Then the tasks applet could do
Plasma::Service* service = dataEngine("tasks")->serviceForSource(taskId);
service->startOperation(service->operationParameters("activate"));
They'd have to do some KConfigGroup stuff if they wanted to pass arguments.
Also, there's currently no API for finding out whether a given action is
possible for a given data source (so I'm passing that info from the data
engine in nowplaying, for example).
If you're interested in seeing Plasma::Service in action, have a look at the
nowplaying dataengine and applet.
Alex
--
KDE: http://www.kde.org
Ubuntu/Kubuntu: http://www.ubuntu.org http://www.kubuntu.org
["signature.asc" (application/pgp-signature)]
_______________________________________________
Plasma-devel mailing list
Plasma-devel@kde.org
https://mail.kde.org/mailman/listinfo/plasma-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic