KDE-ify QML all across KDE
Shantanu Tushar Jha
jhahoneyk at gmail.com
Thu Jan 27 09:09:40 CET 2011
Hi Marco,
I'm am working on Calligra Mobile as an Intern at Nokia. Just remembered
that you had sent this mail. I understand that libkdeclarative is planned to
be *the* way to access essential kdelibs functionality. If so, I was
thinking about adding functionality to libkdeclarative as per needs arise
for calligra mobile.
e.g. right now I need a way to access Image loading in QML similar to
KIcon("kwords.png"), so we can add something to libkdeclarative, right?
Cheers,
--
Shantanu Tushar (UTC +0530)
http://www.shantanutushar.com
On Sun, Jan 9, 2011 at 10:11 PM, Marco Martin <notmart at gmail.com> wrote:
> Hi all,
> during last couple of days I've been working on
> git at git.kde.org:scratch/mart/libkdeclarative
>
> This is a thing we agreed upon (and that I promised to do ;) at the mobile
> sprint.
> It's a little ~60KB library that's meant to be used inside KDE apps that
> are
> using QML, what do they do? but before, a bit of history:
>
> Since 4.6, Plasma has bindings to write plasmoids using just
> QML/Javascript,
> and especially in the light of our previous pure JS bindings, we
> immediately
> had some issues, that made KDE integration really poor, namely:
> * no way to use our own i18n
> * not possible to use Icons, pixmap and images (only pathnames of on-disk
> images)
> * no kconfig, kjobs
> * all urls manipulation hidden deeply into default qml elements only
> accepting
> strings
>
> This mostly because 2 severe design limitations of QML:
> * no access to the QScriptEngine
> * read only QScriptEngine main object
>
> that made impossible among other things to register any non-qobject class
> or
> global functions. Both are possible to be "reverted" in a quite hacky way,
> but
> so needed that made the hack acceptable to us, so now the QML based
> plasmoids
> can do all of the above without problems.
>
> Talking with the PIM people we discovered they had all of the same
> problems,
> so we agreed with them to have a KDE-wide solution that would make easy to
> anybody to use in a nice way what of kdelibs makes it so uhm, kdelibs ;)
>
> This library is basically a class, that after setting a QDeclarativeEngine
> with initialize() pulls the qscriptengine out of it, then replaces the main
> object with a writable copy.
>
> the setupBindings() function (unsure if keeping this step optional or just
> pput it into initialize()) binds in the main object goodies like i18n,
> kjob,
> kconfig, kicon and kurl.
>
> at the moment it links to qtdeclarative, kdecore and kdeui (just for kicon,
> if
> QIcon::fromTheme works good enough perhaps we can keep kdeui out)
>
> This would go in a (probably separate library) in kdelibs, making it
> possible
> to use from qml plasmoids as before or also in c++plasmoids or non plasmoid
> ui
> components of plasma (where we still don't have the same nice bindings)
> but also from completely independent applications like Kontact
> touch/calligra
> mobile/whatever.
>
> Cheers,
> Marco Martin
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110127/f39e9fe6/attachment-0001.htm
More information about the Plasma-devel
mailing list