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

List:       kde-commits
Subject:    extragear/graphics/digikam/utilities/queuemanager
From:       Gilles Caulier <caulier.gilles () gmail ! com>
Date:       2010-09-14 9:05:21
Message-ID: 20100914090521.36E93AC871 () svn ! kde ! org
[Download RAW message or body]

SVN commit 1175113 by cgilles:

update thumbnails in Queue list view if images are changed on disk


 M  +5 -0      queuelist.cpp  
 M  +2 -0      queuelist.h  
 M  +0 -11     queuemgrwindow.cpp  
 M  +0 -2      queuemgrwindow.h  
 M  +16 -2     queuepool.cpp  
 M  +1 -0      queuepool.h  


--- trunk/extragear/graphics/digikam/utilities/queuemanager/queuelist.cpp #1175112:1175113
@@ -947,4 +947,9 @@
     }
 }
 
+void QueueListView::reloadThumbs(const KUrl& url)
+{
+    d->thumbLoadThread->find(url.toLocalFile());
+}
+
 }  // namespace Digikam
--- trunk/extragear/graphics/digikam/utilities/queuemanager/queuelist.h #1175112:1175113
@@ -115,6 +115,8 @@
 
     void setEnableToolTips(bool val);
 
+    void reloadThumbs(const KUrl& url);
+
 Q_SIGNALS:
 
     void signalQueueContentsChanged();
--- trunk/extragear/graphics/digikam/utilities/queuemanager/queuemgrwindow.cpp #1175112:1175113
@@ -85,7 +85,6 @@
 #include "dmetadata.h"
 #include "albumsettings.h"
 #include "albummanager.h"
-#include "loadingcacheinterface.h"
 #include "imagewindow.h"
 #include "imagedialog.h"
 #include "thumbnailsize.h"
@@ -340,11 +339,6 @@
 
     connect(d->toolsView, SIGNAL(signalHistoryEntryClicked(int, qlonglong)),
             this, SLOT(slotHistoryEntryClicked(int, qlonglong)));
-
-    // -- FileWatch connections ------------------------------
-
-    LoadingCacheInterface::connectToSignalFileChanged(this,
-            SLOT(slotFileChanged(const QString &)));
 }
 
 void QueueMgrWindow::setupActions()
@@ -471,11 +465,6 @@
     d->showMenuBarAction->setChecked(!menuBar()->isHidden());  // NOTE: workaround for B.K.O #171080
 }
 
-void QueueMgrWindow::slotFileChanged(const QString& /*filePath*/)
-{
-    // TODO
-}
-
 void QueueMgrWindow::refreshView()
 {
     // NOTE: method called when something is changed from Database (tags, rating, etc...).
--- trunk/extragear/graphics/digikam/utilities/queuemanager/queuemgrwindow.h #1175112:1175113
@@ -85,12 +85,10 @@
     void moveEvent(QMoveEvent* e);
     bool event(QEvent* e);
 
-
 public Q_SLOTS:
 
     void slotRun();
     void slotStop();
-    void slotFileChanged(const QString&);
 
 private:
 
--- trunk/extragear/graphics/digikam/utilities/queuemanager/queuepool.cpp #1175112:1175113
@@ -39,6 +39,7 @@
 
 #include "ddragobjects.h"
 #include "queuelist.h"
+#include "loadingcacheinterface.h"
 
 namespace Digikam
 {
@@ -62,6 +63,11 @@
 
     connect(this, SIGNAL(testCanDecode(const QDragMoveEvent*, bool&)),
             this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&)));
+
+    // -- FileWatch connections ------------------------------
+
+    LoadingCacheInterface::connectToSignalFileChanged(this,
+            SLOT(slotFileChanged(const QString&)));
 }
 
 QueuePool::~QueuePool()
@@ -70,7 +76,6 @@
 
 void QueuePool::keyPressEvent(QKeyEvent* event)
 {
-
     if (event->key() == Qt::Key_Delete)
     {
         slotRemoveSelectedItems();
@@ -79,7 +84,6 @@
     {
         KTabWidget::keyPressEvent(event);
     }
-
 }
 
 void QueuePool::setBusy(bool b)
@@ -334,4 +338,14 @@
     return true;
 }
 
+void QueuePool::slotFileChanged(const QString& filePath)
+{
+    for (int i = 0; i < count(); ++i)
+    {
+        QueueListView* queue = dynamic_cast<QueueListView*>(widget(i));
+        if (queue)
+            queue->reloadThumbs(KUrl::fromPath(filePath));
+    }
+}
+
 }  // namespace Digikam
--- trunk/extragear/graphics/digikam/utilities/queuemanager/queuepool.h #1175112:1175113
@@ -100,6 +100,7 @@
 
 private Q_SLOTS:
 
+    void slotFileChanged(const QString&);
     void slotQueueSelected(int);
     void slotCloseQueueRequest(QWidget*);
     void slotTestCanDecode(const QDragMoveEvent*, bool&);
[prev in list] [next in list] [prev in thread] [next in thread] 

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