From f31a541925033c2ef5e27b85c099d47791b50121 Mon Sep 17 00:00:00 2001 From: Holger Freyther Date: Wed, 29 Nov 2006 00:02:19 +0000 Subject: Make it (almost) possible to have more than one Dolphin KMainWindow Create a DolphinApplication, holding DolphinMainWindows and update the code to use the DolphinView to get the MainWindow, or get a ptr to the MainWindow directly. Or if all windows are effected go through the DolphinApplication to update every mainwindow. The UndowManager and ProgressIndicator have a rather strange relationship and will need some more attention but as UndoManager will be killed anyway I have skipped this. More cleanup, debugging and thinking is needed. svn path=/trunk/playground/utils/dolphin/; revision=608945 --- src/sidebar.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/sidebar.cpp') diff --git a/src/sidebar.cpp b/src/sidebar.cpp index d67f68180..26cfa0c46 100644 --- a/src/sidebar.cpp +++ b/src/sidebar.cpp @@ -30,8 +30,9 @@ #include "bookmarkssidebarpage.h" #include "infosidebarpage.h" -Sidebar::Sidebar(QWidget* parent) : +Sidebar::Sidebar(DolphinMainWindow* mainWindow, QWidget* parent) : QWidget(parent), + m_mainWindow(mainWindow), m_pagesSelector(0), m_page(0), m_layout(0) @@ -83,8 +84,8 @@ void Sidebar::createPage(int index) } switch (index) { - case 0: m_page = new InfoSidebarPage(this); break; - case 1: m_page = new BookmarksSidebarPage(this); break; + case 0: m_page = new InfoSidebarPage(m_mainWindow, this); break; + case 1: m_page = new BookmarksSidebarPage(m_mainWindow, this); break; default: break; } -- cgit v1.3