]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphincolumnwidget.h
SVN_SILENT made messages (.desktop file)
[dolphin.git] / src / dolphincolumnwidget.h
index 14b4c875179812d40fa532b6b406a338951fcca4..87024626942b034fe637e0831c50b28f586ca884 100644 (file)
@@ -20,7 +20,9 @@
 #ifndef DOLPHINCOLUMNWIDGET_H
 #define DOLPHINCOLUMNWIDGET_H
 
+#include <QFont>
 #include <QListView>
+#include <QSize>
 #include <QStyleOption>
 
 #include <kurl.h>
@@ -29,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
@@ -89,7 +96,6 @@ public:
      * which contain the given filter string will be shown.
      */
     void setNameFilter(const QString& nameFilter);
-    virtual void setModel ( QAbstractItemModel * model );
 
 protected:
     virtual QStyleOptionViewItem viewOptions() const;
@@ -123,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();
@@ -148,11 +160,16 @@ private:
     DolphinColumnView* m_view;
     KUrl m_url;      // URL of the directory that is shown
     KUrl m_childUrl; // URL of the next column that is shown
-    QStyleOptionViewItem m_viewOptions;
+
+    QFont m_font;
+    QSize m_decorationSize;
+
     KDirLister* m_dirLister;
     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
 };
@@ -185,9 +202,4 @@ inline const KUrl& DolphinColumnWidget::url() const
     return m_url;
 }
 
-inline QStyleOptionViewItem DolphinColumnWidget::viewOptions() const
-{
-    return m_viewOptions;
-}
-
 #endif