Bug 145237 - small wishes for the light-table
Summary: small wishes for the light-table
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: LightTable-Engine (show other bugs)
Version: unspecified
Platform: Debian stable Linux
: NOR wishlist (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-05-09 18:17 UTC by Arnd Baecker
Modified: 2012-09-03 07:00 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 0.9.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arnd Baecker 2007-05-09 18:17:02 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Debian stable Packages

Some more small (or big?) wishes

a) The switching of the synchronization of previews works 
   very nice.
   It would be very convenient (i.e. much faster) for quick
   adjustments, that for example 
   CTRL-slider (and CTRL-middle-mouse-button move)
   would just do the unsynchronized operation?
b) A way to go through pairs of images of the thumb-bar
   one after-another, i.e. 
   [ image 1] [ image 2]
   are displayed side by side; then pressing 
   (for example) Page-Up would show
   [ image 2] [image 3]
   so that comparing a sequence of images (at the same place)
   could be done very very quickly.
c) left-double click on thumb: insert into left panel
   right-double click on thumb: inser into right panel
d) keyboard navigation in the thumbs-display?


P.S.: Is there a way to more directly enter bugs in the B.K.O for
the same component than to go through the whole sequence
(of specifying KDE version, OS, ...) every time again?
Comment 1 Arnd Baecker 2007-05-09 18:23:22 UTC
e)  DEL as short-cut to remove items from the thumbs would
    be nice.
Comment 2 Gerhard Kulzer 2007-05-09 23:16:30 UTC
f) On my computer (with the latest svn version) the mouse wheel pan speed is 
much to slow compared to other display modes. Has anybody else the same 
problem. If yes, it should be changed.

Gerhard
Comment 3 Arnd Baecker 2007-05-09 23:36:03 UTC
ad f): To me it seems all fine (but this is on a Core 2 Duo with 2 GHz,
I have no idea how it would be on my old PIII laptop ...)
Comment 4 caulier.gilles 2007-05-10 10:17:40 UTC
Gerhard,

Yes, i can conform it. Let's me explain what i have seen :

- Go to a preview on LT (not fit to window) and press mouse wheel button to pan. It's slow.
- Now, use the pan icon widget on the left botoom corner. It's fast.

Both mode use the same implementation, but not by the same way, especially to use cache mecanism about preview tile rendering (witch is used to pan/zoom on preview).

I suspect a bug somewhere...

Marcel. Can you confirm this behaviours ? Any idea ?

Gilles
Comment 5 caulier.gilles 2007-05-10 14:09:11 UTC
To Arnd :

>c) left-double click on thumb: insert into left panel
>   right-double click on thumb: inser into right panel 

No. It too complex, and right click give the thumbbar pop-up menu. 

There is a more simple way to do what you want. Use drag & drop. It's implemented everywhere. You can drag a icon from thumbbar to Left or Right panel... and also, if you want, between Album Gui and Light Table.

Try it... It very powerfull...

Gilles
Comment 6 caulier.gilles 2007-05-10 14:10:31 UTC
Arnd,

I forget to said, than the reverse is true... D&D _from_ LT _to_ Album Gui work...

Gilles
Comment 7 caulier.gilles 2007-05-10 14:57:54 UTC
To Arnd,

>P.S.: Is there a way to more directly enter bugs in the B.K.O for
>the same component than to go through the whole sequence
>(of specifying KDE version, OS, ...) every time again? 

I don't know. I only use B.K.O to fix bug, not to create new one (:=)))

Gilles
Comment 8 caulier.gilles 2007-05-10 15:02:53 UTC
To Arnd, 

>a) The switching of the synchronization of previews works
>   very nice.
>   It would be very convenient (i.e. much faster) for quick
>   adjustments, that for example
>   CTRL-slider (and CTRL-middle-mouse-button move)
>   would just do the unsynchronized operation?

CTRL+SHIFT+Y toogle sync between panels. This is not enough ?

b) A way to go through pairs of images of the thumb-bar
   one after-another, i.e.
   [ image 1] [ image 2]
   are displayed side by side; then pressing
   (for example) Page-Up would show
   [ image 2] [image 3]
   so that comparing a sequence of images (at the same place)
   could be done very very quickly.

Interressing, but the tool is not designed like this. I think than its require huge changes in implementation... 

Marcel, 

if you have a good idea to implement this wish speedly, i'm hear you...

>c) left-double click on thumb: insert into left panel
>   right-double click on thumb: inser into right panel

