diff options
| author | Peter Penz <[email protected]> | 2007-03-02 18:59:09 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2007-03-02 18:59:09 +0000 |
| commit | fe8b349bcee6426ddc6f33bc221dfc8973b07e33 (patch) | |
| tree | 5f71934285a07abf38ba4193c63a7f451bd58b4b /src/dolphinmainwindow.cpp | |
| parent | 802a2572b3b85f84ca1e42a23110d81f0f3cc531 (diff) | |
It seems some people cannot live without a tree view ;-) So Dolphin will provide a dock which contains the directory hierarchy, which will be synchronized with the active view. It does not clutter the UI (the dock can be turned off), but makes happy a lot of users -> kind of win-win-situation. This commit provides only a rough initial version, which shows the current URL as tree. I'll work on the interaction during the next week(s)...
svn path=/trunk/KDE/kdebase/apps/; revision=638628
Diffstat (limited to 'src/dolphinmainwindow.cpp')
| -rw-r--r-- | src/dolphinmainwindow.cpp | 30 |
1 files changed, 23 insertions, 7 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 72b6703d8..f7b7246b4 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -24,21 +24,21 @@ #include <assert.h>
+#include "bookmarkssidebarpage.h"
#include "dolphinapplication.h"
#include "dolphinnewmenu.h"
#include "dolphinsettings.h"
#include "dolphinsettingsdialog.h"
#include "dolphinstatusbar.h"
-#include "dolphinapplication.h"
-#include "urlnavigator.h"
-#include "dolphinsettings.h"
-#include "bookmarkssidebarpage.h"
#include "infosidebarpage.h"
-#include "dolphin_generalsettings.h"
-#include "viewpropertiesdialog.h"
-#include "viewproperties.h"
#include "metadataloader.h"
#include "mainwindowadaptor.h"
+#include "treeviewsidebarpage.h"
+#include "urlnavigator.h"
+#include "viewpropertiesdialog.h"
+#include "viewproperties.h"
+
+#include "dolphin_generalsettings.h"
#include <kaction.h>
#include <kactioncollection.h>
@@ -1191,6 +1191,10 @@ void DolphinMainWindow::setupActions() void DolphinMainWindow::setupDockWidgets()
{
+ // TODO: there's a lot copy/paste code here. Provide a generic approach
+ // after the dock concept has been finalized.
+
+ // setup "Bookmarks"
QDockWidget* shortcutsDock = new QDockWidget(i18n("Bookmarks"));
shortcutsDock->setObjectName("bookmarksDock");
shortcutsDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
@@ -1201,6 +1205,7 @@ void DolphinMainWindow::setupDockWidgets() addDockWidget(Qt::LeftDockWidgetArea, shortcutsDock);
+ // setup "Information"
QDockWidget* infoDock = new QDockWidget(i18n("Information"));
infoDock->setObjectName("infoDock");
infoDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
@@ -1210,6 +1215,17 @@ void DolphinMainWindow::setupDockWidgets() actionCollection()->addAction("show_info_panel", infoDock->toggleViewAction());
addDockWidget(Qt::RightDockWidgetArea, infoDock);
+
+ // setup "Tree View"
+ QDockWidget* treeViewDock = new QDockWidget(i18n("Folders")); // TODO: naming?
+ treeViewDock->setObjectName("treeViewDock");
+ treeViewDock->setAllowedAreas(Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea);
+ treeViewDock->setWidget(new TreeViewSidebarPage(this));
+
+ treeViewDock->toggleViewAction()->setText(i18n("Show Folders Panel"));
+ actionCollection()->addAction("show_folders_panel", treeViewDock->toggleViewAction());
+
+ addDockWidget(Qt::LeftDockWidgetArea, treeViewDock);
}
void DolphinMainWindow::updateHistory()
|
