┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphinpart.h
diff options
context:
space:
mode:
authorDavid Faure <[email protected]>2007-11-15 20:04:05 +0000
committerDavid Faure <[email protected]>2007-11-15 20:04:05 +0000
commitf8302197daca5667aa3d4963528ce09e344eb27f (patch)
tree1b274b695dd4f1520efcb82651e877e42916c554 /src/dolphinpart.h
parent247f37a58081e4debaf21a3994848971d8203be3 (diff)
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
Diffstat (limited to 'src/dolphinpart.h')
-rw-r--r--src/dolphinpart.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/dolphinpart.h b/src/dolphinpart.h
index bf81b55f4..114c21d31 100644
--- a/src/dolphinpart.h
+++ b/src/dolphinpart.h
@@ -21,6 +21,7 @@
#define DOLPHINPART_H
#include <kparts/part.h>
+#include <kparts/browserextension.h>
class KFileItemList;
class KFileItem;
class DolphinPartBrowserExtension;
@@ -50,6 +51,8 @@ public:
/// see the supportsUndo property
bool supportsUndo() const { return true; }
+ DolphinView* view() { return m_view; }
+
protected:
/**
* We reimplement openUrl so no need to implement openFile.
@@ -99,6 +102,12 @@ private Q_SLOTS:
*/
void updateViewActions();
+ /**
+ * Updates the text of the paste action dependent from
+ * the number of items which are in the clipboard.
+ */
+ void updatePasteAction();
+
private:
void createActions();
@@ -111,4 +120,20 @@ private:
Q_DISABLE_COPY(DolphinPart)
};
+class DolphinPartBrowserExtension : public KParts::BrowserExtension
+{
+ Q_OBJECT
+public:
+ DolphinPartBrowserExtension( DolphinPart* part )
+ : KParts::BrowserExtension( part ), m_part(part) {}
+
+public Q_SLOTS:
+ void cut();
+ void copy();
+ void paste();
+
+private:
+ DolphinPart* m_part;
+};
+
#endif /* DOLPHINPART_H */