Plasma Javascript Bindings inside QML

Marco Martin notmart at gmail.com
Tue Mar 23 19:15:28 CET 2010


On Tuesday 23 March 2010, Aaron J. Seigo wrote:
> On March 22, 2010, Alexis Ménard wrote:
> > Hello,
> > 
> > I just wonder which part of the Plasma bindings we want to put into QML :
> > 
> > http://techbase.kde.org/Development/Tutorials/Plasma/JavaScript/API
> > 
> > All the UI related stuff is pretty much useless because QML provides
> > those facilities. It would be nice to have a list so we can think
> > about what we can do for it.
> 
> the UI related API can be divided (roughly) into three bits:
> 
> * the classes in kdelibs/plasma/widgets/ being loaded via the QObject
> bridging provided by QtScript. we should have those widgets available from
> QML.

as far i seen it's pretty easy to bind any qgraphicswidget into qml..
the bad news is that it will behave as a second class citizen not being a 
QDeclarativeItem, so can't be in a qanchorlayout ar directly be a listview 
delegate for instance, everything will have to go for a proxy object called 
GraphicsObjectContainer, i'm still a bit uneasy with this one.

> * bindings for the QGraphicsLayout classes. those are unneeded in QML.
> 
> * QPainter and related; we don't need any of that since there is no direct
> painting in QML. the bindings for QRectF, QPoint, QColor, etc may or may
> not be of use, but are small and would be nice to have if QML doesn't
> already provide for nice programmatic access to things like colors.
pretty sure QSizeF is accessible as size.width and size.height, used it and 
would be nearly impossible to do any good with qgraphicswidgets in qml 
otherwise, hope also the other stuff is present


> all the rest of the JS bindings, which are mostly about things other than
> GUI, ought to be in there.
yeah, dataengine, services etc, all vital

Cheers,
Marco Martin


More information about the Plasma-devel mailing list