[Digikam-devel] [Bug 135048] New: easy comparing similar pictures using a lighttable

classic Classic list List threaded Threaded
74 messages Options
1234
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Bugzilla from mikmach@wp.pl
------- 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=135048         




------- Additional Comments From mikmach wp pl  2007-04-20 23:42 -------
Dnia pi�tek 20 kwiecie� 2007, Gilles Caulier napisa�:
> 16:06 ------- Created an attachment (id=20326)
 --> (http://bugs.kde.org/attachment.cgi?id=20326&action=view)
>  --> (http://bugs.kde.org/attachment.cgi?id=20326&action=view)
> patch to test new Thumbbar implementation depending of digiKam DB
> This patch is a test implementation to use the new thumbbar witch use
> digiKam DB.


Compiles here (Mdr 2006, gcc4.0.1).
One bug: when placing mouse pointer over image tooltip shows,
then scroll thumbbar with mousewheel without moving cursor. Tooltip is
always the same - doesn't change or vanish when image under mouse
pointer changes.

_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From caulier.gilles gmail com  2007-05-03 17:21 -------
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: digikam-devel kde org
CCMAIL: francisco.jct gmail com
CCMAIL: gerhard kulzer net

 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 <renchi pooh tam uiuc edu>
- *          Caulier Gilles
- *          Marcel Wiesweg <marcel.wiesweg gmx de>
- * 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 <renchi pooh tam uiuc edu>
+ * Copyright 2002-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright 2006-2007 by Marcel Wiesweg <marcel.wiesweg gmx de>
  *
  * 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 <renchi pooh tam uiuc edu>
- *          Caulier Gilles
- *          Marcel Wiesweg <marcel.wiesweg gmx de>
- * 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 <renchi pooh tam uiuc edu>
+ * Copyright 2002-2007 by Gilles Caulier <caulier dot gilles at gmail dot com>
+ * Copyright 2006-2007 by Marcel Wiesweg <marcel.wiesweg gmx de>
  *
  * 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
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Bugzilla from owner@bugs.kde.org
In reply to this post by Oliver Dörr
------- 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=135048         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20326|0                           |1
        is obsolete|                            |
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Bugzilla from owner@bugs.kde.org
In reply to this post by Oliver Dörr
------- 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=135048         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #20328|0                           |1
        is obsolete|                            |
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From caulier.gilles gmail com  2007-05-03 17:25 -------
To digiKam users:

The Light Table implemented in svn is not yet suitable. We working on with Paco. Please to not post comments in this room if a functionnality do not work. all in not yet implemented.

Also, i think this tool will not be enable in 0.9.2-fianl, excepted if we find more free time to finalize it. Considerate this tool in alpha stage.

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From caulier.gilles gmail com  2007-05-04 13:59 -------
SVN commit 661014 by cgilles:

digiKam from trunk : Light Table improvements.

The new LT is now able to compare 2 images at the same time. Just insert some pictures to LT and set one on left panel and one other to right panel using the thumbbar context menu. On the bottom (status bar) there are 2 sliders to zoom independantly the right or the left panel.

In a first time i have targeted to sync left and right panel but its complex to do it if size of left and right images are not the same.

There is a screenshot of LT in action at this url :

http://digikam3rdparty.free.fr/Screenshots/lighttable_v3.png

The LT still under alpha stage. there are some part witch are not yet implemented/tested...

CCBUG: 135048
CCMAIL: digikam-devel kde org
CCMAIL: francisco.jct gmail com
CCMAIL: gerhard kulzer net





 M  +2 -1      Makefile.am  
 AM            lighttableview.cpp   [License: GPL]
 AM            lighttableview.h   [License: GPL]
 M  +125 -61   lighttablewindow.cpp  
 M  +4 -3      lighttablewindow.h  


--- trunk/extragear/graphics/digikam/utilities/lighttable/Makefile.am #661013:661014
 @ -19,7 +19,8  @
 
 noinst_LTLIBRARIES = liblighttable.la
 
-liblighttable_la_SOURCES = lighttablebar.cpp lighttablewindow.cpp lighttablepreview.cpp
+liblighttable_la_SOURCES = lighttablebar.cpp lighttablewindow.cpp lighttablepreview.cpp \
+                           lighttableview.cpp
 
 liblighttable_la_LDFLAGS = $(all_libraries) $(KDE_RPATH)
 
** 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 #661013:661014
 @ -75,10 +75,12  @
         removeFullScreenButton              = false;
         cancelSlideShow                     = false;
         accelerators                        = 0;
+        leftSidebar                         = 0;
         rightSidebar                        = 0;
         previewView                         = 0;
         barView                             = 0;
-        splitter                            = 0;
+        hSplitter                           = 0;
+        vSplitter                           = 0;
         fileDeleteAction                    = 0;
         slideShowAction                     = 0;
         fullScreenAction                    = 0;
 @ -97,7 +99,8  @
         zoomMinusAction                     = 0;
         zoomTo100percents                   = 0;
         nameLabel                           = 0;
-        zoomBar                             = 0;  
+        leftZoomBar                         = 0;  
+        rightZoomBar                        = 0;  
     }
 
     bool                      fullScreenHideToolBar;
 @ -105,7 +108,8  @
     bool                      removeFullScreenButton;
     bool                      cancelSlideShow;
 
-    QSplitter                *splitter;
+    QSplitter                *hSplitter;
+    QSplitter                *vSplitter;
 
     KAction                  *fileDeleteAction;
     KAction                  *slideShowAction;
 @ -132,10 +136,12  @
 
     LightTableView           *previewView;
 
-    StatusZoomBar            *zoomBar;
+    StatusZoomBar            *leftZoomBar;
+    StatusZoomBar            *rightZoomBar;
 
     StatusProgressBar        *nameLabel;
 
+    ImagePropertiesSideBarDB *leftSidebar;
     ImagePropertiesSideBarDB *rightSidebar;
 };
 
 @ -175,14 +181,20  @
 
     //-------------------------------------------------------------
 
