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

Kai Uwe Broulik kde at privat.broulik.de
Wed Feb 8 11:39:09 UTC 2017


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

(Updated Feb. 8, 2017, 11:39 vorm.)


Status
------

This change has been discarded.


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/20170208/7dc98967/attachment.html>


More information about the Plasma-devel mailing list