Plasma::Service API addition

Aaron J. Seigo aseigo at kde.org
Sun May 13 13:48:36 UTC 2012


On Friday, May 11, 2012 17:29:44 Alex Merry wrote:
> On 11/05/12 12:18, Aaron J. Seigo wrote:
> > On Friday, May 11, 2012 11:59:59 Alex Merry wrote:
> >> What's the best thing to do here?
> > 
> > i just reviewed the change; it can go in imho. it's a short term fix,
> > though, as we need to chnage this for libplasma2...
> 
> It's probably worth considering the interaction between Plasma::Service
> and declarative applets generally.  I ran into issues with keeping
> around an instance of Plasma::Service (I tried to keep it as a QtObject
> property on a QML item, which didn't work), and eventually managed to
> get it working by storing it as a variable in a separate .js file (which
> I remembered doing in another QML project of mine).

putting it in a variant roperty didn't work?

> I think having a DataSource equivalent for Plasma::Service would be
> good, and allowing things like
> 
> Button {
> 	text: "Open"
> 	enabled: mprisService.commands.openUri.enabled
> 	onClicked: mprisService.commands.openUri({url = uriEdit.text});
> }
> 
> or something along those lines.

that would be nice, with some caveats: Service is not a push API, so the 
enabled example above would imply polling. really, that's more appropriate to 
a data engine. the onClicked example makes sense, however.

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20120513/ecea0bac/attachment.sig>


More information about the Plasma-devel mailing list