+    d->leftSidebar->loadViewState();
     d->rightSidebar->loadViewState();
+    d->leftSidebar->populateTags();
     d->rightSidebar->populateTags();
 
     KConfig* config = kapp->config();
     config->setGroup("LightTable Settings");
-    if(config->hasKey("Splitter Sizes"))
-        d->splitter->setSizes(config->readIntListEntry("Splitter Sizes"));
 
+    if(config->hasKey("Vertical Splitter Sizes"))
+        d->vSplitter->setSizes(config->readIntListEntry("Vertical Splitter Sizes"));
+
+    if(config->hasKey("Horizontal Splitter Sizes"))
+        d->hSplitter->setSizes(config->readIntListEntry("Horizontal Splitter Sizes"));
+
     setAutoSaveSettings("LightTable Settings");
 }
 
 @ -201,7 +213,8  @
 
     KConfig* config = kapp->config();
     config->setGroup("LightTable Settings");
-    config->writeEntry("Splitter Sizes", d->splitter->sizes());
+    config->writeEntry("Vertical Splitter Sizes", d->vSplitter->sizes());
+    config->writeEntry("Horizontal Splitter Sizes", d->hSplitter->sizes());
     config->sync();
 
     e->accept();
 @ -209,61 +222,94  @
 
 void LightTableWindow::setupUserArea()
 {
-    QWidget* widget  = new QWidget(this);
-    QHBoxLayout *lay = new QHBoxLayout(widget);
-    d->splitter      = new QSplitter(widget);
-    d->barView       = new LightTableBar(d->splitter, ThumbBarView::Vertical);
-    d->previewView   = new LightTableView(d->splitter);
-    d->rightSidebar  = new ImagePropertiesSideBarDB(widget, "LightTable Right Sidebar", d->splitter,
-                                                    Sidebar::Right, true);
-    lay->addWidget(d->splitter);
-    lay->addWidget(d->rightSidebar);
+    QWidget* mainW    = new QWidget(this);
+    d->hSplitter      = new QSplitter(Qt::Horizontal, mainW);
+    QHBoxLayout *hlay = new QHBoxLayout(mainW);
+    d->leftSidebar    = new ImagePropertiesSideBarDB(mainW, "LightTable Left Sidebar", d->hSplitter,
+                                                     Sidebar::Left, true);
 
-    d->splitter->setFrameStyle( QFrame::NoFrame );
-    d->splitter->setFrameShadow( QFrame::Plain );
-    d->splitter->setFrameShape( QFrame::NoFrame );
-    d->splitter->setOpaqueResize(false);
-    setCentralWidget(widget);
+    QWidget* centralW = new QWidget(d->hSplitter);
+    QVBoxLayout *vlay = new QVBoxLayout(centralW);
+    d->vSplitter      = new QSplitter(Qt::Vertical, centralW);
+    d->barView        = new LightTableBar(d->vSplitter, ThumbBarView::Horizontal);
+    d->previewView    = new LightTableView(d->vSplitter);
+    vlay->addWidget(d->vSplitter);
+
+    d->rightSidebar   = new ImagePropertiesSideBarDB(mainW, "LightTable Right Sidebar", d->hSplitter,
+                                                     Sidebar::Right, true);
+
+    hlay->addWidget(d->leftSidebar);
+    hlay->addWidget(d->hSplitter);
+    hlay->addWidget(d->rightSidebar);
+
+    d->hSplitter->setFrameStyle( QFrame::NoFrame );
+    d->hSplitter->setFrameShadow( QFrame::Plain );
+    d->hSplitter->setFrameShape( QFrame::NoFrame );
+    d->hSplitter->setOpaqueResize(false);
+    d->vSplitter->setFrameStyle( QFrame::NoFrame );
+    d->vSplitter->setFrameShadow( QFrame::Plain );
+    d->vSplitter->setFrameShape( QFrame::NoFrame );
+    d->vSplitter->setOpaqueResize(false);
+
+    setCentralWidget(mainW);
 }
 
 void LightTableWindow::setupStatusBar()
 {
+    d->leftZoomBar = new StatusZoomBar(statusBar());
+    statusBar()->addWidget(d->leftZoomBar, 1);
+
     d->nameLabel = new StatusProgressBar(statusBar());
     d->nameLabel->setAlignment(Qt::AlignCenter);
     d->nameLabel->setMaximumHeight(fontMetrics().height()+2);    
     statusBar()->addWidget(d->nameLabel, 100);
 
-    d->zoomBar = new StatusZoomBar(statusBar());
-    statusBar()->addWidget(d->zoomBar, 1, true);
+    d->rightZoomBar = new StatusZoomBar(statusBar());
+    statusBar()->addWidget(d->rightZoomBar, 1);
 }
 
 void LightTableWindow::setupConnections()
 {
-    connect(d->barView, SIGNAL(signalLightTableBarItemSelected(ImageInfo*)),
-            this, SLOT(slotLightTableBarItemSelected(ImageInfo*)));
+    connect(d->barView, SIGNAL(setLeftPanelInfo(ImageInfo*)),
+            this, SLOT(slotSetLeftPanelInfo(ImageInfo*)));
 
+    connect(d->barView, SIGNAL(setRightPanelInfo(ImageInfo*)),
+            this, SLOT(slotSetRightPanelInfo(ImageInfo*)));
+
     connect(d->nameLabel, SIGNAL(signalCancelButtonPressed()),
             this, SLOT(slotNameLabelCancelButtonPressed()));
 
-    ImageAttributesWatch *watch = ImageAttributesWatch::instance();
+    connect(d->leftZoomBar, SIGNAL(signalZoomMinusClicked()),
+            d->previewView, SLOT(slotDecreaseLeftZoom()));
 
-    connect(watch, SIGNAL(signalFileMetadataChanged(const KURL &)),
-            this, SLOT(slotFileMetadataChanged(const KURL &)));
+    connect(d->leftZoomBar, SIGNAL(signalZoomPlusClicked()),
+            d->previewView, SLOT(slotIncreaseLeftZoom()));
 
-    connect(d->zoomBar, SIGNAL(signalZoomMinusClicked()),
-           d->previewView, SLOT(slotDecreaseZoom()));
+    connect(d->leftZoomBar, SIGNAL(signalZoomSliderChanged(int)),
+            d->previewView, SLOT(slotLeftZoomSliderChanged(int)));
 
-    connect(d->zoomBar, SIGNAL(signalZoomPlusClicked()),
-           d->previewView, SLOT(slotIncreaseZoom()));
+    connect(d->rightZoomBar, SIGNAL(signalZoomMinusClicked()),
+            d->previewView, SLOT(slotDecreaseRightZoom()));
 
-    connect(d->zoomBar, SIGNAL(signalZoomSliderChanged(int)),
-           this, SLOT(slotZoomSliderChanged(int)));
+    connect(d->rightZoomBar, SIGNAL(signalZoomPlusClicked()),
+            d->previewView, SLOT(slotIncreaseRightZoom()));
 
-    connect(d->previewView, SIGNAL(signalZoomFactorChanged(double)),
-           this, SLOT(slotZoomFactorChanged(double)));
+    connect(d->rightZoomBar, SIGNAL(signalZoomSliderChanged(int)),
+            d->previewView, SLOT(slotRightZoomSliderChanged(int)));
 
+    connect(d->previewView, SIGNAL(signalLeftZoomFactorChanged(double)),
+            this, SLOT(slotLeftZoomFactorChanged(double)));
+
+    connect(d->previewView, SIGNAL(signalRightZoomFactorChanged(double)),
+            this, SLOT(slotRightZoomFactorChanged(double)));
+
     connect(d->previewView, SIGNAL(signalSlideShow()),
-           this, SLOT(slotToggleSlideShow()));
+            this, SLOT(slotToggleSlideShow()));
+
+    ImageAttributesWatch *watch = ImageAttributesWatch::instance();
+
+    connect(watch, SIGNAL(signalFileMetadataChanged(const KURL &)),
+            this, SLOT(slotFileMetadataChanged(const KURL &)));
 }
 
 void LightTableWindow::setupActions()
 @ -373,13 +419,14  @
 
 void LightTableWindow::loadImageInfos(const ImageInfoList &list, ImageInfo *imageInfoCurrent)
 {
-    d->previewView->setImageInfo(imageInfoCurrent);
-
     for (QPtrList<ImageInfo>::const_iterator it = list.begin(); it != list.end(); ++it)
     {
-        LightTableBarItem *item = new LightTableBarItem(d->barView, *it);
-        if (*it == imageInfoCurrent)
-            d->barView->setSelected(item);
+        if (!d->barView->findItemByInfo(*it))
+        {
+            LightTableBarItem *item = new LightTableBarItem(d->barView, *it);
+            if (*it == imageInfoCurrent)
+                d->barView->setSelected(item);
+        }
     }  
 
     // if window is iconified, show it
 @ -387,17 +434,24  @
     {
         KWin::deIconifyWindow(winId());
     }
+}  
+
+void LightTableWindow::slotSetLeftPanelInfo(ImageInfo* info)
+{
+    d->previewView->setLeftImageInfo(info);
+    d->leftSidebar->itemChanged(info);
 }
 