This one is invalid now. See previous message.

d) keyboard navigation in the thumbs-display? 

Witch Keyboard shortcuts ?

Gilles
Comment 9 caulier.gilles 2007-05-10 16:17:36 UTC
Arnd,

Fresh screenshot of Light Table in action can be seen here:

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

Gilles
Comment 10 Arnd Baecker 2007-05-10 16:47:00 UTC
On Thu, 10 May 2007, Gilles Caulier wrote:

[bugs.kde.org quoted mail]

OK (though shouldn't Qt technically be able to distinguish
a single from a double right-click?).

> There is a more simple way to do what you want. Use drag & drop. It's implemented everywhere. You can drag a icon from thumbbar to Left or Right panel... and also, if you want, between Album Gui and Light Table.


It does work very nicely indeed.
Still maybe some keyboard short-cuts?
(Something like l/r L/R or ALT-L ALT-R to put
the currently selected thumb into the left or right panel.)

But Mikolaj is the expert for keyboard short-cuts,
so before he has to do a mass-filing on key-board-actions
for the light-table, his opinion might be helpful!
Comment 11 Arnd Baecker 2007-05-10 17:06:20 UTC
> I don't know. I only use B.K.O to fix bug, not to create new one (:=)))
;-) and you are fast at that!!! (faster than I can create new ones it seems;-)

Ad a) 
> CTRL+SHIFT+Y toogle sync between panels. This is not enough ?
I think that the suggested option would be even more convenient/faster
(but I don't know how difficult it would be to do the coding ...)

Ad b) going through pairs of images:
> Interressing, but the tool is not designed like this. I think than its require 
> huge changes in implementation...

Not sure, but maybe it can be done quite easily with all what is available now:
- the images are organized in some kind of list in the thumb-bar,
  let's say index_l for the left one and index_r for the right one
- when going right (and index_l+1<number_of_thumbs  and     
  index_r+1<number_of_thumbs)
  the left panel is replaced by the image corresponding to index_l+1
  and the right one by index_r+1.
  The same for the other direction of going left.

  For changing the images, couldn't one just use the routine
  which is called after drag and drop?
  (Haven't looked at the code yet)
- All this could be activated on some keyboard short-cut
  (maybe CTRL-right CTRL-left?)

Ad d) 
> keyboard navigation in the thumbs-display? 

maybe some Cursor keys to go left/right in the thumbs?
(Mikolaj, what do you think)


Gilles, you are really doing a brilliant job - the light-table
is approaching perfection much faster than I would ever anticipated!

Many thanks,

Arnd
Comment 12 caulier.gilles 2007-05-10 21:37:01 UTC
To Arnd,

>>Ad b) going through pairs of images:
>> Interressing, but the tool is not designed like this. I think than its require
>> huge changes in implementation...

>Not sure, but maybe it can be done quite easily with all what is available now:
>- the images are organized in some kind of list in the thumb-bar,
> let's say index_l for the left one and index_r for the right one
>- when going right (and index_l+1<number_of_thumbs  and
> index_r+1<number_of_thumbs)
> the left panel is replaced by the image corresponding to index_l+1
> and the right one by index_r+1.
> The same for the other direction of going left.

> For changing the images, couldn't one just use the routine
> which is called after drag and drop?
> (Haven't looked at the code yet)
>- All this could be activated on some keyboard short-cut
> (maybe CTRL-right CTRL-left?)

ok. I understand. Naviguate by pair of images. It's can be easy to do. I will take a look tomorow.

Gilles
Comment 13 Mikolaj Machowski 2007-05-10 23:33:10 UTC
> maybe some Cursor keys to go left/right in the thumbs?
> (Mikolaj, what do you think)


IMO it should be PageUp, PageDown. Arrors should be saved for panning of
images.

> Gilles, you are really doing a brilliant job - the light-table
> is approaching perfection much faster than I would ever anticipated!


/aol

m.
Comment 14 caulier.gilles 2007-05-11 15:22:32 UTC
SVN commit 663493 by cgilles:

digikam from trunk : Light Table : added new options to navigate between thumbbar items (first, previous, next, last). Shortcuts are the same than Album Gui and Image Editor
CCBUGS: 145237

 M  +1 -1      lighttablebar.cpp  
 M  +1 -1      lighttablebar.h  
 M  +72 -3     lighttablewindow.cpp  
 M  +5 -0      lighttablewindow.h  
 M  +14 -1     lighttablewindowui.rc  


--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablebar.cpp #663492:663493
@@ -284,7 +284,7 @@
     return list;
 }
 
