┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/dolphinview.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2011-10-08 21:40:34 +0200
committerPeter Penz <[email protected]>2011-10-08 21:43:55 +0200
commit6551c000fc68134932cdc21f2cc7086b34bff30b (patch)
treef4892d247c13f988ee68de37ea1700aaf6e80ab2 /src/views/dolphinview.h
parentb1b5a6db2e8b9b1fc175d068ba393925d95c9dc6 (diff)
Context menu cleanups
- Open the context menu on the mouse-press event, not on the mouse-release event. - Provide an explicit position-information and don't use QCursor::pos(). This fixes the issue that opening a context-menu by the keyboard opens below the cursor. - Provide different signals in the KItemListController for the different context-menu types (item vs. view vs. header). - Implement turning on/off roles by the header-context-menu.
Diffstat (limited to 'src/views/dolphinview.h')
-rw-r--r--src/views/dolphinview.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/src/views/dolphinview.h b/src/views/dolphinview.h
index da74011a7..6ebd91c53 100644
--- a/src/views/dolphinview.h
+++ b/src/views/dolphinview.h
@@ -488,7 +488,8 @@ signals:
* for the URL should be shown and the custom actions \a customActions
* will be added.
*/
- void requestContextMenu(const KFileItem& item,
+ void requestContextMenu(const QPoint& pos,
+ const KFileItem& item,
const KUrl& url,
const QList<QAction*>& customActions);
@@ -551,8 +552,6 @@ signals:
protected:
virtual void mouseReleaseEvent(QMouseEvent* event);
- virtual void contextMenuEvent(QContextMenuEvent* event);
- virtual void wheelEvent(QWheelEvent* event);
private slots:
/**
@@ -563,7 +562,9 @@ private slots:
void slotItemActivated(int index);
void slotItemMiddleClicked(int index);
- void slotContextMenuRequested(int index, const QPointF& pos);
+ void slotItemContextMenuRequested(int index, const QPointF& pos);
+ void slotViewContextMenuRequested(const QPointF& pos);
+ void slotHeaderContextMenuRequested(const QPointF& pos);
void slotItemExpansionToggleClicked(int index);
void slotItemHovered(int index);
void slotItemUnhovered(int index);
@@ -586,13 +587,6 @@ private slots:
void emitSelectionChangedSignal();
/**
- * Opens the context menu on position \a pos. The position
- * is used to check whether the context menu is related to an
- * item or to the viewport.
- */
- void openContextMenu(const QPoint& pos, const QList<QAction*>& customActions);
-
- /**
* Drops dragged URLs to the destination path \a destPath. If
* the URLs are dropped above an item inside the destination path,
* the item is indicated by \a destItem.