[Digikam-devel] [digikam] [Bug 314441] Rename settings and auto-rotation during import ignored [patch]

Gilles Caulier caulier.gilles at gmail.com
Thu Jun 27 10:10:26 BST 2013


https://bugs.kde.org/show_bug.cgi?id=314441

--- Comment #51 from Gilles Caulier <caulier.gilles at gmail.com> ---
To Andi, #49 :

>I guess we need to rename the images in the view when a selection is done,

This is how 2.x release do with Qt3support classes.

> but this is a weird concept in my opinion, because the selected images will have the new 
> downloadName, the others the old camera name.

I think no, if downloadName is used to printed new file name in icon-view and
if for each changes from Rename Customizer, downloadName is updated accordingly
with settings. By default set downloadName = name (camera file name) from
camera item container.

I remember to have implemented this way in the past.

In old code, we can see 2 connections from settings widget to camera icon view
:

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/v2.9.0/entry/utilities/cameragui/main/cameraui.cpp#L498

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/v2.9.0/entry/utilities/cameragui/views/cameraiconview.cpp#L209

First is for batch process settings done at download time as loss les
conversion for ex which change file extension. Second is for rename customizer.

Both call this slot :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/v2.9.0/entry/utilities/cameragui/views/cameraiconview.cpp#L417

... which check items selection and call another internal slot from :

https://projects.kde.org/projects/extragear/graphics/digikam/repository/revisions/v2.9.0/entry/utilities/cameragui/views/cameraiconview.cpp#L434

Which do the stuff about file renaming for each items in camera icon view. For
each icon view item, we have an Camera Item Settings instance, where
downloadName vlaue is changed accordingly. At end we refresh icon view to print
all target file name. Et VoilĂ .

Code puzzle is a little bit complex, due to factoring stage that i do, before
model/view port. It's not the best coding, but as i remember, it work well...

> Right now I don't really understand the code, I am not able to see when the view has finished 
> loading and how to detect this in the ImportUI. I need this to initialize the 
> advancedRenameManager to set the new file names. But right now I can not find the 
> appropriate signal or slot. 

Why you need to wait that pre download is done to set advancedRenameManager. Do
it before sarting donwload when user change something in settings view.

>The only thing I found so far is the NewItemsFinder in ImportUI::finishDialog(), but it is 
>created locally and no signal / slot connection is done, so the ImportUI must recognize the 
>change through some other mechanism.

This one is another part dedicated to find new items downloaded from camera and
update database. It's done when all is already completed. You init must be done
before...

Gilles

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Digikam-devel mailing list