-void LightTableWindow::slotLightTableBarItemSelected(ImageInfo* info)
+void LightTableWindow::slotSetRightPanelInfo(ImageInfo* info)
 {
-    d->previewView->setImageInfo(info);
+    d->previewView->setRightImageInfo(info);
     d->rightSidebar->itemChanged(info);
 }
 
 void LightTableWindow::slotZoomTo100Percents()
 {
-    d->previewView->setZoomFactor(1.0);
+    d->previewView->setLeftZoomFactor(1.0);
+    d->previewView->setRightZoomFactor(1.0);
 }
 
 void LightTableWindow::slotFitToWindow()
 @ -671,40 +725,50  @
     }
 }
 
-void LightTableWindow::slotZoomFactorChanged(double zoom)
+void LightTableWindow::slotLeftZoomFactorChanged(double zoom)
 {
     double h    = (double)ThumbnailSize::Huge;
     double s    = (double)ThumbnailSize::Small;
-    double zmin = d->previewView->zoomMin();
-    double zmax = d->previewView->zoomMax();
+    double zmin = d->previewView->leftZoomMin();
+    double zmax = d->previewView->leftZoomMax();
     double b    = (zmin-(zmax*s/h))/(1-s/h);
     double a    = (zmax-b)/h;
     int size    = (int)((zoom - b) /a);
 
-    d->zoomBar->setZoomSliderValue(size);
-    d->zoomBar->setZoomTrackerText(i18n("zoom: %1%").arg((int)(zoom*100.0)));
+    d->leftZoomBar->setZoomSliderValue(size);
+    d->leftZoomBar->setZoomTrackerText(i18n("zoom: %1%").arg((int)(zoom*100.0)));
 
-    d->zoomBar->setEnableZoomPlus(true);
-    d->zoomBar->setEnableZoomMinus(true);
+    d->leftZoomBar->setEnableZoomPlus(true);
+    d->leftZoomBar->setEnableZoomMinus(true);
 
-    if (d->previewView->maxZoom())
-        d->zoomBar->setEnableZoomPlus(false);
+    if (d->previewView->leftMaxZoom())
+        d->leftZoomBar->setEnableZoomPlus(false);
 
-    if (d->previewView->minZoom())
-        d->zoomBar->setEnableZoomMinus(false);
+    if (d->previewView->leftMinZoom())
+        d->leftZoomBar->setEnableZoomMinus(false);
 }
 
