[Kde-imaging] [Bug 116609] Allow slideshow to be recursive

Gilles Caulier caulier.gilles at kdemail.net
Wed Feb 14 11:02:59 CET 2007


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=116609         
caulier.gilles kdemail net changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From caulier.gilles kdemail net  2007-02-14 11:02 -------
SVN commit 633539 by cgilles:

digikam from trunk: native Slideshow Tool : added Albums recurssion feature. You can use SHIFT+F9 to start it.

BUG: 116609

 M  +12 -5     digikam/digikamapp.cpp  
 M  +5 -0      digikam/digikamappprivate.h  
 M  +41 -2     digikam/digikamview.cpp  
 M  +4 -2      digikam/digikamview.h  
 M  +1 -1      utilities/batch/Makefile.am  
 AM            utilities/batch/imageinfoalbumsjob.cpp   [License: GPL]
 AM            utilities/batch/imageinfoalbumsjob.h   [License: GPL]


--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #633538:633539
 @ -769,14 +769,15  @
 #endif
 
     d->slideShowAction = new KActionMenu(i18n("Slide Show"), "slideshow",
-                                    actionCollection(), "slideshow");
+                                         actionCollection(), "slideshow");
 
     d->slideShowAction->setDelayed(false);
 
-    KAction *ssAction = new KAction(i18n("All"), 0, Key_F9,
-                                    d->view, SLOT(slotSlideShowAll()),
-                                    actionCollection(), "slideshow_all");
-    d->slideShowAction->insert(ssAction);
+    d->slideShowAllAction = new KAction(i18n("All"), 0, Key_F9,
+                                d->view, SLOT(slotSlideShowAll()),
+                                actionCollection(), "slideshow_all");
+    d->slideShowAction->insert(d->slideShowAllAction);
+
     d->slideShowSelectionAction = new KAction(i18n("Selection"), 0, ALT+Key_F9,
                                               d->view, 
                                               SLOT(slotSlideShowSelection()),
 @ -784,6 +785,12  @
                                               "slideshow_selected");
     d->slideShowAction->insert(d->slideShowSelectionAction);
 
+    d->slideShowRecursiveAction = new KAction(i18n("Recursive"), 0, SHIFT+Key_F9,
+                                              d->view, 
+                                              SLOT(slotSlideShowRecursive()),
+                                              actionCollection(), 
+                                              "slideshow_recursive");
+    d->slideShowAction->insert(d->slideShowRecursiveAction);
 
     d->quitAction = KStdAction::quit(this,
                                    SLOT(slotExit()),
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #633538:633539
 @ -100,6 +100,9  @
         thumbSizeMinusAction                 = 0;
         fullScreenAction                     = 0;
         slideShowAction                      = 0;
+        slideShowAllAction                   = 0;
+        slideShowSelectionAction             = 0;
+        slideShowRecursiveAction             = 0;
         rating0Star                          = 0;
         rating1Star                          = 0;
         rating2Star                          = 0;
 @ -190,7 +193,9  @
     // View Actions
     KAction               *fullScreenAction;
     KActionMenu           *slideShowAction;
+    KAction               *slideShowAllAction;
     KAction               *slideShowSelectionAction;
+    KAction               *slideShowRecursiveAction;
     KAction               *thumbSizePlusAction;
     KAction               *thumbSizeMinusAction;
     KSelectAction         *imageSortAction;
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #633538:633539
 @ -63,6 +63,7  @
 #include "slideshow.h"
 #include "sidebar.h"
 #include "imagepropertiessidebardb.h"
+#include "imageinfoalbumsjob.h"
 #include "datefolderview.h"
 #include "tagfolderview.h"
 #include "searchfolderview.h"
 @ -211,6 +212,12  @
 
     connect(d->parent, SIGNAL(signalPasteAlbumItemsSelection()),
             d->iconView, SLOT(slotPaste()));
+
+    connect(this, SIGNAL(signalProgressBarMode(int, const QString&)),
+            d->parent, SLOT(slotProgressBarMode(int, const QString&)));
+
+    connect(this, SIGNAL(signalProgressValue(int)),
+            d->parent, SLOT(slotProgressValue(int)));
                         
     // -- AlbumManager connections --------------------------------
 
 @ -1085,6 +1092,33  @
     slideShow(infoList);
 }
 
