On Thursday 27 January 2011 13:39:40 Shantanu Tushar Jha wrote: > 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?
IIRC we have code for icon finding and loading (KStdDirs, KIcon, etc) already in the QML/KDE integration of KDE PIM, sort of a very early predecessor of libkdeclarative, see kdepim-runtime/qml/kde/kdeintegration.cpp, maybe some of this can be reused and merged into libkdeclarative. regards Volker > > Cheers, > > > Hi all, > > during last couple of days I've been working on > > g...@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@kde.org > > https://mail.kde.org/mailman/listinfo/plasma-devel
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ Plasma-devel mailing list Plasma-devel@kde.org https://mail.kde.org/mailman/listinfo/plasma-devel