-void LightTableWindow::slotZoomSliderChanged(int size)
+void LightTableWindow::slotRightZoomFactorChanged(double zoom)
 {
     double h    = (double)ThumbnailSize::Huge;
     double s    = (double)ThumbnailSize::Small;
-    double zmin = d->previewView->zoomMin();
-    double zmax = d->previewView->zoomMax();
+    double zmin = d->previewView->rightZoomMin();
+    double zmax = d->previewView->rightZoomMax();
     double b    = (zmin-(zmax*s/h))/(1-s/h);
     double a    = (zmax-b)/h;
-    double z    = a*size+b;
+    int size    = (int)((zoom - b) /a);
 
-    d->previewView->setZoomFactor(z);
+    d->rightZoomBar->setZoomSliderValue(size);
+    d->rightZoomBar->setZoomTrackerText(i18n("zoom: %1%").arg((int)(zoom*100.0)));
+
+    d->rightZoomBar->setEnableZoomPlus(true);
+    d->rightZoomBar->setEnableZoomMinus(true);
+
+    if (d->previewView->rightMaxZoom())
+        d->rightZoomBar->setEnableZoomPlus(false);
+
+    if (d->previewView->rightMinZoom())
+        d->rightZoomBar->setEnableZoomMinus(false);
 }
 
 }  // namespace Digikam
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.h #661013:661014
 @ -77,7 +77,8  @
 
 private slots:
 
