[Digikam-devel] [Bug 145198] light-table should also work with the full image

Gilles Caulier caulier.gilles at gmail.com
Tue May 29 13:34:27 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=145198         
caulier.gilles gmail com changed:

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



------- Additional Comments From caulier.gilles gmail com  2007-05-29 14:34 -------
SVN commit 669446 by cgilles:

digikam from trunk : Light Table : new option to handle full size image in preview panel, instead a reduced size.
For performance reasons, this option is disable by default. Use it if you have a fast computer...
BUG: 145198


 M  +9 -9      project/project.kdevelop  
 M  +12 -1     utilities/lighttable/lighttablepreview.cpp  
 M  +2 -0      utilities/lighttable/lighttablepreview.h  
 M  +6 -0      utilities/lighttable/lighttableview.cpp  
 M  +2 -0      utilities/lighttable/lighttableview.h  
 M  +3 -2      utilities/lighttable/lighttablewindow.cpp  
 M  +10 -1     utilities/setup/setuplighttable.cpp  


--- trunk/extragear/graphics/digikam/project/project.kdevelop #669445:669446
 @ -12,7 +12,7  @
     </keywords>
     <projectdirectory>./</projectdirectory>
     <absoluteprojectpath>false</absoluteprojectpath>
-    <description></description>
+    <description/>
     <ignoreparts/>
     <projectname>digikam</projectname>
     <defaultencoding/>
 @ -74,11 +74,11  @
   <kdevdebugger>
     <general>
       <dbgshell>libtool</dbgshell>
-      <programargs></programargs>
-      <gdbpath></gdbpath>
-      <configGdbScript></configGdbScript>
-      <runShellScript></runShellScript>
-      <runGdbScript></runGdbScript>
+      <programargs/>
+      <gdbpath/>
+      <configGdbScript/>
+      <runShellScript/>
+      <runGdbScript/>
       <breakonloadinglibs>true</breakonloadinglibs>
       <separatetty>false</separatetty>
       <floatingtoolbar>false</floatingtoolbar>
 @ -113,8 +113,8  @
     <run>
       <directoryradio>build</directoryradio>
       <customdirectory>/</customdirectory>
-      <mainprogram>digikam/digikam/digikam</mainprogram>
-      <programargs></programargs>
+      <mainprogram>/home/gilles/Documents/devel/SVN/trunk/graphics/digikam/digikam/digikam</mainprogram>
+      <programargs/>
       <terminal>false</terminal>
       <autocompile>false</autocompile>
       <envvars/>
 @ -192,7 +192,7  @
       <includePaths>.;</includePaths>
     </codecompletion>
     <creategettersetter>
-      <prefixGet></prefixGet>
+      <prefixGet/>
       <prefixSet>set</prefixSet>
       <prefixVariable>m_,_</prefixVariable>
       <parameterName>theValue</parameterName>
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablepreview.cpp #669445:669446
 @ -89,6 +89,7  @
         hasNext              = false;
         selected             = false;
         dragAndDropEnabled   = true;
+        loadFullImageSize    = false;
         currentFitWindowZoom = 0;
         previewSize          = 1024;
     }
 @ -97,6 +98,7  @
     bool               hasNext;
     bool               selected;
     bool               dragAndDropEnabled;
+    bool               loadFullImageSize;
 
     int                previewSize;
 
 @ -171,6 +173,12  @
     delete d;
 }
 
+void LightTablePreview::setLoadFullImageSize(bool b)
+{
+    d->loadFullImageSize = b;
+    reload();
+}
+
 void LightTablePreview::setDragAndDropEnabled(bool b)
 {
     d->dragAndDropEnabled = b;
 @ -252,7 +260,10  @
                 this, SLOT(slotNextPreload()));
     }
 
-    d->previewThread->load(LoadingDescription(path, d->previewSize, AlbumSettings::instance()->getExifRotate()));
+    if (d->loadFullImageSize)
+        d->previewThread->loadHighQuality(LoadingDescription(path, 0, AlbumSettings::instance()->getExifRotate()));
+    else
+        d->previewThread->load(LoadingDescription(path, d->previewSize, AlbumSettings::instance()->getExifRotate()));
 }
 
 void LightTablePreview::slotGotImagePreview(const LoadingDescription &description, const DImg& preview)
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablepreview.h #669445:669446
 @ -55,6 +55,8  @
     LightTablePreview(QWidget *parent=0);
     ~LightTablePreview();
 
