Review Request 124537: RFC: Add autocfg property magic for applet config dialogs

Marco Martin notmart at gmail.com
Fri Jul 31 12:55:51 UTC 2015


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124537/#review83231
-----------------------------------------------------------


I like the idea, not sure about the autocfg_ prefix.
was it discussed in a bof? are there notes about it?

- Marco Martin


On July 30, 2015, 8:38 p.m., Kai Uwe Broulik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124537/
> -----------------------------------------------------------
> 
> (Updated July 30, 2015, 8:38 p.m.)
> 
> 
> Review request for Plasma.
> 
> 
> Repository: plasma-desktop
> 
> 
> Description
> -------
> 
> Now you can use autocfg properties to applet config dialogs which are smarter than the cfg stuff we currently have. Instead of binding it directly to a property you bind it to an item and it tries to figure out what to do based on the properties the item has and the type of the config.
> 
> This allows us to automatically reflect immutables (cf. LiMux) in the UI without further ado by the plasmoid programmer. It can:
> 
> Boolean config:
>   - If it's bound to sth with a "checked" property (eg. checkbox), it sets checked to the config
> 
> Int config:
>   - If it's bound to sth with a "currentIndex" property (eg. combobox), it sets currentIndex to the config
>   - If it's bound to sth with value, minimumValue and maximumValue property (eg. slider or spinbox) it sets value to the config
> 
> String config:
>   - If it's bound to sth with a "text" property (eg. textfield) it sets text to the config
> 
> Maybe there's even more? We don't really have introspection so I just rely on properties being there and the programmer not doing rubbish. We could also use the label from the config xml and/or auto-populate min/maxvalue
> 
> 
> Diffs
> -----
> 
>   desktoppackage/contents/configuration/AppletConfiguration.qml 0302c7a 
> 
> Diff: https://git.reviewboard.kde.org/r/124537/diff/
> 
> 
> Testing
> -------
> 
> Working pretty nicely
> 
> 
> Thanks,
> 
> Kai Uwe Broulik
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20150731/a40c8dc1/attachment.html>


More information about the Plasma-devel mailing list