-    void slotLightTableBarItemSelected(ImageInfo*);
+    void slotSetLeftPanelInfo(ImageInfo*);
+    void slotSetRightPanelInfo(ImageInfo*);
     void slotZoomTo100Percents();
     void slotFitToWindow();
     void slotNameLabelCancelButtonPressed();
 @ -90,8 +91,8  @
     void slotNewToolbarConfig();
     void slotSetup();
     void slotFileMetadataChanged(const KURL &);
-    void slotZoomSliderChanged(int);
-    void slotZoomFactorChanged(double);
+    void slotLeftZoomFactorChanged(double);
+    void slotRightZoomFactorChanged(double);
 
 private:
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Bugzilla from mikmach@wp.pl
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From mikmach wp pl  2007-05-04 17:07 -------
> In a first time i have targeted to sync left and right panel but its
> complex to do it if size of left and right images are not the same.


I think you should give up when images aren't identical in terms of
size.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Bug 135048] easy comparing similar pictures using a lighttable

Arnd Baecker
Hey, this looks close to useable!
(Compile went fine and no crashes so far ;-)

Some thoughts (feel free to ignore if they are premature;
I know the light-table is alpha)
- the light-table has to work with non-scaled images
  (i.e. like the image editor); otherwise
  a control of the quality is not possible.
- joint zooming and joint panning is essential
  (I agree with Mikolaj that for images not idential in size
   this should just be disabled;
   maybe there is a way to deal with this, but this
   really looks like a rare situation)

  In addition, even for similar pictures, the
  subject of interest might not be at the same place.
  For this the possibility to create an additional shift
  (while still keeping the linked panning and zooming) would
  be helpful. This could be achieved by declaring
  the left image as master and the right one just follows
  any zoom and pan.
  If one pans in the right image, only this one is
  affected. If one then pans in the left one,
  the right one follows, as before, but with
  the additional shift
  (there might be some issues near the borders, but
   one thing after another ;-).
- the whole process feels too complicated:
  a) select images
  b) add them to the light-table
  c) in the light-table:
     select image for the left view
     select image for the right view
  There is not much one can do about a) and b),
  apart from maybe providing a keyboard short-cut
  at some later stage.
  For c): what about displaying the first two images
  directly as left and right one?
  (maybe they should also be marked as selected ones,
   with different colors?)

  (Gilles, here should really stop reading, because
   the rest is even more like feature wishes...)
  - Maybe drag-and-drop from the thumbs would be helpful.
  - Then, to go through a sequence of similar
    images, a kind of "Next - two" comparison would
    speed up things considerably.
    Here the right image becomes the left one and
    the next thumb becomes the new right image.
    (The same for "Previus Two")

