From 8f9baef848c3056cd1df772f0774decad509cff3 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 25 Mar 2007 06:44:28 +0000 Subject: Patch by Luca Gugelmann: get rid of any mainwindow dependency from the sidebars. svn path=/trunk/KDE/kdebase/apps/; revision=646256 --- src/treeviewsidebarpage.h | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) (limited to 'src/treeviewsidebarpage.h') diff --git a/src/treeviewsidebarpage.h b/src/treeviewsidebarpage.h index c8aec9e4e..badc94484 100644 --- a/src/treeviewsidebarpage.h +++ b/src/treeviewsidebarpage.h @@ -42,13 +42,16 @@ class TreeViewSidebarPage : public SidebarPage Q_OBJECT public: - TreeViewSidebarPage(DolphinMainWindow* mainWindow, QWidget* parent = 0); + TreeViewSidebarPage(QWidget* parent = 0); virtual ~TreeViewSidebarPage(); -protected: - /** @see SidebarPage::activeViewChanged() */ - virtual void activeViewChanged(); +public slots: + /** + * Changes the current selection inside the tree to \a url. + */ + void setUrl(const KUrl& url); +protected: /** @see QWidget::showEvent() */ virtual void showEvent(QShowEvent* event); @@ -56,12 +59,6 @@ protected: virtual void contextMenuEvent(QContextMenuEvent* event); private slots: - /** - * Updates the current selection inside the tree to - * \a url. - */ - void updateSelection(const KUrl& url); - /** * Expands the tree in a way that the item with the URL m_selectedUrl * gets visible. Is called by TreeViewSidebarPage::updateSelection() @@ -81,19 +78,11 @@ private slots: void dropUrls(const KUrl::List& urls, const QModelIndex& index); -private: - /** - * Connects to signals from the currently active Dolphin view to get - * informed about highlighting changes. - */ - void connectToActiveView(); - private: KDirLister* m_dirLister; KDirModel* m_dirModel; DolphinSortFilterProxyModel* m_proxyModel; SidebarTreeView* m_treeView; - KUrl m_selectedUrl; }; #endif // TREEVIEWSIDEBARPAGE_H -- cgit v1.3