diff options
| author | Peter Penz <[email protected]> | 2008-06-18 19:34:03 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2008-06-18 19:34:03 +0000 |
| commit | b8a4e0fac2820ec8fc442c2abeea700ae4947e01 (patch) | |
| tree | 22d132204de327656614ee2dfe97834218eef776 /src/dolphincolumnview.h | |
| parent | 91607d4c4d60d7d51827e770e5504aa4ff552e48 (diff) | |
Assure that when requesting the context menu for the column-view, that the correct items are used.
TODO for 4.2: get rid of those 'if (isColumnViewActive())' special cases and provide a generic model which also works with the way the column view is implemented
BUG: 164146
svn path=/trunk/KDE/kdebase/apps/; revision=821903
Diffstat (limited to 'src/dolphincolumnview.h')
| -rw-r--r-- | src/dolphincolumnview.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/dolphincolumnview.h b/src/dolphincolumnview.h index 2ab4d2d5d..62569a082 100644 --- a/src/dolphincolumnview.h +++ b/src/dolphincolumnview.h @@ -50,8 +50,19 @@ public: explicit DolphinColumnView(QWidget* parent, DolphinController* controller); virtual ~DolphinColumnView(); + /** @see QAbstractItemView::indexAt() */ virtual QModelIndex indexAt(const QPoint& point) const; + + /** + * Returns the item on the position \a pos. The KFileItem instance + * is null if no item is below the position. + */ + KFileItem itemAt(const QPoint& point) const; + + /** @see QAbstractItemView::scrollTo() */ virtual void scrollTo(const QModelIndex& index, ScrollHint hint = EnsureVisible); + + /** @see QAbstractItemView::visualRect() */ virtual QRect visualRect(const QModelIndex& index) const; /** Inverts the selection of the currently active column. */ @@ -97,6 +108,11 @@ public: */ void editItem(const KFileItem& item); + /** + * Returns the selected items of the active column. + */ + KFileItemList selectedItems() const; + public slots: /** @see QAbstractItemView::selectAll() */ virtual void selectAll(); @@ -175,6 +191,12 @@ private: /** Removes all columns except of the root column. */ void removeAllColumns(); + /** + * Returns the position of the point \a point relative to the column + * \a column. + */ + QPoint columnPosition(DolphinColumnWidget* column, const QPoint& point) const; + private: DolphinController* m_controller; bool m_active; |