-void LightTableBar::setSelected(LightTableBarItem* ltItem)
+void LightTableBar::setSelectedItem(LightTableBarItem* ltItem)
 {
     ThumbBarItem *item = static_cast<ThumbBarItem*>(ltItem);
     if (item) ThumbBarView::setSelected(item);
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablebar.h #663492:663493
@@ -59,7 +59,7 @@
     ImageInfo*    currentItemImageInfo() const;
     ImageInfoList itemsImageInfoList();
 
-    void setSelected(LightTableBarItem* ltItem);
+    void setSelectedItem(LightTableBarItem* ltItem);
 
     LightTableBarItem* findItemByInfo(const ImageInfo* info) const;
     LightTableBarItem* findItemByPos(const QPoint& pos) const;
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #663492:663493
@@ -109,6 +109,10 @@
         statusProgressBar      = 0;
         leftZoomBar            = 0;  
         rightZoomBar           = 0;  
+        forwardAction          = 0;
+        backwardAction         = 0;
+        firstAction            = 0;
+        lastAction             = 0;
     }
 
     bool                      fullScreenHideToolBar;
@@ -127,6 +131,11 @@
     KAction                  *star4;
     KAction                  *star5;
 
+    KAction                  *forwardAction;
+    KAction                  *backwardAction;
+    KAction                  *firstAction;
+    KAction                  *lastAction;
+
     KAction                  *setItemLeftAction;
     KAction                  *setItemRightAction;
     KAction                  *clearListAction;
@@ -378,6 +387,22 @@
 {
     // -- Standard 'File' menu actions ---------------------------------------------
 
+    d->backwardAction = KStdAction::back(this, SLOT(slotBackward()),
+                                    actionCollection(), "lighttable_backward");
+
+    d->forwardAction = KStdAction::forward(this, SLOT(slotForward()),
+                                   actionCollection(), "lighttable_forward");
+
+    d->firstAction = new KAction(i18n("&First"), "start",
+                                 KStdAccel::shortcut( KStdAccel::Home),
+                                 this, SLOT(slotFirst()),
+                                 actionCollection(), "lighttable_first");
+
+    d->lastAction = new KAction(i18n("&Last"), "finish",
+                                KStdAccel::shortcut( KStdAccel::End),
+                                this, SLOT(slotLast()),
+                                actionCollection(), "lighttable_last");
+
     d->setItemLeftAction = new KAction(i18n("Show item on left panel"), "previous",
                                        CTRL+Key_L, this, SLOT(slotSetItemLeft()),
                                        actionCollection(), "lighttable_setitemleft");
@@ -510,6 +535,26 @@
                     Key_Escape, this, SLOT(slotEscapePressed()),
                     false, true);
 
+    d->accelerators->insert("Next Image Key_Space", i18n("Next Image"),
+                    i18n("Load Next Image"),
+                    Key_Space, this, SLOT(slotForward()),
+                    false, true);
+
+    d->accelerators->insert("Previous Image Key_Backspace", i18n("Previous Image"),
+                    i18n("Load Previous Image"),
+                    Key_Backspace, this, SLOT(slotBackward()),
+                    false, true);
+
+    d->accelerators->insert("Next Image Key_Next", i18n("Next Image"),
+                    i18n("Load Next Image"),
+                    Key_Next, this, SLOT(slotForward()),
+                    false, true);
+
+    d->accelerators->insert("Previous Image Key_Prior", i18n("Previous Image"),
+                    i18n("Load Previous Image"),
+                    Key_Prior, this, SLOT(slotBackward()),
+                    false, true);
+
     d->accelerators->insert("Zoom Plus Key_Plus", i18n("Zoom in"),
                     i18n("Zoom in on image"),
                     Key_Plus, d->previewView, SLOT(slotIncreaseZoom()),
@@ -530,7 +575,7 @@
             LightTableBarItem *item = new LightTableBarItem(d->barView, *it);
             if (*it == imageInfoCurrent)
             {
-                d->barView->setSelected(item);
+                d->barView->setSelectedItem(item);
             }
         }
     }   