+void DigikamView::slotSlideShowRecursive()
+{
+    Album *album = AlbumManager::instance()->currentAlbum();
+    if(album)
+    {
+        AlbumList albumList;
+        albumList.append(album);
+        AlbumIterator it(album);
+        while (it.current())
+        {
+            albumList.append(*it);
+            ++it;
+        }
+
+        ImageInfoAlbumsJob *job = new ImageInfoAlbumsJob;
+        connect(job, SIGNAL(signalCompleted(const ImageInfoList&)),
+                this, SLOT(slotItemsInfoFromAlbums(const ImageInfoList&)));
+        job->allItemsFromAlbums(albumList);       
+    }
+}
+
+void DigikamView::slotItemsInfoFromAlbums(const ImageInfoList& infoList)
+{
+    ImageInfoList list = infoList; 
+    slideShow(list);
+}
+
 void DigikamView::slideShow(ImageInfoList &infoList)
 {
     KConfig* config = kapp->config();
 @ -1100,8 +1134,9  @
     SlideShowSettings settings;
     settings.exifRotate = AlbumSettings::instance()->getExifRotate();
 
-    for (ImageInfo *info = infoList.first(); info; info = infoList.next())
+    for (ImageInfoList::iterator it = infoList.begin(); it != infoList.end(); ++it)
     {
+        ImageInfo *info = *it;
         settings.fileList.append(info->kurl());
         SlidePictureInfo pictInfo;
         meta.load(info->kurl().path());
 @ -1127,7 +1162,11  @
 
     SlideShow *slide = new SlideShow(settings);
     if (startWithCurrent)
-        slide->setCurrent(dynamic_cast<AlbumIconItem*>(d->iconView->currentItem())->imageInfo()->kurl());
+    {
+        AlbumIconItem* current = dynamic_cast<AlbumIconItem*>(d->iconView->currentItem());
+        if (current) 
+            slide->setCurrent(current->imageInfo()->kurl());
+    }
 
     slide->show();
 }
--- trunk/extragear/graphics/digikam/digikam/digikamview.h #633538:633539
 @ -77,6 +77,9  @
     // View Action slots
     void slotThumbSizePlus();
     void slotThumbSizeMinus();
+    void slotSlideShowAll();
+    void slotSlideShowSelection();
+    void slotSlideShowRecursive();
 
     // Album action slots
     void slotNewAlbum();
 @ -106,8 +109,6  @
     void slotNewAdvancedSearch();
 
     // Image action slots
-    void slotSlideShowAll();
-    void slotSlideShowSelection();
     void slotImagePreview();
     void slotImageEdit();
     void slotImageExifOrientation(int orientation);
 @ -151,6 +152,7  @
     void slotToggledToPreviewMode(bool);
     void slotDispatchImageSelected();
     void slotImageCopyResult(KIO::Job* job);
+    void slotItemsInfoFromAlbums(const ImageInfoList&);
 
     void slotLeftSidebarChangedTab(QWidget* w);
 
--- trunk/extragear/graphics/digikam/utilities/batch/Makefile.am #633538:633539
 @ -11,7 +11,7  @
 noinst_LTLIBRARIES = libbatch.la 
 
 libbatch_la_SOURCES = batchthumbsgenerator.cpp batchalbumssyncmetadata.cpp \
-	              imageinfojob.cpp batchsyncmetadata.cpp 
+	              imageinfojob.cpp imageinfoalbumsjob.cpp batchsyncmetadata.cpp 
 
 libbatch_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
** trunk/extragear/graphics/digikam/utilities/batch/imageinfoalbumsjob.cpp #property svn:eol-style
   + native
** trunk/extragear/graphics/digikam/utilities/batch/imageinfoalbumsjob.h #property svn:eol-style
   + native


More information about the Kde-imaging mailing list