#ifndef DOLPHINCOLUMNWIDGET_H
#define DOLPHINCOLUMNWIDGET_H
+#include <QFont>
#include <QListView>
+#include <QSize>
#include <QStyleOption>
#include <kurl.h>
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
* which contain the given filter string will be shown.
*/
void setNameFilter(const QString& nameFilter);
- virtual void setModel ( QAbstractItemModel * model );
protected:
virtual QStyleOptionViewItem viewOptions() const;
* 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();
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
};
return m_url;
}
-inline QStyleOptionViewItem DolphinColumnWidget::viewOptions() const
-{
- return m_viewOptions;
-}
-
#endif