From 585bb5994010c6bf64f7bb29ba4df903acc44a3e Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 9 Oct 2010 11:29:45 +0000 Subject: Use DolphinTreeView as implementation for the columns instead of QListView. This assures a consistent hover- and selection-behavior with the icons-view and details-view. BUG: 242357 BUG: 243779 svn path=/trunk/KDE/kdebase/apps/; revision=1184177 --- src/views/dolphincolumnview.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/views/dolphincolumnview.h') diff --git a/src/views/dolphincolumnview.h b/src/views/dolphincolumnview.h index 64feac4f9..4f439fc99 100644 --- a/src/views/dolphincolumnview.h +++ b/src/views/dolphincolumnview.h @@ -21,9 +21,9 @@ #define DOLPHINCOLUMNVIEW_H #include "dolphinview.h" +#include "dolphintreeview.h" #include -#include #include #include @@ -40,7 +40,7 @@ class ViewExtensionsFactory; /** * Represents one column inside the DolphinColumnViewContainer. */ -class DolphinColumnView : public QListView +class DolphinColumnView : public DolphinTreeView { Q_OBJECT @@ -88,9 +88,9 @@ public: protected: virtual QStyleOptionViewItem viewOptions() const; + virtual bool event(QEvent* event); virtual void startDrag(Qt::DropActions supportedActions); virtual void dragEnterEvent(QDragEnterEvent* event); - virtual void dragLeaveEvent(QDragLeaveEvent* event); virtual void dragMoveEvent(QDragMoveEvent* event); virtual void dropEvent(QDropEvent* event); virtual void paintEvent(QPaintEvent* event); @@ -100,6 +100,8 @@ protected: virtual void wheelEvent(QWheelEvent* event); virtual void leaveEvent(QEvent* event); virtual void currentChanged(const QModelIndex& current, const QModelIndex& previous); + virtual QRect visualRect(const QModelIndex& index) const; + virtual bool acceptsDrop(const QModelIndex& index) const; private slots: void setZoomLevel(int level); @@ -134,8 +136,6 @@ private: DolphinModel* m_dolphinModel; DolphinSortFilterProxyModel* m_proxyModel; - QRect m_dropRect; - friend class DolphinColumnViewContainer; }; -- cgit v1.3.1