From d52282f8a2a727ad332d4cceeeaa6b79af9267c1 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Thu, 25 Jan 2007 22:28:04 +0000 Subject: First step for making the details view usable again: - accept drops - Automatically resize the columns in a way that the whole available width is used by stretching the width of the 'Name' column. Qt4's QTreeView really rocks, only a few lines of code had been necessary to get this behavior :-) svn path=/trunk/playground/utils/dolphin/; revision=627189 --- src/dolphindetailsview.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/dolphindetailsview.h') diff --git a/src/dolphindetailsview.h b/src/dolphindetailsview.h index 16a0811fc..b438b3a33 100644 --- a/src/dolphindetailsview.h +++ b/src/dolphindetailsview.h @@ -27,9 +27,9 @@ class DolphinView; /** * @brief Represents the details view which shows the name, size, - * date, permissions, owner and group of an item. + * date, permissions, owner and group of an item. * - * The width of the columns are automatically adjusted in a way + * The width of the columns is automatically adjusted in a way * that full available width of the view is used by stretching the width * of the name column. */ @@ -40,6 +40,17 @@ class DolphinDetailsView : public QTreeView public: explicit DolphinDetailsView(DolphinView* parent); virtual ~DolphinDetailsView(); + +protected: + virtual bool event(QEvent* event); + virtual QStyleOptionViewItem viewOptions() const; + virtual void contextMenuEvent(QContextMenuEvent* event); + virtual void mouseReleaseEvent(QMouseEvent* event); + virtual void dragEnterEvent(QDragEnterEvent* event); + virtual void dropEvent(QDropEvent* event); + +private: + DolphinView* m_parentView; }; #endif -- cgit v1.3