on models, QML and Nepomuk

Marco Martin notmart at gmail.com
Mon Nov 19 17:00:30 UTC 2012


On Friday 16 November 2012, Shantanu Tushar Jha wrote:

> 
> I hope one can also say this-
> 
> MetadataModel *model = new MetadataModel();
> model->setQueryProvider(new MyQueryProvider());
> 
> i.e. to be able to use it from C++.

use case?


> The design, esp the QueryProvider bit is pretty nice, good job :)
> 
> From PMC's PoV, all we need is a metadatamodel which can be used and
> extended from pure C++ code[1]. From the design you discussed above, if
> metadatamodel lives in neopomuk-core and can be instantiated from C++,
> thumbs up!

you would do a subclass of the query provider, not the model

i could export metadatamodel as well, but i really would like to avoid...

> [1] When this was not possible, we had to do stuff like this
> http://quickgit.kde.org/?p=plasma-mediacenter.git&a=blob&h=740d2423a8ff5b8a
> 4b65b1dc371161e81f99e964&hb=fbac7a7a1a147deac287709ee0cb002e7f1053fb&f=brow
> singbackends%2Fmetadatabackends%2Fabstractmetadatabackend.cpp(line 36)

from that code, i see that it seems ok, only ugly part is what's in ::init()

so, basically the problem is that now backends are instantiated from c++?
 thinking about it it may make sense to make qml imports available from the 
metadata models

it may make people want to implment gui pieces in the backend, so that may be 
bad.

so, to summarise:
i would like to try it first with the media cente:
what exactly should be done to port the models?

Cheers,
Marco Martin


More information about the Active mailing list