diff options
| author | Peter Penz <[email protected]> | 2007-03-05 22:27:00 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-03-05 22:27:00 +0000 |
| commit | 897d4acc22f54817b2e270e396d31cd025128042 (patch) | |
| tree | e57671a820c0d9de367e234c728cc5bfaadb5ff9 /src/treeviewsidebarpage.h | |
| parent | 7c6ef323410ff9544f27b643e2d83949b61d75a0 (diff) | |
synchronize the tree view with the active view
svn path=/trunk/KDE/kdebase/apps/; revision=639751
Diffstat (limited to 'src/treeviewsidebarpage.h')
| -rw-r--r-- | src/treeviewsidebarpage.h | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/treeviewsidebarpage.h b/src/treeviewsidebarpage.h index 045586bcc..12cb75d45 100644 --- a/src/treeviewsidebarpage.h +++ b/src/treeviewsidebarpage.h @@ -20,6 +20,7 @@ #ifndef TREEVIEWSIDEBARPAGE_H #define TREEVIEWSIDEBARPAGE_H +#include <kurl.h> #include <sidebarpage.h> class KDirLister; @@ -30,7 +31,11 @@ class QModelIndex; class QTreeView; /** - * @brief + * @brief Shows a tree view of the directories starting from + * the currently selected bookmark. + * + * The tree view is always synchronized with the currently active view + * from the main window. */ class TreeViewSidebarPage : public SidebarPage { @@ -55,10 +60,17 @@ private slots: void updateSelection(const KUrl& url); /** - * Updates the URL of the active view to the URL + * Expands the tree in a way that the item with the URL m_selectedUrl + * gets visible. Is called by TreeViewSidebarPage::updateSelection() + * if the dir lister has been completed. + */ + void expandSelectionParent(); + + /** + * Updates the active view to the URL * which is given by the item with the index \a index. */ - void updateViewUrl(const QModelIndex& index); + void updateActiveView(const QModelIndex& index); private: /** @@ -71,6 +83,7 @@ private: KDirLister* m_dirLister; KDirModel* m_dirModel; QTreeView* m_treeView; + KUrl m_selectedUrl; }; #endif // BOOKMARKSSIDEBARPAGE_H |
