[Digikam-devel] [Bug 147854] Put images into an emptied light-table
Gilles Caulier
caulier.gilles at gmail.com
Fri Sep 7 11:37:42 BST 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=147854
caulier.gilles gmail com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
------- Additional Comments From caulier.gilles gmail com 2007-09-07 12:37 -------
SVN commit 709363 by cgilles:
backport commits #709349 from KDE3 branch
BUG: 147854
M +10 -6 albumiconview.cpp
M +2 -2 albumiconview.h
M +10 -2 digikamapp.cpp
M +2 -0 digikamappprivate.h
M +2 -1 digikamui.rc
M +22 -3 digikamview.cpp
M +1 -0 digikamview.h
--- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #709362:709363
@ -682,7 +682,8 @
}
else if (choice == lighttableAction)
{
- insertSelectionToLightTable();
+ // add images to existing images in the light table
+ insertSelectionToLightTable(true);
}
else
{
@ -1021,10 +1022,11 @
imview->setFocus();
}
-void AlbumIconView::insertSelectionToLightTable()
+void AlbumIconView::insertSelectionToLightTable(bool addTo)
{
// Run Light Table with all selected image files in the current Album.
-
+ // If addTo is false, the light table will be emptied before adding
+ // the images.
ImageInfoList imageInfoList;
for (IconItem *it = firstItem() ; it ; it = it->nextItem())
@ -1036,10 +1038,10 @
}
}
- insertToLightTable(imageInfoList, imageInfoList.first());
+ insertToLightTable(imageInfoList, imageInfoList.first(), addTo);
}
-void AlbumIconView::insertToLightTable(const ImageInfoList& list, const ImageInfo ¤t)
+void AlbumIconView::insertToLightTable(const ImageInfoList& list, const ImageInfo ¤t, bool addTo)
{
LightTableWindow *ltview = LightTableWindow::lightTableWindow();
@ -1056,7 +1058,9 @
ltview->raise();
ltview->setFocus();
- ltview->loadImageInfos(list, current);
+ // If addTo is false, the light table will be emptied before adding
+ // the images.
+ ltview->loadImageInfos(list, current, addTo);
if (list.count()>1)
ltview->setLeftRightItems(list);
}
--- trunk/extragear/graphics/digikam/digikam/albumiconview.h #709362:709363
@ -118,8 +118,8 @
AlbumIconItem* findItem(const QString& url) const;
AlbumIconItem* nextItemToThumbnail() const;
- void insertSelectionToLightTable();
- void insertToLightTable(const ImageInfoList& list, const ImageInfo ¤t);
+ void insertSelectionToLightTable(bool addTo=false);
+ void insertToLightTable(const ImageInfoList& list, const ImageInfo ¤t, bool addTo=false);
signals:
--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #709362:709363
@ -623,12 +623,20 @
d->imageLightTableAction = new KAction(KIcon("lighttable"), i18n("Place onto Light Table"), this);
d->imageLightTableAction->setShortcut(Qt::Key_F6);
- d->imageLightTableAction->setWhatsThis(i18n("Insert the selected items into the light table thumbbar."));
+ d->imageLightTableAction->setWhatsThis(i18n("Put the selected items into the light table thumbbar."));
connect(d->imageLightTableAction, SIGNAL(triggered()), d->view, SLOT(slotImageLightTable()));
actionCollection()->addAction("image_lighttable", d->imageLightTableAction);
// -----------------------------------------------------------
+ d->imageAddLightTableAction = new KAction(KIcon("lighttable"), i18n("Add to Light Table"), this);
+ d->imageAddLightTableAction->setShortcut(Qt::CTRL+Qt::Key_F6);
+ d->imageAddLightTableAction->setWhatsThis(i18n("Add selected items to the light table thumbbar."));
+ connect(d->imageAddLightTableAction, SIGNAL(triggered()), d->view, SLOT(slotImageAddToLightTable()));
+ actionCollection()->addAction("image_add_to_lighttable", d->imageAddLightTableAction);
+
+ // -----------------------------------------------------------
+
d->imageRenameAction = new KAction(KIcon("pencil"), i18n("Rename..."), this);
d->imageRenameAction->setShortcut(Qt::Key_F2);
d->imageRenameAction->setWhatsThis(i18n("Rename the filename of the currently selected item."));
@ -894,7 +902,7 @
// -----------------------------------------------------------
KAction *ltAction = new KAction(KIcon("lighttable"), i18n("Light Table"), this);
- ltAction->setShortcut(Qt::CTRL+Qt::Key_F6);
+ ltAction->setShortcut(Qt::SHIFT+Qt::Key_F6);
connect(ltAction, SIGNAL(triggered()), d->view, SLOT(slotLightTable()));
actionCollection()->addAction("light_table", ltAction);
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #709362:709363
@ -100,6 +100,7 @
imagePreviewAction = 0;
imageViewAction = 0;
imageLightTableAction = 0;
+ imageAddLightTableAction = 0;
imageSetExifOrientation1Action = 0;
imageSetExifOrientation2Action = 0;
imageSetExifOrientation3Action = 0;
@ -199,6 +200,7 @
// Image Actions
KToggleAction *imagePreviewAction;
KAction *imageLightTableAction;
+ KAction *imageAddLightTableAction;
KAction *imageViewAction;
KAction *imageSetExifOrientation1Action;
KAction *imageSetExifOrientation2Action;
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #709362:709363
@ -1,5 +1,5 @
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui version="32" name="digikam" >
+<gui version="33" name="digikam" >
<MenuBar>
@ -43,6 +43,7 @
<Action name="image_view" />
<Action name="image_edit" />
<Action name="image_lighttable" />
+ <Action name="image_add_to_lighttable" />
<Action name="image_set_exif_orientation"/>
<Separator />
<ActionList name="image_actions"/>
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #709362:709363
@ -1003,24 +1003,43 @
void DigikamView::slotLightTable()
{
ImageInfoList empty;
- d->iconView->insertToLightTable(empty, ImageInfo());
+ d->iconView->insertToLightTable(empty, ImageInfo(), true);
}
void DigikamView::slotImageLightTable()
{
if (d->albumWidgetStack->previewMode() == AlbumWidgetStack::PreviewAlbumMode)
{
- d->iconView->insertSelectionToLightTable();
+ // put images into an emptied light table
+ d->iconView->insertSelectionToLightTable(false);
}
else
{
ImageInfoList list;
ImageInfo info = d->albumWidgetStack->imagePreviewView()->getImageInfo();
list.append(info);
- d->iconView->insertToLightTable(list, info);
+ // put images into an emptied light table
+ d->iconView->insertToLightTable(list, info, false);
}
}
+void DigikamView::slotImageAddToLightTable()
+{
+ if (d->albumWidgetStack->previewMode() == AlbumWidgetStack::PreviewAlbumMode)
+ {
+ // add images to the existing images in the light table
+ d->iconView->insertSelectionToLightTable(true);
+ }
+ else
+ {
+ ImageInfoList list;
+ ImageInfo info = d->albumWidgetStack->imagePreviewView()->getImageInfo();
+ list.append(info);
+ // add images to the existing images in the light table
+ d->iconView->insertToLightTable(list, info, true);
+ }
+}
+
void DigikamView::slotImageRename(AlbumIconItem *iconItem)
{
AlbumIconItem *item;
--- trunk/extragear/graphics/digikam/digikam/digikamview.h #709362:709363
@ -115,6 +115,7 @
// Image action slots
void slotImageLightTable();
+ void slotImageAddToLightTable();
void slotImagePreview();
void slotImageEdit();
void slotImageExifOrientation(int orientation);
More information about the Digikam-devel
mailing list