@@ -580,12 +625,12 @@
 
 void LightTableWindow::slotLeftPanelLeftButtonClicked()
 {
-    d->barView->setSelected(d->barView->findItemByInfo(d->previewView->leftImageInfo()));
+    d->barView->setSelectedItem(d->barView->findItemByInfo(d->previewView->leftImageInfo()));
 }
 
 void LightTableWindow::slotRightPanelLeftButtonClicked()
 {
-    d->barView->setSelected(d->barView->findItemByInfo(d->previewView->rightImageInfo()));
+    d->barView->setSelectedItem(d->barView->findItemByInfo(d->previewView->rightImageInfo()));
 }
 
 void LightTableWindow::slotLeftPreviewLoaded(bool b)
@@ -1165,5 +1210,29 @@
     }
 }
 
+void LightTableWindow::slotBackward()
+{
+    ThumbBarItem* curr = d->barView->currentItem();
+    if (curr && curr->prev())
+        d->barView->setSelected(curr->prev());
+}
+
+void LightTableWindow::slotForward()
+{
+    ThumbBarItem* curr = d->barView->currentItem();
+    if (curr && curr->next())
+        d->barView->setSelected(curr->next());
+}
+
+void LightTableWindow::slotFirst()
+{
+    d->barView->setSelected( d->barView->firstItem() );
+}
+
+void LightTableWindow::slotLast()
+{
+    d->barView->setSelected( d->barView->lastItem() );
+}
+
 }  // namespace Digikam
 
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.h #663492:663493
@@ -85,6 +85,11 @@
 
 private slots:
 
+    void slotBackward();
+    void slotForward();
+    void slotFirst();
+    void slotLast();
+
     void slotSetItemLeft();
     void slotSetItemRight();
     void slotSetItemOnLeftPanel(ImageInfo*);
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindowui.rc #663492:663493
@@ -1,9 +1,14 @@
 <!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<gui version="12" name="lighttablewindow" >
+<gui version="13" name="lighttablewindow" >
 
 <MenuBar>
 
     <Menu name="File" ><text>&amp;File</text>
+        <Action name="lighttable_first" />
+        <Action name="lighttable_backward" />
+        <Action name="lighttable_forward" />
+        <Action name="lighttable_last" />
+        <Separator/>
         <Action name="lighttable_setitemleft" />
         <Action name="lighttable_setitemright" />
         <Action name="lighttable_edititem" />
@@ -49,6 +54,14 @@
 </MenuBar>
 
 <ToolBar name="ToolBar" ><text>Main Toolbar</text>
+     <Action name="lighttable_first" />
+     <Action name="lighttable_backward" />
+     <Action name="lighttable_forward" />
+     <Action name="lighttable_last" />
+     <Separator/>     
+     <Action name="lighttable_setitemleft" />
+     <Action name="lighttable_setitemright" />
+     <Separator/>     
      <Action name="lighttable_syncpreview" /> 
      <Action name="lighttable_zoomplus" /> 
      <Action name="lighttable_zoomminus" /> 
Comment 15 Arnd Baecker 2007-05-11 18:32:07 UTC
A very minor glitch: invoking the light-table  the first time
(or after emptying the light-table),
the "Forward" and "Last" buttons are not activated.


Another thing (which wasn't there in one of the earlier versions, I think):
- zoom in a bit
- ``un-synchronize'' the preview
-  move one of the panel to the correct place,
   such that in both panels the object
   of interest is centered
- then activate synchronization again
- zooming in/out or panning in one panel leads
  a jump in  the other.


Well, this is of course what synchronization says, but
I think it would be better if it behaves the following way:
- if synchronization is turned on again,
  the two panels keep the relative offset.

  Reason: if the object of interest (or view, or photographer)
  moved slightly from one shot to the next,  it is still possible 
  to compare the images.
- What todo about different zoom-levels:  
  if, in the unsynchronized situation the zoom is changed, switching
  synchronization on, leads to the smaller (or larger, does not
  really matter I think) zoom value  for both.

There is one technical problem with
keeping an offset, namely, what
should one do when during panning
the edge of one of the images is reached.
Presumably the simplest is to just
stop (in both panels) in this case.

P.S.: watching the progress of the light-table is
better than many movies - every `svn up` gives new features! ;-) 






Comment 16 caulier.gilles 2007-05-12 08:52:30 UTC
>A very minor glitch: invoking the light-table  the first time
>(or after emptying the light-table),
>the "Forward" and "Last" buttons are not activated.

No problem here. Checkout and try again.

Resynchronization of panels is fixed with commit #663723.

Gilles
Comment 17 caulier.gilles 2007-05-12 08:57:37 UTC
Arnd,

About the feature "going through pairs of images", What i can use in English words to describe this new option in View menu ? 

"Navigate by pair of items" is fine ?

