[Digikam-devel] [Bug 140304] Start slideshow from the current image

Luka Renko lure at kubuntu.org
Fri Feb 9 22:03:11 GMT 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=140304         
lure kubuntu org changed:

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



------- Additional Comments From lure kubuntu org  2007-02-09 23:03 -------
SVN commit 632071 by lure:

Add Slide Show to View menu and toolbar:
- uses own slideshow implementation (same as Showfoto/Image Editor)
- implemented with preview, so can be also used as full screen preview
- left KIPI-plugin in Tools menu (should be renamed to reduce confusion)

TODO: find good keyboard shortcut to assign to Slide Show function
- all obvious ones are already used: F5 (powerpoint), F12 (kpresenter)

CCBUG: 135655
BUG: 140303, 140304


 M  +1 -0      Makefile.am  
 M  +4 -0      digikamapp.cpp  
 M  +2 -0      digikamappprivate.h  
 M  +4 -1      digikamui.rc  
 M  +30 -0     digikamview.cpp  
 M  +1 -0      digikamview.h  


--- trunk/extragear/graphics/digikam/digikam/Makefile.am #632070:632071
 @ -20,6 +20,7  @
 	   -I$(top_srcdir)/digikam/utilities/imageeditor/canvas \
 	   -I$(top_srcdir)/digikam/utilities/splashscreen \
 	   -I$(top_srcdir)/digikam/utilities/setup \
+	   -I$(top_srcdir)/digikam/utilities/slideshow \
 	   -I$(top_srcdir)/digikam/utilities/batch \
 	   $(LIBKIPI_CFLAGS) $(GPHOTO_CFLAGS) $(all_includes) 
 
--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #632070:632071
 @ -765,6 +765,10  @
                                          "in full screen mode."));
 #endif
 
+    d->slideShowAction = new KAction(i18n("Slide Show"), "slideshow", 0,
+                                     d->view, SLOT(slotSlideShow()),
+                                     actionCollection(), "slideshow");
+
     d->quitAction = KStdAction::quit(this,
                                    SLOT(slotExit()),
                                    actionCollection(),
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #632070:632071
 @ -99,6 +99,7  @
         thumbSizePlusAction                  = 0;
         thumbSizeMinusAction                 = 0;
         fullScreenAction                     = 0;
+        slideShowAction                      = 0;
         rating0Star                          = 0;
         rating1Star                          = 0;
         rating2Star                          = 0;
 @ -188,6 +189,7  @
 
     // View Actions
     KAction               *fullScreenAction;
+    KAction               *slideShowAction;
     KAction               *thumbSizePlusAction;
     KAction               *thumbSizeMinusAction;
     KSelectAction         *imageSortAction;
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #632070:632071
 @ -1,5 +1,5  @
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="18" name="digikam" >
+<kpartgui version="19" name="digikam" >
 
  <MenuBar>
 
 @ -60,6 +60,7  @
   <Menu name="View" >
    <text>&View</text>
      <Action name="full_screen" />
+     <Action name="slideshow" />
      <Separator/>
      <Action name="album_thumbSizeIncrease" />
      <Action name="album_thumbSizeDecrease" />
 @ -124,7 +125,9  @
   <Separator/>
   <Action name="album_thumbSizeIncrease" />
   <Action name="album_thumbSizeDecrease" />
+  <Separator/>
   <Action name="full_screen" />
+  <Action name="slideshow" />
  </ToolBar>
  <ActionProperties/>
 
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #632070:632071
 @ -59,6 +59,7  @
 #include "albumsettings.h"
 #include "albumhistory.h"
 #include "batchsyncmetadata.h"
+#include "slideshow.h"
 #include "sidebar.h"
 #include "imagepropertiessidebardb.h"
 #include "datefolderview.h"
 @ -895,6 +896,35  @
     d->parent->toggledToPreviewMode(t);
 }
 
+void DigikamView::slotSlideShow()
+{
+    KConfig* config = kapp->config();
+    config->setGroup("ImageViewer Settings");
+    bool startWithCurrent = config->readBoolEntry("SlideShowStartCurrent", false);
+    bool loop             = config->readBoolEntry("SlideShowLoop", false);
+    bool printName        = config->readBoolEntry("SlideShowPrintName", true);
+    int  delay            = config->readNumEntry("SlideShowDelay", 5);
+
+    bool exifRotate = AlbumSettings::instance()->getExifRotate();
+    KURL::List urlList;
+
+    AlbumIconItem* item = 0;
+    if (startWithCurrent)
+        item = dynamic_cast<AlbumIconItem*>(d->iconView->currentItem());
+    else
+        item = dynamic_cast<AlbumIconItem*>(d->iconView->firstItem());
+
+    while (item) 
+    {
+        urlList.append(item->imageInfo()->kurl());
+
+        item = dynamic_cast<AlbumIconItem*>(item->nextItem());
+    }
+
+    SlideShow *slide = new SlideShow(urlList, exifRotate, delay*1000, printName, loop);
+    slide->show();
+}
+
 void DigikamView::slotImageEdit()
 {
     AlbumIconItem *currItem = dynamic_cast<AlbumIconItem*>(d->iconView->currentItem());
--- trunk/extragear/graphics/digikam/digikam/digikamview.h #632070:632071
 @ -101,6 +101,7  @
     void slotNewAdvancedSearch();
 
     // Image action slots
+    void slotSlideShow();
     void slotImagePreview();
     void slotImageEdit();
     void slotImageExifOrientation(int orientation);



More information about the Digikam-devel mailing list