From 1ab719d490d467218d65f2b03b3ec0ec717515b5 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Tue, 11 Dec 2007 19:19:44 +0000 Subject: fixed issue that turning off the preview during the preview job still was active did not work as expected TODO for 4.1: provide a preview helper class which can be shared between DolphinView and the special use case of DolphinColumnViewWidget BUG: 153816 svn path=/trunk/KDE/kdebase/apps/; revision=747348 --- src/dolphincolumnwidget.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/dolphincolumnwidget.h') diff --git a/src/dolphincolumnwidget.h b/src/dolphincolumnwidget.h index 5cb7e1168..870246269 100644 --- a/src/dolphincolumnwidget.h +++ b/src/dolphincolumnwidget.h @@ -31,9 +31,14 @@ class DolphinColumnView; class DolphinModel; class DolphinSortFilterProxyModel; class KDirLister; +class KJob; class KFileItem; class KFileItemList; class QPixmap; +namespace KIO +{ + class PreviewJob; +} /** * Represents one column inside the DolphinColumnView and has been @@ -124,10 +129,16 @@ private slots: * Replaces the icon of the item \a item by the preview pixmap * \a pixmap. */ - void showPreview(const KFileItem& item, const QPixmap& pixmap); + void replaceIcon(const KFileItem& item, const QPixmap& pixmap); void slotEntered(const QModelIndex& index); + /** + * Is invoked when the preview job has been finished and + * set m_previewJob to 0. + */ + void slotPreviewJobFinished(KJob* job); + private: /** Used by DolphinColumnWidget::setActive(). */ void activate(); @@ -157,6 +168,8 @@ private: DolphinModel* m_dolphinModel; DolphinSortFilterProxyModel* m_proxyModel; + KIO::PreviewJob* m_previewJob; + bool m_dragging; // TODO: remove this property when the issue #160611 is solved in Qt 4.4 QRect m_dropRect; // TODO: remove this property when the issue #160611 is solved in Qt 4.4 }; -- cgit v1.3