diff options
| author | Holger Freyther <[email protected]> | 2006-11-29 00:02:19 +0000 |
|---|---|---|
| committer | Holger Freyther <[email protected]> | 2006-11-29 00:02:19 +0000 |
| commit | f31a541925033c2ef5e27b85c099d47791b50121 (patch) | |
| tree | 11cc728aa7d247ca5b075776c438be0f381be765 /src/undomanager.h | |
| parent | 68e81f7280c810e26cabf6cd2897b9dc8466f458 (diff) | |
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
Diffstat (limited to 'src/undomanager.h')
| -rw-r--r-- | src/undomanager.h | 6 |
1 files changed, 5 insertions, 1 deletions
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 <qobject.h> +#include <QPointer> #include <q3valuelist.h> #include <kurl.h> #include <kio/jobclasses.h> 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<DolphinMainWindow> m_mainWindow; friend class UndoManager; // allow to modify m_macroIndex }; |
