[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-05-01 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #15 from caulier.gil...@gmail.com ---
Git commit 476caf2a9fdc504007569b5483cb6c354f6d5c22 by Gilles Caulier.
Committed on 02/05/2021 at 04:03.
Pushed by cgilles into branch 'master'.

Apply patch #426859 from Phuoc Khanh Le about to add new option to move items
to the trash, as SlideShow tool.

M  +1-1NEWS
M  +0-1core/dplugins/generic/view/presentation/TODO
M  +2-1   
core/dplugins/generic/view/presentation/audio/presentationaudiowidget.h
M  +2-1   
core/dplugins/generic/view/presentation/dialogs/presentation_captionpage.h
M  +14   -9   
core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.cpp
M  +4-2   
core/dplugins/generic/view/presentation/dialogs/presentation_mainpage.h
M  +10   -3core/dplugins/generic/view/presentation/opengl/kbeffect.cpp
M  +4-5   
core/dplugins/generic/view/presentation/opengl/presentationgl.cpp
M  +1-1core/dplugins/generic/view/presentation/opengl/presentationgl.h
M  +0-1   
core/dplugins/generic/view/presentation/opengl/presentationkb.cpp
M  +2-0   
core/dplugins/generic/view/presentation/opengl/presentationkb_p.h
M  +8-2core/dplugins/generic/view/presentation/presentationmngr.cpp
M  +38   -1   
core/dplugins/generic/view/presentation/widgets/presentationctrlwidget.cpp
M  +2-0   
core/dplugins/generic/view/presentation/widgets/presentationctrlwidget.h
M  +7-0   
core/dplugins/generic/view/presentation/widgets/presentationctrlwidget.ui
M  +29   -1   
core/dplugins/generic/view/presentation/widgets/presentationwidget.cpp
M  +1-0   
core/dplugins/generic/view/presentation/widgets/presentationwidget.h

https://invent.kde.org/graphics/digikam/commit/476caf2a9fdc504007569b5483cb6c354f6d5c22

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-05-01 Thread Phuoc Khanh LE
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #14 from Phuoc Khanh LE  ---
Created attachment 138055
  --> https://bugs.kde.org/attachment.cgi?id=138055=edit
Move image to trash in presentation

Hi,

This patch add same feature of removing image to trash in presentation.

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-28 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #13 from caulier.gil...@gmail.com ---
Hi Le,

I tested your patch reviewed by Maik and it work perfectly with the Slideshow
plugin.

Can this patch can be adapted quickly to the Presentation plugin ? This will
add the benefit to have the same feature in both View tools...

Thank in advance

Gilles

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-24 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

Maik Qualmann  changed:

   What|Removed |Added

 Status|REPORTED|RESOLVED
  Latest Commit||https://invent.kde.org/grap
   ||hics/digikam/commit/c797b69
   ||c8741ce966f52daa954d01f78ab
   ||689ba9
 Resolution|--- |FIXED
   Version Fixed In||7.3.0

--- Comment #12 from Maik Qualmann  ---
Git commit c797b69c8741ce966f52daa954d01f78ab689ba9 by Maik Qualmann.
Committed on 24/04/2021 at 19:28.
Pushed by mqualmann into branch 'master'.

apply patch #137792 from Phuoc Khanh LE to move image to trash in the slideshow
FIXED-IN: 7.3.0

M  +2-2NEWS
M  +13   -0core/dplugins/generic/view/slideshow/common/slideshowloader.cpp
M  +1-0core/dplugins/generic/view/slideshow/common/slideshowloader.h
M  +3-0core/dplugins/generic/view/slideshow/widgets/slideosd.cpp
M  +38   -0core/dplugins/generic/view/slideshow/widgets/slidetoolbar.cpp
M  +2-0core/dplugins/generic/view/slideshow/widgets/slidetoolbar.h
M  +7-0core/libs/database/utils/ifaces/dbinfoiface.cpp
M  +2-0core/libs/database/utils/ifaces/dbinfoiface.h
M  +5-0core/libs/dplugins/iface/dinfointerface.cpp
M  +5-0core/libs/dplugins/iface/dinfointerface.h
M  +14   -0core/libs/dplugins/iface/dmetainfoiface.cpp
M  +3-0core/libs/dplugins/iface/dmetainfoiface.h
M  +22   -0core/showfoto/main/showfoto.cpp
M  +2-0core/showfoto/main/showfoto.h

https://invent.kde.org/graphics/digikam/commit/c797b69c8741ce966f52daa954d01f78ab689ba9

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

Maik Qualmann  changed:

   What|Removed |Added

 Attachment #137771|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

Maik Qualmann  changed:

   What|Removed |Added

 Attachment #137716|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-23 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

Maik Qualmann  changed:

   What|Removed |Added

 Attachment #137192|0   |1
is obsolete||

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-22 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #11 from Maik Qualmann  ---
I can't test it until tonight, but the patch looks good now.

Maik

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-22 Thread Phuoc Khanh LE
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #10 from Phuoc Khanh LE  ---
Created attachment 137792
  --> https://bugs.kde.org/attachment.cgi?id=137792=edit
remove dependency of digikamgui from plugin

Hi,

The plugin is now independent to digikamgui. I misunderstood this in the first
place.

Best

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-22 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #9 from Maik Qualmann  ---
More correct, but you must not call DBInfoIface or DMetaInfoIface directly in
the SlideShow plugin. The DInfoInterface is overloaded with the respective
interface. The SlideShow plugin must not be dependent on digikamgui either.

Maik

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-21 Thread Phuoc Khanh LE
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #8 from Phuoc Khanh LE  ---
Created attachment 137771
  --> https://bugs.kde.org/attachment.cgi?id=137771=edit
generic func deleteImage() in DInfoInterface

Hi,

Update for previous pack:
+ deleteImage() virtual in DInfoInterface, using DIO in DBInfoIface, and
QFile::remove() in DMetaInfoIface
+ condition for version of Qt >= 5.15, using QFile::moveToTrash()

Is it better now ?
Best

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-20 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #7 from Maik Qualmann  ---
In the file delete function for Showfoto, if Qt-5.15 is available, we should
use the new function QFile::moveToTrash() instead of deleting. This new feature
in Qt-5.15 moves the file to the System Trash.

Maik

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-20 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #6 from caulier.gil...@gmail.com ---
Hi Le,

Unfortunately, the new patch do not the problem. The plugin still depend of
digiKam database with DIO/DItemInfo class.

You cannot use these classes in the plugin which is also available in Showfoto
and it do not have the database, as explained in comment #4.

In other word, the plugin must depend on digiKam core shared lib at linking
time, not digiKam database shared lib.

To wrap around this problem, DMetaInfoIface (showfoto) and DBInfoIface
(digiKam) interface have been created and based on DInfoInterface abstract
class.

A DInfoInterface instance is always available in the plugin instance and must
be used to preform the item operation. Depending of the host application
running the plugin,  DInfoInterface instance == DMetaInfoIface | DBInfoIface.

>From your patch, your customized digiKam code must be moved on a re-implemented
method to DBInfoIface, and your Showfoto code must be moved on a re-implemented
method from DMetaInfoIface. Calling the generic method from the plugin
DInfoInterface instance at run time will delegate on the right host method
re-implemented.

This is a use case of abstract class with interface signatures in oriented
programming language :

https://en.wikipedia.org/wiki/Class_(computer_programming)#Abstract_and_concrete

Best

Gilles

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-04-19 Thread Phuoc Khanh LE
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #5 from Phuoc Khanh LE  ---
Created attachment 137716
  --> https://bugs.kde.org/attachment.cgi?id=137716=edit
move image to trash (digiKam)/ delete image (not digikam)

Hi Gilles,

This patch solve the problem that you mentioned. The DIO is used to move image
to trash if the application is digiKam, if not, image file will be deleted by
DMetaInfoIface

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-03-31 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #4 from caulier.gil...@gmail.com ---
Hi Le,

You cannot use this code in the plugin :

+ItemInfo info = ItemInfo::fromUrl(url);
+
+DIO::del(info, true);

ItemInfo and DIO can only used from digiKam as they depends of database.

The plugin is also avaialble in Showfoto, and there is no database...

The solution is to use the host interface for plugins:

The abstract parent class:
https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/dplugins/iface/dinfointerface.h

The re-implementation for Showfoto using file metadata instead database :

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/dplugins/iface/dmetainfoiface.h

The re-implementation for digiKam using the database :

https://invent.kde.org/graphics/digikam/-/blob/master/core/libs/database/utils/ifaces/dbinfoiface.h

The interface instance is always available in all plugin and must be used to
play with items. Of course there is no method in interface to move item to
trash. New one must be implemented.

In the digiKam version, DIO and ItemInfo must be used.
In the Showfoto version, just delete the item like it do here :

https://invent.kde.org/graphics/digikam/-/blob/master/core/showfoto/main/showfoto.cpp#L802

Gilles Caulier

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-03-31 Thread Phuoc Khanh LE
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #3 from Phuoc Khanh LE  ---
Created attachment 137192
  --> https://bugs.kde.org/attachment.cgi?id=137192=edit
Button for moving image to trash in slideshow

Hi Gilles,

This patch creates a button in slideshow. By clicking this button, it moves
image the image to trash of digiKam, and remove image from current list of
image slide show.

LE

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2021-03-11 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=426859

caulier.gil...@gmail.com changed:

   What|Removed |Added

 CC||phuockhanhn...@gmail.com

--- Comment #2 from caulier.gil...@gmail.com ---
Le,

I think this file can be easily fixed by patching the slideshow tool bar with a
new button to move item to digiKam trashbin. What do you think ?

Note: Maik comment #1 point to bug #280133 where another option can be also
append to toolbar to rotate current item. Note that the thumbbar support from
#280133 is another story, more complex to solve, and out of topic...

Best

Gilles Caulier

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2020-09-22 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

--- Comment #1 from Maik Qualmann  ---
A similar bug report is bug 280133

Maik

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2020-09-22 Thread Maik Qualmann
https://bugs.kde.org/show_bug.cgi?id=426859

Maik Qualmann  changed:

   What|Removed |Added

   Severity|normal  |wishlist
 CC||metzping...@gmail.com

-- 
You are receiving this mail because:
You are watching all bug changes.

[digikam] [Bug 426859] Idea: Move to trash from slideshow

2020-09-22 Thread bugzilla_noreply
https://bugs.kde.org/show_bug.cgi?id=426859

caulier.gil...@gmail.com changed:

   What|Removed |Added

 CC||caulier.gil...@gmail.com
  Component|Albums-Trash|Plugin-Generic-SlideShow

-- 
You are receiving this mail because:
You are watching all bug changes.