]> cloud.milkyroute.net Git - dolphin.git/blob - src/treeviewsidebarpage.h
Per default turn off the information panel and the tree view panel for the first...
[dolphin.git] / src / treeviewsidebarpage.h
1 /***************************************************************************
2 * Copyright (C) 2006 by Peter Penz <peter.penz@gmx.at>
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 * *
9 * This program is distributed in the hope that it will be useful, *
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
12 * GNU General Public License for more details. *
13 * *
14 * You should have received a copy of the GNU General Public License *
15 * along with this program; if not, write to the *
16 * Free Software Foundation, Inc., *
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA *
18 ***************************************************************************/
19
20 #ifndef TREEVIEWSIDEBARPAGE_H
21 #define TREEVIEWSIDEBARPAGE_H
22
23 #include <sidebarpage.h>
24
25 class KDirLister;
26 class KDirModel;
27 class KUrl;
28 class QTreeView;
29
30 /**
31 * @brief
32 */
33 class TreeViewSidebarPage : public SidebarPage
34 {
35 Q_OBJECT
36
37 public:
38 TreeViewSidebarPage(DolphinMainWindow* mainWindow, QWidget* parent = 0);
39 virtual ~TreeViewSidebarPage();
40
41 protected:
42 /** @see SidebarPage::activeViewChanged() */
43 virtual void activeViewChanged();
44
45 private slots:
46 /**
47 * Updates the current position inside the tree to
48 * \a url.
49 */
50 void updatePosition(const KUrl& url);
51
52 private:
53 /**
54 * Connects to signals from the currently active Dolphin view to get
55 * informed about highlighting changes.
56 */
57 void connectToActiveView();
58
59 private:
60 KDirLister* m_dirLister;
61 KDirModel* m_dirModel;
62 QTreeView* m_treeView;
63 };
64
65 #endif // BOOKMARKSSIDEBARPAGE_H