Declarative UI integration v0.2

Alan Alpert alan.alpert at nokia.com
Fri Oct 2 07:54:19 CEST 2009


On Fri, 2 Oct 2009 13:11:47 ext Aaron J. Seigo wrote:
> On October 1, 2009, Alan Alpert wrote:
> > On Fri, 2 Oct 2009 02:33:52 ext Aaron J. Seigo wrote:
> > > On October 1, 2009, Alan Alpert wrote:
> > > > Hi Plasma Devs,
> > > >
> > > > The feedback on this list was of great help in rethinking the design
> > > > of the Qt Declarative plasma integration. I thought I might spend
> > > > more time thinking about the design and soliciting feedback before I
> > > > rush off and implement something this time :).
> > > >
> > > > The way we get a QML file loaded into an applet is with a
> > > > PlasmaQmlView, a QGraphicsWidget that you can give a QML file and
> > > > then deal with like any other QGraphicsWidget. One reason we need the
> > > > redesign is that you should be able to have multiple ones in an
> > > > Applet and the 'Plasmoid' item was supposed to only be used once. The
> > > > PlasmaQmlView automatically loads the Plasma items library from the
> > > > C++ side, so that you can import it in QML. There would also still be
> > > > the script engine for QML only applets.
> > > >
> > > > Once the file is loaded we need to provide ways for it to access
> > > > plasma specific functionality. The plasma functionality which I
> > > > believe needs to be exposed is:
> > > > -Plasma Widgets
> > > > -Plasma Theme (SVGs/colors)
> > > > -Plasma data sources (through data engines)
> > > > -Centrally managed configuration data storage
> > > > -Config dialog requested
> > >
> > > there will also be the stock Plasma animations; internally the use
> > >  QtKinetic but they are "prebuilt" ones that can be requested by name.
> >
> > I don't think we can just drop them in directly, the QML animations are a
> >  bit different to straight Kinetic ones (due to being used slightly
> >  differently). But if the plasma ones are just presets then it should be
> >  easy to create QML animations with the same name and effect. QML
> >  animations use Qt Kinetic's animation framework internally too, so there
> >  should be no visual difference. I will take a better look at seeing if
> >  they could be used directly though, before copying them.
> 
> that sounds sub-optimal. if QML uses Kinetic internally, then why can't it
> incorporate other Kinetic based animations?

Whoops. After investigating the issue I've realized that I was wrong. The 
animations QML comes with do more things than the Kinetic Animations, but if 
all you want is the same functionality then it's fine. My apologizes for the 
confusion.

So yeah, we should be able to just drop the Plasma animations in directly as 
well.

-- 
Alan Alpert
Software Engineer
Nokia, Qt Development Frameworks


More information about the Plasma-devel mailing list