[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    playground/graphics/darkroom/src
From:       Cyrille Berger <cyb () lepi ! org>
Date:       2008-08-22 7:00:19
Message-ID: 1219388419.571166.13471.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 850718 by berger:

delay the update of the preview

 M  +7 -1      Darkroom.cpp  


--- trunk/playground/graphics/darkroom/src/Darkroom.cpp #850717:850718
@@ -23,6 +23,7 @@
 #include <QDockWidget>
 #include <QProgressBar>
 #include <QTimeLine>
+#include <QTimer>
 
 #include <KAction>
 #include <KActionCollection>
@@ -81,6 +82,7 @@
   Ui::NoiseReductionOptions noiseReductionOptions;
   Ui::QualityOptions qualityOptions;
   KCurve* lightnessCurveWidget;
+  QTimer delayedPreviewUpdate;
 #ifdef HAVE_OPENCTL
   KCurve* redCurveWidget;
   KCurve* greenCurveWidget;
@@ -109,6 +111,10 @@
     KGlobal::mainComponent().dirs()->addResourceType("icc_profiles", 0, "share/color/icc/");
  
     d->view = new DarkroomView(this);
+    connect(&d->delayedPreviewUpdate, SIGNAL(timeout()), d->view, SLOT(updatePreview()));
+    d->delayedPreviewUpdate.setSingleShot( true );
+    d->delayedPreviewUpdate.setInterval(1000);
+        
     d->currentRawFile = 0;
     
     // accept dnd
@@ -709,7 +715,7 @@
   if( d->currentRawFile )
   {
     d->currentRawFile->setProcessingOptions( processingOptions() );
-    d->view->updatePreview();
+    d->delayedPreviewUpdate.start();
   }
 }
 
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic