<div dir="ltr"><div><div>Gilles,<br><br></div>Thanks for the explanation. I will try to copy the widget from slideshow to preview and see what happens.<br></div>Bad part about changing the source code is I will have to repeat it every time after next release...<br></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Best regards, <br></div></div></div></div>
<br><div class="gmail_quote">On Tue, Jul 25, 2017 at 10:23 PM, Gilles Caulier <span dir="ltr"><<a href="mailto:caulier.gilles@gmail.com" target="_blank">caulier.gilles@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Andrey,<br>
<br>
This have been a long history in bugzilla about to be able to display<br>
or edit some properties over the canvas (editor and preview mode), as<br>
rating, tags, or labels.<br>
<br>
The result is a shared point to implement or not this feature, as the<br>
possibility already exist every where : context menu, sidebar, and<br>
keyboard shortcuts. And of course nothing have be done as it's<br>
delcate to take a clear decision about.<br>
<br>
But, something as been implemented in slideshow, as only keyboard<br>
shortcuts was available to apply main properties to images. On the<br>
botoom corner of the image while slide show, if the right option is<br>
turned on in setup dialog, you are able to rate, tags, or change color<br>
labels.So, the techical solution exists in slide show widget, and can<br>
be backported to image preview.<br>
<br>
But take a care, it's not the most simple task to do to start coding<br>
in digiKam and to learn the implementation.<br>
<br>
If rate/tags/labels will become available over canvas, well all of<br>
then must be optional in setup preview section, to be homogeneous.<br>
this will touch more code.<br>
<br>
Also, the preview canvas, is also used in Light table and must be also<br>
patched to provide this feature.<br>
<br>
Even that you are right. The preview canvas, is partially implemented<br>
in imagepreviewview.cpp. This is the derivated class to manage the<br>
preview with F3 key from album view. There are parent classes in<br>
core/libs/widgets/<wbr>graphicsview/. The preview view is an item loaded in<br>
canvas and implemented with imagepreviewviewitem.cpp (it's Qt<br>
model/view based).<br>
<br>
Something similar is implemented with Light Table with some difference<br>
and customizations. Mostly the main code is located in core lib<br>
classes, and customization is located in derivated classes. The parent<br>
classes are free of database to be usable in Showfoto as this one<br>
don't use the database. So with your proposal, the code to change is<br>
mandatory located in customization classes.<br>
<br>
Now the implementation from slideshow to be able to show and edit<br>
rate/tags/labels over the preview is located in<br>
core/utilities/slideshow/<wbr>slideosd.cpp.There are 3 magic widgets which<br>
perform 90 of the job with the properties to show/edit : RatingWidget,<br>
ColorLabelSelector, and PickLabelsSelector. This one are usable as<br>
well without change as it's done with slideosd.cpp.<br>
<br>
But the real question, is more ambitious : why not to reuse as well<br>
the slideosd implementation as an overlay widget for preview canvas.<br>
This will be homogenous everwhere and factorize/simplify all codes<br>
<br>
So the questions are open...<br>
<br>
Best<br>
<br>
Gilles Caulier<br>
<br>
2017-07-26 1:03 GMT+02:00 Andrey Goreev <<a href="mailto:aegoreev@gmail.com">aegoreev@gmail.com</a>>:<br>
> Hello,<br>
><br>
> I want to make an image star rating visible in image preview view and<br>
> wondering which file should I be modifying.<br>
> I am looking at imagepreviewview.cpp in<br>
> <a href="https://github.com/KDE/digikam/tree/master/app/views" rel="noreferrer" target="_blank">https://github.com/KDE/<wbr>digikam/tree/master/app/views</a><br>
> Is this the right one? Any tip would be greatly appreciated.<br>
><br>
> Best regards,<br>
> Andrey<br>
</blockquote></div><br></div>