diff options
| author | Peter Penz <[email protected]> | 2007-01-25 22:28:04 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-01-25 22:28:04 +0000 |
| commit | d52282f8a2a727ad332d4cceeeaa6b79af9267c1 (patch) | |
| tree | fa463a23ee07e8b23487045b37fe56c2f80a11dc /src/dolphindetailsview.h | |
| parent | 5e22e4efbae47541b5fb712de149ad4653500f83 (diff) | |
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
Diffstat (limited to 'src/dolphindetailsview.h')
| -rw-r--r-- | src/dolphindetailsview.h | 15 |
1 files changed, 13 insertions, 2 deletions
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 |
