<br><br><div class="gmail_quote">2010/6/8 Alessandro Sivieri <span dir="ltr">&lt;<a href="mailto:alessandro.sivieri@gmail.com">alessandro.sivieri@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="gmail_quote">2010/6/7 Alessandro Diaferia <span dir="ltr">&lt;<a href="mailto:alediaferia@gmail.com" target="_blank">alediaferia@gmail.com</a>&gt;</span><div class="im"><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">


As you may have understood i&#39;m using Nepomuk to show media files to the user.<br>One thing i noticed is that when using the KDirModel (and so the KDirLister) to list the results of a query<br>
it seems that each QModelIndex doesn&#39;t have a valid KDirModel::FileItemRole and therefore no important pieces of information<br>like the url of the file (AFAIK KDirModel is KFileItem-centric). I make use of such role in order to get previews of the files.<br>


<br></blockquote></div></div><div><br></div>Well, both in Sembrowser and in Smartsave I am using KDirOperator, and it works correctly for me, I mean files are shown with correct name and icon, and they are correctly opened once passed to KRun; I use Nepomuk::Query::toSearchUrl, to obtain the URL to set the URL to KDirOperator.<div>


I think I also used KDirModel directly some time ago, but then I decided that the operator was better.</div><div>Can you show us some code?<br clear="all"></div></blockquote><div><br>Ok, giving some context: the mediabrowser applet we use in PMC takes advantage of an AbstractItemView written from scratch (aka not inheriting from QAbstractItemView).<br>
This means that the QAbstractItemModel passed is handled internally. If the set model makes use of KDirModel::FileItemRole additional capabilities are enabled:<br>this means that not only the name and the icon is drawn but now, through the given KFileItem, the view has access to the URL of the file and can, for example, retrieve previews.<br>
Unfortunately I cannot make use of KDirOperator as long as PMC has this particular structure. My concern now is: is there a way to get the file url for the particular nepomuk search result?<br>I might go for Nepomuk::Resource::property(Vocabulary::NIE::url()) i don&#39;t know how to build the resource from the given QModelIndex.<br>
<br>Hints appreciated :p<br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><br>-- <br>Sivieri Alessandro<br><a href="mailto:alessandro.sivieri@gmail.com" target="_blank">alessandro.sivieri@gmail.com</a><br>


<a href="http://www.chimera-bellerofonte.eu/" target="_blank">http://www.chimera-bellerofonte.eu/</a><br><a href="http://www.poul.org/" target="_blank">http://www.poul.org/</a><br>
</div>
</blockquote></div><br>Thank you.<br><br>P.S.: forgot to mention that I&#39;m using Nepomuk::Query::toSearchUrl too, passing it to the KDirLister-&gt;openUrl() method.<br clear="all"><br>-- <br>Alessandro Diaferia<br>KDE Developer<br>
KDE e.V. member<br><br>