From f8302197daca5667aa3d4963528ce09e344eb27f Mon Sep 17 00:00:00 2001 From: David Faure Date: Thu, 15 Nov 2007 20:04:05 +0000 Subject: Implement cut/copy/paste in dolphinpart. Had to move more code to DolphinView, to use it from the part. svn path=/trunk/KDE/kdebase/apps/; revision=737203 --- src/dolphinview.h | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'src/dolphinview.h') diff --git a/src/dolphinview.h b/src/dolphinview.h index ff72bbaa7..c20ea10d2 100644 --- a/src/dolphinview.h +++ b/src/dolphinview.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -343,6 +344,13 @@ public: */ QString currentViewModeActionName() const; + /** + * Returns the state of the paste action: + * first is whether the action should be enabled + * second is the text for the action + */ + QPair pasteInfo() const; + public slots: /** * Changes the directory to \a url. If the current directory is equal to @@ -364,6 +372,18 @@ public slots: */ void renameSelectedItems(); + /** + * Copies all selected items to the clipboard and marks + * the items as cutted. + */ + void cutSelectedItems(); + + /** Copies all selected items to the clipboard. */ + void copySelectedItems(); + + /** Pastes the clipboard data to this view. */ + void paste(); + signals: /** * Is emitted if the view has been activated by e. g. a mouse click. @@ -452,10 +472,10 @@ signals: void startedPathLoading(const KUrl& url); /** - * Is emitted when renaming one or more items. + * Is emitted when renaming, copying, moving, linking etc. * Used for feedback in the mainwindow. */ - void renaming(); + void doingOperation(KonqFileUndoManager::CommandType type); protected: /** @see QWidget::mouseReleaseEvent */ -- cgit v1.3