RFC: plasma2 and configuration

Marco Martin notmart at gmail.com
Wed Feb 27 17:42:43 UTC 2013


On Wednesday 27 February 2013, Marco Martin wrote:
>     ListElement {
>         title: i18n("stuff")
>         icon: "bar"
>         source: "bar.qml"
>     }
> }
> 
> the component could just be there by filename but i think wouldn't be a
> serious issue (makes easier to formfactorize, actually)
> 
> the actually serious problem is that here scripts aren't supported on the
> right hand, so title: i18n("stuff") won't work :/

a bit too much lines of code after:
all plasmoids have to have in the pages config is:
import QtQuick 2.0

import org.kde.plasma.configuration 0.1

ConfigModel {
    ConfigCategory {
         name: "General"
         icon: "plasma"
         source: "configGeneral.qml"
    }
    ConfigCategory {
         name: "Page2"
         icon: "stuff"
         source: "whatever.qml"
    }
    .....
}

and that's it.

this org.kde.plasma.configuration import at the moment is available only from 
that config.qml file (is now in config/ since there is no ui at all) and from 
the qml files of the corona part of the configuration ui. (and yes, 
"whatever.qml" is resolved using package, so if for another formfactor another 
"whatever.qml" is defined, will automagically work)

the c++ implementation is quite scary, but in the end the qml part ends up 
being quite elegant

Cheers,
Marco Martin


More information about the Plasma-devel mailing list