What I am not sure about concerns the simultaneous comparison
of more than two images (3, 4, ....)?
Whether this is useful or not, presumably depends
on the size of the screen. For a small 12'' laptop
anything more than 2 might not work out, whereas on a
large 20'' display much more is possible.

OK, I will shut up now.

Keep on this great work on the light-table - it
looks extremely promising!!!

Best, Arnd



_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Arnd Baecker
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From arnd.baecker web de  2007-05-05 09:39 -------
Hey, this looks close to useable!
(Compile went fine and no crashes so far ;-)

Some thoughts (feel free to ignore if they are premature;
I know the light-table is alpha)
- the light-table has to work with non-scaled images
  (i.e. like the image editor); otherwise
  a control of the quality is not possible.
- joint zooming and joint panning is essential
  (I agree with Mikolaj that for images not idential in size
   this should just be disabled;
   maybe there is a way to deal with this, but this
   really looks like a rare situation)

  In addition, even for similar pictures, the
  subject of interest might not be at the same place.
  For this the possibility to create an additional shift
  (while still keeping the linked panning and zooming) would
  be helpful. This could be achieved by declaring
  the left image as master and the right one just follows
  any zoom and pan.
  If one pans in the right image, only this one is
  affected. If one then pans in the left one,
  the right one follows, as before, but with
  the additional shift
  (there might be some issues near the borders, but
   one thing after another ;-).
- the whole process feels too complicated:
  a) select images
  b) add them to the light-table
  c) in the light-table:
     select image for the left view
     select image for the right view
  There is not much one can do about a) and b),
  apart from maybe providing a keyboard short-cut
  at some later stage.
  For c): what about displaying the first two images
  directly as left and right one?
  (maybe they should also be marked as selected ones,
   with different colors?)

  (Gilles, here should really stop reading, because
   the rest is even more like feature wishes...)
  - Maybe drag-and-drop from the thumbs would be helpful.
  - Then, to go through a sequence of similar
    images, a kind of "Next - two" comparison would
    speed up things considerably.
    Here the right image becomes the left one and
    the next thumb becomes the new right image.
    (The same for "Previus Two")

What I am not sure about concerns the simultaneous comparison
of more than two images (3, 4, ....)?
Whether this is useful or not, presumably depends
on the size of the screen. For a small 12'' laptop
anything more than 2 might not work out, whereas on a
large 20'' display much more is possible.

OK, I will shut up now.

Keep on this great work on the light-table - it
looks extremely promising!!!

Best, Arnd
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From caulier.gilles gmail com  2007-05-05 14:51 -------
Arnd,

I'm aware about all feedback, so i try to read all comments on B.K.O... But time missing and i'm not easy to follow all directions (:=)))

Gilles
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Bugzilla from mikmach@wp.pl
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From mikmach wp pl  2007-05-05 21:19 -------
Dnia sobota 05 maj 2007, Arnd Baecker napisał:
> - joint zooming and joint panning is essential
>   (I agree with Mikolaj that for images not idential in size
>    this should just be disabled;
>    maybe there is a way to deal with this, but this
>    really looks like a rare situation)

I suppose Gilles tried to make proportional sync: moving of panning from
top-left to bottom-right works always regardless of size of image.
I think basic sync by pixel would be enough.
>   - Maybe drag-and-drop from the thumbs would be helpful.

Would be extremely helpful. First time I opened LT I thought this is
buggy...
> What I am not sure about concerns the simultaneous comparison
> of more than two images (3, 4, ....)?

I think all images should be opened in compare part of LT. Only later
they could be removed, re-added, etc.
> Keep on this great work on the light-table - it
> looks extremely promising!!!

Agree :)
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         
caulier.gilles gmail com changed:

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



------- Additional Comments From caulier.gilles gmail com  2007-05-07 16:06 -------
SVN commit 662113 by cgilles:

digikam from trunk : added Insert to Light Table action on album gui Image menu... Now the new Light Table tool is officially available on digiKam.
BUG: 135048


 M  +0 -6      albumiconview.cpp  
 M  +11 -0     digikamapp.cpp  
 M  +2 -0      digikamappprivate.h  
 M  +1 -0      digikamui.rc  
 M  +8 -0      digikamview.cpp  
 M  +1 -0      digikamview.h  


--- trunk/extragear/graphics/digikam/digikam/albumiconview.cpp #662112:662113
 @ -23,9 +23,6  @
  *
  * ============================================================ */
 
