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

Luka Renko lure at kubuntu.org
Sat Feb 10 21:20:32 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         




------- Additional Comments From lure kubuntu org  2007-02-10 22:20 -------
SVN commit 632368 by lure:

Slide Show in Album GUI is now action menu with two options: All and Selection
Shortcuts: F9 for slideshow all and ALT-F9 for slideshow selection

CCBUG: 140304



 M  +18 -3     digikamapp.cpp  
 M  +2 -1      digikamappprivate.h  
 M  +26 -7     digikamview.cpp  
 M  +3 -1      digikamview.h  


--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #632367:632368
 @ -768,10 +768,23  @
                                          "in full screen mode."));
 #endif
 
-    d->slideShowAction = new KAction(i18n("Slide Show"), "slideshow", Key_F9,
-                                     d->view, SLOT(slotSlideShow()),
-                                     actionCollection(), "slideshow");
+    d->slideShowAction = new KActionMenu(i18n("Slide Show"), "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->slideShowSelectionAction = new KAction(i18n("Selection"), 0, ALT+Key_F9,
+                                              d->view, 
+                                              SLOT(slotSlideShowSelection()),
+                                              actionCollection(), 
+                                              "slideshow_selected");
+    d->slideShowAction->insert(d->slideShowSelectionAction);
+
+
     d->quitAction = KStdAction::quit(this,
                                    SLOT(slotExit()),
                                    actionCollection(),
 @ -872,6 +885,7  @
     d->imageRenameAction->setEnabled(false);
     d->imageDeleteAction->setEnabled(false);
     d->imageExifOrientationActionMenu->setEnabled(false);
+    d->slideShowSelectionAction->setEnabled(false);
 
     d->albumSortAction->setCurrentItem((int)d->albumSettings->getAlbumSortOrder());
     d->imageSortAction->setCurrentItem((int)d->albumSettings->getImageSortOrder());
 @ -1100,6 +1114,7  @
     d->imageRenameAction->setEnabled(val);
     d->imageDeleteAction->setEnabled(val);
     d->imageExifOrientationActionMenu->setEnabled(val);
+    d->slideShowSelectionAction->setEnabled(selection.count() != 0);
 
     switch (selection.count())
     {
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #632367:632368
 @ -189,7 +189,8  @
 
     // View Actions
     KAction               *fullScreenAction;
-    KAction               *slideShowAction;
+    KActionMenu           *slideShowAction;
+    KAction               *slideShowSelectionAction;
     KAction               *thumbSizePlusAction;
     KAction               *thumbSizeMinusAction;
     KSelectAction         *imageSortAction;
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #632367:632368
 @ -911,7 +911,7  @
     d->parent->toggledToPreviewMode(t);
 }
 
-void DigikamView::slotSlideShow()
+void DigikamView::slideShow(const KURL::List &urlList)
 {
     KConfig* config = kapp->config();
     config->setGroup("ImageViewer Settings");
 @ -920,21 +920,40  @
     bool printName        = config->readBoolEntry("SlideShowPrintName", true);
     int  delay            = config->readNumEntry("SlideShowDelay", 5);
 
+    bool exifRotate     = AlbumSettings::instance()->getExifRotate();
+
+    SlideShow *slide = new SlideShow(urlList, exifRotate, delay*1000, printName, loop);
+    if (startWithCurrent)
+        slide->setCurrent(dynamic_cast<AlbumIconItem*>(d->iconView->currentItem())->imageInfo()->kurl());
+
+    slide->show();
+}
+
+void DigikamView::slotSlideShowAll()
+{
     KURL::List urlList;
-    bool exifRotate     = AlbumSettings::instance()->getExifRotate();
     AlbumIconItem* 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);
-    if (startWithCurrent)
-        slide->setCurrent(dynamic_cast<AlbumIconItem*>(d->iconView->currentItem())->imageInfo()->kurl());
+    slideShow(urlList);
+}
 
-    slide->show();
+void DigikamView::slotSlideShowSelection()
+{
+    KURL::List urlList;
+    AlbumIconItem* item = dynamic_cast<AlbumIconItem*>(d->iconView->firstItem());
+    while (item) 
+    {
+        if (item->isSelected())
+            urlList.append(item->imageInfo()->kurl());
+        item = dynamic_cast<AlbumIconItem*>(item->nextItem());
+    }
+
+    slideShow(urlList);
 }
 
 void DigikamView::slotImageEdit()
--- trunk/extragear/graphics/digikam/digikam/digikamview.h #632367:632368
 @ -103,7 +103,8  @
     void slotNewAdvancedSearch();
 
     // Image action slots
-    void slotSlideShow();
+    void slotSlideShowAll();
+    void slotSlideShowSelection();
     void slotImagePreview();
     void slotImageEdit();
     void slotImageExifOrientation(int orientation);
 @ -133,6 +134,7  @
     void saveViewState();
     void changeAlbumFromHistory(Album *album, QWidget *widget);
     void imageEdit(AlbumIconItem* iconItem=0);
+    void slideShow(const KURL::List &urlList);
 
 private slots:



More information about the Digikam-devel mailing list