RFC: plasma2 and configuration

Aaron J. Seigo aseigo at kde.org
Wed Feb 27 10:23:53 UTC 2013


On Tuesday, February 26, 2013 22:40:11 Marco Martin wrote:
> http://wstaw.org/m/2013/02/26/plasma-desktopzd2899.png
> (well, will have to look better, but as Emmet Brown would say "You'll have
> to forgive the crudeness of this model, I didn't have time to paint it or
> build it to scale." ;)

:)

> config.qml looks like this:
> QtObject {
> 
>     property list<QtObject> modules: [
>         QtObject {
>             property string name: "General"
>             property string icon: "plasma"
>             property Component component: Component {
>                 Item {
>                     .....
>                 }
>             }
>         },
>        QtObject {
>             property string name: "Page2"
>             property string icon: "buh"
>             property Component component: Component {
>                 Item {
>                     .....
>                 }
>             }
>       }
>     ]
> }
> 
> 
> it still looks a bit clunky, and perhaps a bit error prone as well, but
> something more refined can come from that...

definitely on the right track, imho ... and perhaps by creating a small set of 
components it can become more succinct and reliable like:

import org.kde.plasma.configuration as PlasmaConfiguration

PlasmaConfiguration.ModuleModel {
     modules: [
          PlasmaConfiguration.Page {
              name: i18n("General")
              icon: "plasma"
              component: MyComponentInAnotherFile
          },
	  ....
     ]
}

-- 
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/20130227/81da8f1d/attachment.sig>


More information about the Plasma-devel mailing list