diff options
| author | Peter Penz <[email protected]> | 2007-03-25 06:44:28 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-03-25 06:44:28 +0000 |
| commit | 8f9baef848c3056cd1df772f0774decad509cff3 (patch) | |
| tree | adcad2dcf4d15e0102d0c466b4d4a38ccd4ff875 /src/dolphinmainwindow.h | |
| parent | 3b4d05893b4023338d8484dc5c6812bbe0fb0ceb (diff) | |
Patch by Luca Gugelmann: get rid of any mainwindow dependency from the sidebars.
svn path=/trunk/KDE/kdebase/apps/; revision=646256
Diffstat (limited to 'src/dolphinmainwindow.h')
| -rw-r--r-- | src/dolphinmainwindow.h | 63 |
1 files changed, 38 insertions, 25 deletions
diff --git a/src/dolphinmainwindow.h b/src/dolphinmainwindow.h index d481a9e31..d8c64da7c 100644 --- a/src/dolphinmainwindow.h +++ b/src/dolphinmainwindow.h @@ -23,6 +23,7 @@ #define DOLPHIN_MAINWINDOW_H #include "dolphinview.h" +#include "sidebarpage.h" #include <kmainwindow.h> #include <ksortablelist.h> @@ -64,20 +65,6 @@ public: */ DolphinView* activeView() const { return m_activeView; } - /** - * Handles the dropping of URLs to the given - * destination. A context menu with the options - * 'Move Here', 'Copy Here', 'Link Here' and - * 'Cancel' is offered to the user. - * @param urls List of URLs which have been - * dropped. - * @param destination Destination URL, where the - * list or URLs should be moved, - * copied or linked to. - */ - void dropUrls(const KUrl::List& urls, - const KUrl& destination); - /** Renames the item represented by \a oldUrl to \a newUrl. */ void rename(const KUrl& oldUrl, const KUrl& newUrl); @@ -95,14 +82,35 @@ public: public slots: /** + * Handles the dropping of URLs to the given + * destination. A context menu with the options + * 'Move Here', 'Copy Here', 'Link Here' and + * 'Cancel' is offered to the user. + * @param urls List of URLs which have been + * dropped. + * @param destination Destination URL, where the + * list or URLs should be moved, + * copied or linked to. + */ + void dropUrls(const KUrl::List& urls, + const KUrl& destination); + + /** * Returns the main window ID used through DBus. */ int getId() const { return m_id; } /** - * Changes the URL of the current active DolphinView to \a url. + * Inform all affected dolphin components (sidebars, views) of an URL + * change. + */ + void changeUrl(const KUrl& url); + + /** + * Inform all affected dolphin components that a selection change is + * requested. */ - void changeUrl(const QString& url); + void changeSelection(const KFileItemList& selection); /** Stores all settings and quits Dolphin. */ void quit(); @@ -115,10 +123,16 @@ signals: void activeViewChanged(); /** - * Is send if the selection of the currently active view has + * Is sent if the selection of the currently active view has * been changed. */ - void selectionChanged(); + void selectionChanged(const KFileItemList& selection); + + /** + * Is sent if the url of the currently active view has + * been changed. + */ + void urlChanged(const KUrl& url); protected: /** @see QMainWindow::closeEvent */ @@ -348,7 +362,7 @@ private slots: void slotAdditionalInfoChanged(KFileItemDelegate::AdditionalInformation info); /** Updates the state of the 'Edit' menu actions. */ - void slotSelectionChanged(); + void slotSelectionChanged(const KFileItemList& selection); /** * Updates the state of the 'Back' and 'Forward' menu @@ -356,12 +370,6 @@ private slots: */ void slotHistoryChanged(); - /** - * Updates the caption of the main window and the state - * of all menu actions which depend from a changed URL. - */ - void slotUrlChanged(const KUrl& url); - /** Updates the state of the 'Show filter bar' menu action. */ void updateFilterBarAction(bool show); @@ -393,6 +401,11 @@ private: */ void connectViewSignals(int viewIndex); + /** + * Helper function to connect all signal/slots of the given \sidebar. + */ + void connectSidebarPage(SidebarPage* sidebar); + private: /** * DolphinMainWindowsupports only one or two views, which |
