- m_viewTab[m_tabIndex].splitter = new QSplitter(this);
- m_viewTab[m_tabIndex].splitter->setChildrenCollapsible(false);
-
- setupActions();
-
- const KUrl& homeUrl = generalSettings->homeUrl();
- setUrlAsCaption(homeUrl);
- m_actionHandler = new DolphinViewActionHandler(actionCollection(), this);
- connect(m_actionHandler, SIGNAL(actionBeingHandled()), SLOT(clearStatusBar()));
- connect(m_actionHandler, SIGNAL(createDirectory()), SLOT(createDirectory()));
- ViewProperties props(homeUrl);
- m_viewTab[m_tabIndex].primaryView = new DolphinViewContainer(homeUrl,
- m_viewTab[m_tabIndex].splitter);
-
- m_activeViewContainer = m_viewTab[m_tabIndex].primaryView;
- connectViewSignals(m_activeViewContainer);
- DolphinView* view = m_activeViewContainer->view();
- view->reload();
- m_activeViewContainer->show();
- m_actionHandler->setCurrentView(view);
-
- m_remoteEncoding = new DolphinRemoteEncoding(this, m_actionHandler);
- connect(this, SIGNAL(urlChanged(const KUrl&)),
- m_remoteEncoding, SLOT(slotAboutToOpenUrl()));
-
-#ifdef HAVE_NEPOMUK
- m_searchOptionsConfigurator = new DolphinSearchOptionsConfigurator(this);
- m_searchOptionsConfigurator->hide();
- connect(m_searchOptionsConfigurator, SIGNAL(searchOptionsChanged()),
- this, SLOT(searchItems()));
- connect(this, SIGNAL(urlChanged(KUrl)), m_searchOptionsConfigurator, SLOT(setDirectory(KUrl)));
-#endif
-
- m_tabBar = new KTabBar(this);
- m_tabBar->setMovable(true);
- m_tabBar->setTabsClosable(true);
- connect(m_tabBar, SIGNAL(currentChanged(int)),
- this, SLOT(setActiveTab(int)));
- connect(m_tabBar, SIGNAL(tabCloseRequested(int)),
- this, SLOT(closeTab(int)));
- connect(m_tabBar, SIGNAL(contextMenu(int, const QPoint&)),
- this, SLOT(openTabContextMenu(int, const QPoint&)));
- connect(m_tabBar, SIGNAL(newTabRequest()),
- this, SLOT(openNewTab()));
- connect(m_tabBar, SIGNAL(testCanDecode(const QDragMoveEvent*, bool&)),
- this, SLOT(slotTestCanDecode(const QDragMoveEvent*, bool&)));
- connect(m_tabBar, SIGNAL(wheelDelta(int)),
- this, SLOT(slotWheelMoved(int)));
- connect(m_tabBar, SIGNAL(mouseMiddleClick(int)),
- this, SLOT(closeTab(int)));
- connect(m_tabBar, SIGNAL(tabMoved(int, int)),
- this, SLOT(slotTabMoved(int, int)));
- connect(m_tabBar, SIGNAL(receivedDropEvent(int, QDropEvent*)),
- this, SLOT(tabDropEvent(int, QDropEvent*)));
-
- m_tabBar->blockSignals(true); // signals get unblocked after at least 2 tabs are open
-
- QWidget* centralWidget = new QWidget(this);
- m_centralWidgetLayout = new QVBoxLayout(centralWidget);
- m_centralWidgetLayout->setSpacing(0);
- m_centralWidgetLayout->setMargin(0);
-#ifdef HAVE_NEPOMUK
- m_centralWidgetLayout->addWidget(m_searchOptionsConfigurator);
-#endif
- m_centralWidgetLayout->addWidget(m_tabBar);
- m_centralWidgetLayout->addWidget(m_viewTab[m_tabIndex].splitter, 1);
-
- setCentralWidget(centralWidget);
- setupDockWidgets();
- emit urlChanged(homeUrl);
-
- setupGUI(Keys | Save | Create | ToolBar);