Gilles
Comment 18 Arnd Baecker 2007-05-12 09:13:12 UTC
> "Navigate by pair of items" is fine ?


Hmm, that is a not so easy one - your suggestion seems fine to me.
Maybe "Navigate by pairs" would be ok as well?

Maybe someone else has an even better suggestion...

Best, Arnd
Comment 19 Marcel Wiesweg 2007-05-12 17:34:04 UTC
SVN commit 663883 by mwiesweg:

Adapt the line step of the scroll bars to the zoom factor.
For low zoom factors, scrolling with the mouse wheel is still precise,
for higher zoom rates the steps get bigger.
This means the approx. the same amount of mouse wheel scrolling is required
for to scroll the same span in the original picture, regardless of zoom rate.

For the overall relative speed, I added a factor of 2 which feels good, please report
if scrolling steps are too big or too small.

(bug 145237, #4)

CCBUG: 145237


 M  +6 -0      previewwidget.cpp  


--- trunk/extragear/graphics/digikam/libs/widgets/common/previewwidget.cpp #663882:663883
@@ -219,6 +219,12 @@
 
     updateContentsSize();
 
+    int step = QMAX(2, 2*lround(d->zoom));
+    horizontalScrollBar()->setLineStep( step );
+    horizontalScrollBar()->setPageStep( step * 10 );
+    verticalScrollBar()->setLineStep( step );
+    verticalScrollBar()->setPageStep( step * 10 );
+
     viewport()->setUpdatesEnabled(false);
     center((int)((cpx * d->tileSize ) / floor(d->tileSize / d->zoom)), 
            (int)((cpy * d->tileSize ) / floor(d->tileSize / d->zoom)));
Comment 20 caulier.gilles 2007-05-12 18:45:58 UTC
>For the overall relative speed, I added a factor of 2 which feels good, please >report
>if scrolling steps are too big or too small.

Thanks Marcel for this fix. it sound fine for me.

Gerhard, can you give us your viewpoint ?

Gilles
Comment 21 caulier.gilles 2007-05-12 18:50:22 UTC
Marcel, 

Like Image Editor Canvas and Image Preview are very similar, i suspect than canvas.cpp need to be patched in the same way. Right ?

To be honest, later 0.9.2, i will use ImagePreview class like parent of canvas to factorize implementation (:=)))

Gilles
Comment 22 Arnd Baecker 2007-05-12 20:50:33 UTC
> >A very minor glitch: invoking the light-table  the first time
> >(or after emptying the light-table),
> >the "Forward" and "Last" buttons are not activated.
>
> No problem here. Checkout and try again.


Still here. To really observe this: restart digikam,
mark a few images in the album view and then invoke
the light-table with F6 (it does not show up
once the light-table has been activated once during
a digikam session).
Then all the Forward/Last (and First/Back, as it should be for
the first item) are disabled.

> Resynchronization of panels is fixed with commit #663723.


Yes and no ;-)
Namely, you solved the jump on slider move/zoom,
so that it jumps when one presses CTRL-SHIFT-Y.
However,
"it would be better if it behaves the following way: "
[ ... see the text I wrote under #15 above ...]
What do you think about that?

A cosmetic issue:
when panning (either with the mouse or scrollbars),
the horizontal (sometimes also the vertical)
slider of the other panel reduces its length
for a very short time (leading to some flickering
of the slider).
A similar flickering also arise when using
the zoom slider (but then for both joined images).

Best, Arnd
Comment 23 caulier.gilles 2007-05-12 21:48:55 UTC
Arnd,

Navigate by Pair feature is now implemented in svn. Checkout and try it.

> >A very minor glitch: invoking the light-table  the first time
> >(or after emptying the light-table),
> >the "Forward" and "Last" buttons are not activated. 

ok, now i can reproduce. Something is not initialized properly. I will take a look.

Gilles
Comment 24 caulier.gilles 2007-05-13 18:22:06 UTC
> >A very minor glitch: invoking the light-table  the first time
> >(or after emptying the light-table),
> >the "Forward" and "Last" buttons are not activated. 

Fixed in svn

Gilles
Comment 25 Arnd Baecker 2007-05-13 19:26:24 UTC
Gilles, thanks a lot - all works very fine!

Only remaining: Points a) from #0 and #15 
(after: "it would be better if it behaves the following way: ").
This might need a separate discussion and input from other users - 
should I create a new B.K.O.?
(this one got pretty long for "small" wishes ... ;-)