+    void setLoadFullImageSize(bool b);
+
     void setImage(const DImg& image);
     DImg& getImage() const;
 
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.cpp #669445:669446
 @ -142,6 +142,12  @
     delete d;
 }
 
+void LightTableView::setLoadFullImageSize(bool b)
+{
+    d->leftPreview->setLoadFullImageSize(b); 
+    d->rightPreview->setLoadFullImageSize(b); 
+}
+
 void LightTableView::setSyncPreview(bool sync)
 {
     d->syncPreview = sync;
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttableview.h #669445:669446
 @ -59,6 +59,8  @
     ImageInfo* leftImageInfo() const;
     ImageInfo* rightImageInfo() const;
 
+    void   setLoadFullImageSize(bool b);
+
     void   setLeftZoomFactor(double z);
     void   setRightZoomFactor(double z);
 
--- trunk/extragear/graphics/digikam/utilities/lighttable/lighttablewindow.cpp #669445:669446
 @ -150,9 +150,10  @
     KConfig* config = kapp->config();
     config->setGroup("LightTable Settings");
 
-    d->autoLoadOnRightPanel  = config->readBoolEntry("Auto Load Right Panel", true);
-    d->autoSyncPreview       = config->readBoolEntry("Auto Sync Preview", true);
+    d->autoLoadOnRightPanel  = config->readBoolEntry("Auto Load Right Panel",   true);
+    d->autoSyncPreview       = config->readBoolEntry("Auto Sync Preview",       true);
     d->fullScreenHideToolBar = config->readBoolEntry("FullScreen Hide ToolBar", false);
+    d->previewView->setLoadFullImageSize(config->readBoolEntry("Load Full Image size", false));
 }
 
 void LightTableWindow::closeEvent(QCloseEvent* e)
--- trunk/extragear/graphics/digikam/utilities/setup/setuplighttable.cpp #669445:669446
 @ -58,11 +58,13  @
         hideToolBar          = 0;
         autoSyncPreview      = 0;
         autoLoadOnRightPanel = 0;
+        loadFullImageSize    = 0;
     }
 
     QCheckBox *hideToolBar;
     QCheckBox *autoSyncPreview;
     QCheckBox *autoLoadOnRightPanel;
+    QCheckBox *loadFullImageSize;
 };
 
 SetupLightTable::SetupLightTable(QWidget* parent )
 @ -81,11 +83,16  @
                      "zooming and panning between left and right panels if the images have "
                      "the same size."));
 
-    d->autoLoadOnRightPanel = new QCheckBox(i18n("Selecting a thumbbar item loads the image to the right panel"),
+    d->autoLoadOnRightPanel = new QCheckBox(i18n("Selecting a thumbbar item loads image to the right panel"),
                                             interfaceOptionsGroup);
     QWhatsThis::add( d->autoLoadOnRightPanel, i18n("<p>Set this option to automatically load an image "
                      "into the right panel when the corresponding item is selected on the thumbbar."));
 
+    d->loadFullImageSize = new QCheckBox(i18n("Load full image size"), interfaceOptionsGroup);
+    QWhatsThis::add( d->loadFullImageSize, i18n("<p>Set this option to load full image size "
+                     "in preview panel instead a reduced one. Because this option will take more time "
+                     "to load image, use it only if you have a fast computer."));
+
     d->hideToolBar = new QCheckBox(i18n("H&ide toolbar in fullscreen mode"), interfaceOptionsGroup);
 
     // --------------------------------------------------------
 @ -112,6 +119,7  @
     d->hideToolBar->setChecked(config->readBoolEntry("FullScreen Hide ToolBar", false));
     d->autoSyncPreview->setChecked(config->readBoolEntry("Auto Sync Preview", true));
     d->autoLoadOnRightPanel->setChecked(config->readBoolEntry("Auto Load Right Panel", true));
+    d->loadFullImageSize->setChecked(config->readBoolEntry("Load Full Image size", false));
 }
 
 void SetupLightTable::applySettings()
 @ -121,6 +129,7  @
     config->writeEntry("FullScreen Hide ToolBar", d->hideToolBar->isChecked());
     config->writeEntry("Auto Sync Preview", d->autoSyncPreview->isChecked());
     config->writeEntry("Auto Load Right Panel", d->autoLoadOnRightPanel->isChecked());
+    config->writeEntry("Load Full Image size", d->loadFullImageSize->isChecked());
     config->sync();
 }



More information about the Digikam-devel mailing list