kinetic-declarative plasma integration

Marco Martin notmart at gmail.com
Sun May 24 17:23:12 CEST 2009


On 5/13/09, Alan Alpert <alan.alpert at nokia.com> wrote:
> Hi Plasma devs,
>
> Those of you following Qt Labs closely will have heard about Qt Kinetic's
> Declarative UI
> http://labs.trolltech.com/blogs/2009/05/13/qt-declarative-ui/ . As
> Declarative UI is targeted towards enhancing the same sorts of applications
> as Plasma, plasma integration is a good real-world fit. So we've throw
> something together (it's in playground/base/plasma/kinetic-declarative) and
> hope that it might be useful in your plans to add Netbook and media center
> components; declarative UI is designed to help create embedded device style
> UIs! The Plasma integration we've done allows plasmoids to be written
> exclusively in QML, or in conjunction with C++. I'll let the blog posting
> handle all the riveting details on Declarative UI itself, and focus on
> providing more technical details about the plasma integration we've done.
>
> Firstly the suggested plan for the plasma integration is that it lives in
> playground and is not intended for general use until Qt Declarative
> stabilizes. Where it goes in terms of technical improvements is unknown; but
> we'd love to see what people do with it. So far it's not complete, but
> provides a good glimpse of how Declarative UI could benefit a project like
> Plasma. Gaps in the integration that we're aware of include setting the
> background hint from QML, using plasma widgets from QML and refactoring the
> QML frontend part of the kinetic plasmoid into a library class you can just
> inherit from and call setQml() on.
>
> If you checkout the plasma integration repository you'll find that it
> provides
> a script engine that can run packages comprised of QML files, a plasmoid
> that
> acts like the qmlviewer program and an example of an applet written in C++
> that draws on a QML file for its fluid UI. There is also a file explaining
> how to use plasma features like the data engines and theme easily in your
> QML

oh, a problem i've found in this is that if a qml file had some
keyboard actions defined in it (like a listview that changes the
active item with arrow keys) they won't work when embedded in the
plasmoid, while they work fine in qmlviewer (just a wild guess:
perhaps is due to the fact er're using a qgraphicsview and not a
qfxview here?)

> files, along with the standard QML described in the labs post. You need only
> the Qt Kinetic Declarative UI repository and KDE trunk as recent as 4.3 beta
> 1 (r964546) and you can add Declaratively styled plasmoids to your desktop.
> The attached screenshot shows my desktop covered in QML plasmoids, although
> the animation doesn't get conveyed well in pictures. The plasmoids to the
> left are the plasma-integration examples, and the plasmoids to the right are
> examples for just regular Qt Declarative. Sadly I'm not technically
> competent
> in graphic design and so the plasma integration repository contains a dearth
> of compelling examples. But on the plus side it's easy to run any of the
> Declarative UI examples as simple plasmoids if you really like them. Note
> that the examples in the screenshot that weren't designed as plasmoids have
> had minor changes (set 'clip: true' on the root item and remove any opaque
> background image) to make them fit in better.
>
> There is only one good example in the plasma integration repository, a
> weather
> plasmoid. Because there's only one, it has been a little warped so that it
> can be used in a variety of different ways (you can run it as an applet, as
> a
> non-applet C++, through the script engine and through the kinetic plasmoid).
> Despite this the weather example is still a surprisingly small amount of
> code
> to get a fairly fluid visualization of the weather data engine. And
> that 'code' does not need to include C++ (although the weather data engine
> is
> not designed to be set up declaratively). If even I can make something that
> looks decent I can't wait to see what actual designers do with it.
>
> Qt Kinetic Declarative UI is still under development and not ready for
> general
> use, the plasma integration doubly so. However, we'd love for you to play
> around with it and tell us your thoughts. This will help us improve
> Declarative UI even further before release.
>
> --
> Alan Alpert
> Software Engineer
> Nokia, Qt Software
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>


More information about the Plasma-devel mailing list