diff options
| author | Peter Penz <[email protected]> | 2007-02-18 17:01:36 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-02-18 17:01:36 +0000 |
| commit | abf17941f7a052d25788d2f2f3c84e5aae935e29 (patch) | |
| tree | 4f89cd4d58b0b6033cc91f2eb14c02291f8c3a1c /src/dolphinmainwindow.h | |
| parent | fd43139134da394e413c5d7d5518275379e67798 (diff) | |
Dolphin is now a KUniqueApplication. A lot of thanks go to Oscar Blumberg, who submitted this patch.
svn path=/trunk/KDE/kdebase/apps/; revision=634862
Diffstat (limited to 'src/dolphinmainwindow.h')
| -rw-r--r-- | src/dolphinmainwindow.h | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index 4cfe31077..7a71b685c 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -47,13 +47,14 @@ class DolphinApplication; * @short Main window for Dolphin. * * Handles the menus, toolbars and Dolphin views. - * - * @author Peter Penz <[email protected]> -*/ + */ class DolphinMainWindow: public KMainWindow { Q_OBJECT + Q_CLASSINFO("D-Bus Interface", "org.kde.dolphin.MainWindow") + Q_PROPERTY(int id READ getId SCRIPTABLE true) friend class DolphinApplication; + public: virtual ~DolphinMainWindow(); @@ -97,6 +98,20 @@ public: */ KNewMenu* newMenu() const { return m_newMenu; } +public slots: + /** + * Returns the main windows ID, mainly used throught DBus. + */ + int getId() const { return m_id; } + + /** + * Changes the URL of the current active DolphinView to \a url. + */ + void changeUrl(const QString& url); + + /** Stores all settings and quits Dolphin. */ + void quit(); + signals: /** * Is send if the active view has been changed in @@ -147,9 +162,6 @@ private slots: */ void properties(); - /** Stores all settings and quits Dolphin. */ - void quit(); - /** * Shows the error information of the job \a job * in the status bar. @@ -338,7 +350,7 @@ private slots: void openNewMainWindow(); private: - DolphinMainWindow(); + DolphinMainWindow(int id); void init(); void loadSettings(); @@ -392,6 +404,7 @@ private: KNewMenu* m_newMenu; QSplitter* m_splitter; DolphinView* m_activeView; + int m_id; DolphinView* m_view[SecondaryIdx + 1]; |
