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