On Thursday 16 September 2010, Marco Martin wrote: > Hi all, > the status of an AppletScript for writing plasmoids in pure QML is > progressing rather well, i thought to write a detailed status > report/documentation before significative design problems go too far in > the implementation, be patient, is really long, but it can be used as a > basis for a future documentation.
Almost implemented services support (there is a qml nowplaying plasmoid to test it), but there are two quite ugly problems (that derive from not having access to the engine): services: we need to manipulate kconfiggroup from javascript, but we can't registed the conversion to scriptvalues: that is valid for any type tht is not a qobject, oh joy. at the moment resolved with a function AppletInterface::setOperationValue(KConfiggroup, key, value) that's rather ugly. i was also thinking bout registering an object for operations that would be declared in qml directly like ServiceOperation { id: operation service: dataEngine.service operationDescription: "seek" } then one would set the operation parameters with something like operation.setParameter("seconds", 120); operation.start() (because dynamic properties are not available in qml, so no operation.seconds=120 :/) second problem: services support the neat feature of being automatically associated to a widget, so doing someting like service.associateWidget(stop, "stop"); now, i can call this from the qml javascript, but the thing that gets in the parameter instead of the widget is some misterious value that i'm not even sure it started as a pointer (no, it's not a QObject*) so anohter thing that would not be possible is to pass pointers to the internal qml items passed by id in an external c++ object. i see this as another potentially limiting thing. still have to give a crack to event listeners, that one looks slightly more feasible Cheers, Marco Martin _______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel