From 6baba131b2e112c37015412b701bc3ea01a86c04 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 17 Mar 2007 20:42:26 +0000 Subject: Allow to cut, copy, paste, ... the currently selected item from a sidebar by the DolphinContextMenu (currently only used by the tree view). svn path=/trunk/KDE/kdebase/apps/; revision=643572 --- src/dolphincontextmenu.h | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/dolphincontextmenu.h') diff --git a/src/dolphincontextmenu.h b/src/dolphincontextmenu.h index 09288c602..2a678d9a2 100644 --- a/src/dolphincontextmenu.h +++ b/src/dolphincontextmenu.h @@ -25,6 +25,7 @@ #include #include +#include #include #include @@ -45,8 +46,10 @@ class DolphinMainWindow; * - 'Actions': Contains all actions which can be applied to the * given item. */ -class DolphinContextMenu +class DolphinContextMenu : public QObject { + Q_OBJECT + public: enum ViewType { @@ -74,6 +77,28 @@ public: /** Opens the context menu modal. */ void open(); +private slots: + /** Cuts the item m_fileInfo. */ + void cut(); + + /** Copies the item m_fileInfo. */ + void copy(); + + /** Paste the clipboard to m_fileInfo. */ + void paste(); + + /** Renames the item m_fileInfo. */ + void rename(); + + /** Moves the item m_fileInfo to the trash. */ + void moveToTrash(); + + /** Deletes the item m_fileInfo. */ + void deleteItem(); + + /** Shows the properties of the item m_fileInfo. */ + void showProperties(); + private: void openTrashContextMenu(); void openTrashItemContextMenu(); -- cgit v1.3