QML and Plasma -> progress()
Marco Martin
notmart at gmail.com
Thu Oct 14 21:33:40 CEST 2010
Hi all,
soo, qml javascript support landed in kdebase/runtime ;)
what e have is:
* QML bindings for various classes, done as imports (in runtime as well,
turned out wasn't necessary to drop this load directly in libplasma) and
divided in 3 modules:
- org.kde.plasma.graphicswidgets : our old qgraphicswidgetsthey are still
needed now, should be reasonably eas to drop in replace them with the
corresponding qtcomponents
- org.kde.plasma.graphicslayouts : bindings for qgraphicslinearlayout and
qgraphicsgridlayout. perhaps not 100% needed but helps in the transition (at
least this ones have sizehints, we'll going to suffer for the lack of them,
meh)
- org.kde.plasma.core : basically the stuff that is here to stay: DataSource
to wrap dataengines in a declarative way (and use than anywhere in qml even
qmlviewer) Theme to have the plasma colors, Svg, FrameSvg (that are the non-
graphic classes) SvgItem and FrameSvgItem that are declarativeitems to paint
svg and framesvgs, will be pretty fundamental to implement our qtcomponents,
the only thing that sucks about them is that is no longer possible recycle a
single instance to draw multiple things like we do with qpainter all over the
place (maybe sharing them like for frames in framesvg, or maybe the frame data
sharing is enough, has to be measured.
the scriptengine itself...
it shares the same packagestructure as the js scriptengine.
it shares also all the classes (it uses just a subset of the bindings
actually)
the difference is the scriptengine class itself SimpleJavascriptApplet vs
DeclarativeAppletScript
so 2 plugins are made. the library of the declarative plugin is about half big
of the js one btw
a qml file must be the "main one" and be set in the desktop file as
mainscript.
as discussed the other day the "qml" folder in the package will be dropped
and qml files be into the "ui" folder, right?
now, probably something is still missing/wrong from the bindings, so would be
good whoever is interested to give it a try before 4.6 ;)
Cheers,
Marco Martin
More information about the Plasma-devel
mailing list