From f31a541925033c2ef5e27b85c099d47791b50121 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 29 Nov 2006 00:02:19 +0000 Subject: Make it (almost) possible to have more than one Dolphin KMainWindow Create a DolphinApplication, holding DolphinMainWindows and update the code to use the DolphinView to get the MainWindow, or get a ptr to the MainWindow directly. Or if all windows are effected go through the DolphinApplication to update every mainwindow. The UndowManager and ProgressIndicator have a rather strange relationship and will need some more attention but as UndoManager will be killed anyway I have skipped this. More cleanup, debugging and thinking is needed. svn path=/trunk/playground/utils/dolphin/; revision=608945 --- src/undomanager.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/undomanager.h') diff --git a/src/undomanager.h b/src/undomanager.h index ac2c2bb37..bf9a80c90 100644 --- a/src/undomanager.h +++ b/src/undomanager.h @@ -22,11 +22,13 @@ #define UNDOMANAGER_H #include +#include #include #include #include class ProgressIndicator; +class DolphinMainWindow; /** * @short Represents a file manager command which can be undone and redone. @@ -54,7 +56,7 @@ public: }; DolphinCommand(); - DolphinCommand(Type type, const KUrl::List& source, const KUrl& dest); + DolphinCommand(Type type, const KUrl::List& source, const KUrl& dest, DolphinMainWindow* mainWindow); ~DolphinCommand(); // non-virtual DolphinCommand& operator = (const DolphinCommand& command); @@ -62,12 +64,14 @@ public: void setSource(const KUrl::List source) { m_source = source; } const KUrl::List& source() const { return m_source; } const KUrl& destination() const { return m_dest; } + DolphinMainWindow* mainWindow() const { return m_mainWindow; } private: Type m_type; int m_macroIndex; KUrl::List m_source; KUrl m_dest; + QPointer m_mainWindow; friend class UndoManager; // allow to modify m_macroIndex }; -- cgit v1.3.1