SVN commit 660737 by cgilles:
digiKam from trunk : first implementation of digiKam Light Table tool. It not yet suitable as well because the tool do not provide yet a comparison method between 2 images. The Light Table is a pictures container witch can handle items from everywhere on Albums library. Just use the Album Gui pop-up menu to insert an item in Light Table. The Light table has a thumbar on the right. when you click on one item, it's displayed on central view, where you can process zooming and panning. http://digikam3rdparty.free.fr/Screenshots/lighttable_v2.png Gerhard, this implementation is in _alpha_ stage, and must be _disable_ for next 0.9.2-beta1 release. Paco and me we working on actually. To disable it before to release digiKam 0.9.2-beta1, please just comment the line 26 from digikam/albumiconview.cpp. Thanks in advance CCBUG: 135048 CCMAIL: [hidden email] CCMAIL: [hidden email] CCMAIL: [hidden email] M +76 -7 digikam/albumiconview.cpp M +8 -6 digikam/albumiconview.h M +18 -8 utilities/lighttable/Makefile.am AM utilities/lighttable/lighttableview.cpp [License: GPL] AM utilities/lighttable/lighttableview.h [License: GPL] AM utilities/lighttable/lighttablewindow.cpp [License: GPL] AM utilities/lighttable/lighttablewindow.h [License: GPL] A utilities/lighttable/lighttablewindowui.rc --- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #660736:660737 @@ -1,12 +1,13 @@ /* ============================================================ - * Authors: Renchi Raju <[hidden email]> - * Caulier Gilles - * Marcel Wiesweg <[hidden email]> - * Date : 2002-16-10 + * Authors : Renchi Raju + * Caulier Gilles + * Marcel Wiesweg + * Date : 2002-16-10 * Description : album icon view * - * Copyright 2002-2005 by Renchi Raju by Gilles Caulier <caulier dot gilles at gmail dot com> - * Copyright 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com> and Marcel Wiesweg + * Copyright 2002-2005 by Renchi Raju <[hidden email]> + * Copyright 2002-2007 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright 2006-2007 by Marcel Wiesweg <[hidden email]> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -21,6 +22,9 @@ * * ============================================================ */ +// Uncomment this line to enable Light Table tool. +#define ENABLE_LIGHTTABLE 1 + #ifdef HAVE_CONFIG_H #include <config.h> #endif @@ -120,6 +124,7 @@ #include "albumiconitem.h" #include "albumicongroupitem.h" #include "loadingcacheinterface.h" +#include "lighttablewindow.h" #include "statusprogressbar.h" #include "metadatahub.h" #include "albumiconview.h" @@ -526,6 +531,10 @@ popmenu.insertItem(SmallIcon("editimage"), i18n("Edit..."), 10); popmenu.insertItem(i18n("Open With"), &openWithMenu, 11); +#ifdef ENABLE_LIGHTTABLE + popmenu.insertItem(SmallIcon("idea"), i18n("Insert to Light Table"), 19); +#endif + // Merge in the KIPI plugins actions ---------------------------- KIPI::PluginLoader* kipiPluginLoader = KIPI::PluginLoader::instance(); @@ -674,6 +683,12 @@ break; } + case 19: + { + slotInsertToLightTable(iconItem); + break; + } + default: break; } @@ -931,7 +946,7 @@ setCurrentItem(item); } -void AlbumIconView::slotDisplayItem(AlbumIconItem *item ) +void AlbumIconView::slotDisplayItem(AlbumIconItem *item) { if (!item) return; @@ -1015,6 +1030,60 @@ imview->setFocus(); } +void AlbumIconView::slotInsertToLightTable(AlbumIconItem *item) +{ + AlbumSettings *settings = AlbumSettings::instance(); + + if (!settings) return; + + QString imagefilter = settings->getImageFileFilter().lower() + + settings->getImageFileFilter().upper(); + + if (KDcrawIface::DcrawBinary::instance()->versionIsRight()) + { + // add raw files only if dcraw is available + imagefilter += settings->getRawFileFilter().lower() + + settings->getRawFileFilter().upper(); + } + + // Run Light Table with all selected image files in the current Album. + + ImageInfoList imageInfoList; + ImageInfo *currentImageInfo = 0; + + for (IconItem *it = firstItem() ; it ; it = it->nextItem()) + { + if ((*it).isSelected()) + { + AlbumIconItem *iconItem = static_cast<AlbumIconItem *>(it); + QString fileExtension = iconItem->imageInfo()->kurl().fileName().section( '.', -1 ); + + if ( imagefilter.find(fileExtension) != -1 ) + { + ImageInfo *info = new ImageInfo(*iconItem->imageInfo()); + info->setViewItem(0); + imageInfoList.append(info); + if (iconItem == item) + currentImageInfo = info; + } + } + } + + LightTableWindow *ltview = LightTableWindow::lightTableWindow(); + + ltview->disconnect(this); + + // TODO: Added slots connection here if necessary. + + ltview->loadImageInfos(imageInfoList, currentImageInfo); + + if (ltview->isHidden()) + ltview->show(); + + ltview->raise(); + ltview->setFocus(); +} + // ------------------------------------------------------------------------------ AlbumIconItem* AlbumIconView::firstSelectedItem() const --- trunk/extragear/graphics/digikam/digikam/albumiconview.h #660736:660737 @@ -1,12 +1,13 @@ /* ============================================================ - * Authors: Renchi Raju <[hidden email]> - * Caulier Gilles - * Marcel Wiesweg <[hidden email]> - * Date : 2002-16-10 + * Authors : Renchi Raju + * Caulier Gilles + * Marcel Wiesweg + * Date : 2002-16-10 * Description : album icon view * - * Copyright 2002-2005 by Renchi Raju by Gilles Caulier <caulier dot gilles at gmail dot com> - * Copyright 2006-2007 by Gilles Caulier <caulier dot gilles at gmail dot com> and Marcel Wiesweg + * Copyright 2002-2005 by Renchi Raju <[hidden email]> + * Copyright 2002-2007 by Gilles Caulier <caulier dot gilles at gmail dot com> + * Copyright 2006-2007 by Marcel Wiesweg <[hidden email]> * * This program is free software; you can redistribute it * and/or modify it under the terms of the GNU General @@ -132,6 +133,7 @@ void slotDeleteSelectedItems(bool deletePermanently = false); void slotDeleteSelectedItemsDirectly(bool useTrash); void slotDisplayItem(AlbumIconItem *item=0); + void slotInsertToLightTable(AlbumIconItem *item=0); void slotAlbumModified(); void slotSetAlbumThumbnail(AlbumIconItem *iconItem); void slotCopy(); --- trunk/extragear/graphics/digikam/utilities/lighttable/Makefile.am #660736:660737 @@ -1,17 +1,27 @@ METASOURCES = AUTO INCLUDES = -I$(top_srcdir)/digikam/digikam \ - -I$(top_srcdir)/digikam/libs/dimg \ - -I$(top_srcdir)/digikam/libs/thumbbar \ - -I$(top_srcdir)/digikam/libs/dmetadata \ - -I$(top_srcdir)/digikam/libs/themeengine \ - -I$(top_srcdir)/digikam/libs/threadimageio \ - $(all_includes) + -I$(top_srcdir)/digikam/libs/widgets/common \ + -I$(top_srcdir)/digikam/libs/dialogs \ + -I$(top_srcdir)/digikam/libs/thumbbar \ + -I$(top_srcdir)/digikam/libs/dimg \ + -I$(top_srcdir)/digikam/libs/themeengine \ + -I$(top_srcdir)/digikam/libs/dmetadata \ + -I$(top_srcdir)/digikam/libs/dimg/filters \ + -I$(top_srcdir)/digikam/libs/imageproperties \ + -I$(top_srcdir)/digikam/libs/threadimageio \ + -I$(top_srcdir)/digikam/utilities/setup \ + -I$(top_srcdir)/digikam/utilities/slideshow \ + -I$(top_srcdir)/digikam/utilities/imageeditor/canvas \ + -I$(top_srcdir)/digikam/utilities/imageeditor/tools \ + -I$(top_builddir)/digikam/libs/dialogs \ + $(LIBKEXIV2_CFLAGS) $(LIBKDCRAW_CFLAGS) $(all_includes) noinst_LTLIBRARIES = liblighttable.la -liblighttable_la_SOURCES = lighttablebar.cpp +liblighttable_la_SOURCES = lighttablebar.cpp lighttablewindow.cpp lighttableview.cpp liblighttable_la_LDFLAGS = $(all_libraries) $(KDE_RPATH) - +rcdir = $(kde_datadir)/digikam +rc_DATA = lighttablewindowui.rc ** trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.cpp #property svn:eol-style + native ** trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.h #property svn:eol-style + native ** trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #property svn:eol-style + native ** trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.h #property svn:eol-style + native _______________________________________________ Digikam-devel mailing list [hidden email] https://mail.kde.org/mailman/listinfo/digikam-devel |
Free forum by Nabble | Edit this page |