From 2f47863c68bb0ac0417eed76f713ced651a4908a Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 11 Feb 2009 20:45:12 +0000 Subject: - allow the view implementations to attach custom actions to the context menu - let the "details view" show the "[x] Expandable Folders" action in the context menu CCMAIL: faure@kde.org svn path=/trunk/KDE/kdebase/apps/; revision=924867 --- src/dolphincontroller.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'src/dolphincontroller.h') diff --git a/src/dolphincontroller.h b/src/dolphincontroller.h index eb5ef9ce7..29dd7dfb1 100644 --- a/src/dolphincontroller.h +++ b/src/dolphincontroller.h @@ -121,9 +121,11 @@ public: * should be invoked by the view implementation when a context * menu should be opened. The abstract Dolphin view itself * takes care itself to get the selected items depending from - * \a pos. + * \a pos. It is possible to define a custom list of actions for + * the context menu by \a customActions. */ - void triggerContextMenuRequest(const QPoint& pos); + void triggerContextMenuRequest(const QPoint& pos, + const QList& customActions = QList()); /** * Requests an activation of the view and emits the signal @@ -272,12 +274,14 @@ signals: /** * Is emitted if a context menu should be opened (see triggerContextMenuRequest()). * The abstract Dolphin view connects to this signal and will open the context menu. - * @param pos Position relative to the view widget where the - * context menu should be opened. It is recommended - * to get the corresponding model index from - * this position. - */ - void requestContextMenu(const QPoint& pos); + * @param pos Position relative to the view widget where the + * context menu should be opened. It is recommended + * to get the corresponding model index from + * this position. + * @param customActions List of actions that is added to the context menu when + * the menu is opened above the viewport. + */ + void requestContextMenu(const QPoint& pos, QList customActions); /** * Is emitted if the view has been activated by e. g. a mouse click. -- cgit v1.3.1