Access data engine from C++ QML Plugin?

Aaron J. Seigo aseigo at kde.org
Fri Jan 25 08:08:36 UTC 2013


On Thursday, January 24, 2013 19:56:52 Michail Vourlakos wrote:
> is there a way to access a data engine from a C++ QML Plugin?

You can access a DataEngine from any bit of C++ code by using 
DataEngineManager directly .. however, I would instead recommend subclassing 
the DataEngineConsumer class as it provides a rather more friendly API. it is 
also what will be avaiable in libplasma2.

you can find DataEngineConsumer in kdelibs/plasma/private/dataengineconsumer*

by subclassing it (or using it directly as a class member) you will have the 
exact same API in your class that Applet and other classes in libplasma have 
for DataEngines.

-- 
Aaron J. Seigo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130125/1b7789b1/attachment.sig>


More information about the Plasma-devel mailing list