-// Uncomment this line to enable Light Table tool.
-#define ENABLE_LIGHTTABLE 1
-
 #ifdef HAVE_CONFIG_H
 #include <config.h>
 #endif
 @ -531,10 +528,7  @
     popmenu.insertItem(SmallIcon("viewimage"), i18n("View..."), 18);
     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 ----------------------------
 
--- trunk/extragear/graphics/digikam/digikam/digikamapp.cpp #662112:662113
 @ -618,6 +618,15  @
                                     "image_edit");
     d->imageViewAction->setWhatsThis(i18n("This will open the selected item in the image editor."));
 
+    d->imageLightTableAction = new KAction(i18n("Insert to Light Table"),
+                                    "idea",
+                                    Key_F6,
+                                    d->view,
+                                    SLOT(slotImageLightTable()),
+                                    actionCollection(),
+                                    "image_lighttable");
+    d->imageLightTableAction->setWhatsThis(i18n("This will insert the selected items to light table."));
+
     d->imageRenameAction = new KAction(i18n("Rename..."),
                                     "pencil",
                                     Key_F2,
 @ -940,6 +949,7  @
 
     d->imageViewAction->setEnabled(false);
     d->imagePreviewAction->setEnabled(false);
+    d->imageLightTableAction->setEnabled(false);
     d->imageRenameAction->setEnabled(false);
     d->imageDeleteAction->setEnabled(false);
     d->imageExifOrientationActionMenu->setEnabled(false);
 @ -1154,6 +1164,7  @
     bool val = selection.isEmpty() ? false : true;
     d->imageViewAction->setEnabled(val);
     d->imagePreviewAction->setEnabled(val);
+    d->imageLightTableAction->setEnabled(val);
     d->imageRenameAction->setEnabled(val);
     d->imageDeleteAction->setEnabled(val);
     d->imageExifOrientationActionMenu->setEnabled(val);
--- trunk/extragear/graphics/digikam/digikam/digikamappprivate.h #662112:662113
 @ -87,6 +87,7  @
         editTagAction                        = 0;
         imagePreviewAction                   = 0;
         imageViewAction                      = 0;
+        imageLightTableAction                = 0;
         imageSetExifOrientation1Action       = 0;
         imageSetExifOrientation2Action       = 0;
         imageSetExifOrientation3Action       = 0;
 @ -181,6 +182,7  @
     
     // Image Actions
     KToggleAction         *imagePreviewAction;
+    KAction               *imageLightTableAction;
     KAction               *imageViewAction;
     KAction               *imageSetExifOrientation1Action;
     KAction               *imageSetExifOrientation2Action;
--- trunk/extragear/graphics/digikam/digikam/digikamui.rc #662112:662113
 @ -42,6 +42,7  @
    <text>&amp;Image</text>
      <Action name="image_view" />
      <Action name="image_edit" />
+     <Action name="image_lighttable" />
      <Action name="image_set_exif_orientation"/>
    <Separator />
      <ActionList name="image_actions"/>
--- trunk/extragear/graphics/digikam/digikam/digikamview.cpp #662112:662113
 @ -1032,6 +1032,14  @
     d->iconView->slotSetExifOrientation(orientation);
 }
 
+void DigikamView::slotImageLightTable()
+{
+    AlbumIconItem *item = d->iconView->firstSelectedItem();
+    if (!item) return;
+
+    d->iconView->slotInsertToLightTable(item);
+}
+
 void DigikamView::slotImageRename(AlbumIconItem *iconItem)
 {
     AlbumIconItem *item;
--- trunk/extragear/graphics/digikam/digikam/digikamview.h #662112:662113
 @ -117,6 +117,7  @
     void slotNewAdvancedSearch();
 
     // Image action slots
+    void slotImageLightTable();
     void slotImagePreview();
     void slotImageEdit();
     void slotImageExifOrientation(int orientation);
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         




------- Additional Comments From caulier.gilles gmail com  2007-05-07 16:10 -------
Hey guys,

Today, i have fully implemented the Light Table Drag & Drop support.

Excepted some improvements and polishing to do, especially in main menu, the Light Table is now ready to use. I will open a new component in B.K.O about. Please post your wishes and bug reports at the right place. Thanks in advance.

Gilles Caulier
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 135048] easy comparing similar pictures using a lighttable

Gilles Caulier-4
In reply to this post by Oliver Dörr
------- 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=135048         
caulier.gilles gmail com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Preview                     |Light Table
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
1234