- m_urlNavigator = new UrlNavigator(url, this);
- connect(m_urlNavigator, SIGNAL(urlChanged(const KUrl&)),
- this, SLOT(loadDirectory(const KUrl&)));
-
- m_statusBar = new DolphinStatusBar(this);
-
- m_dirLister = new DolphinDirLister();
- m_dirLister->setAutoUpdate(true);
- m_dirLister->setMainWindow(this);
- m_dirLister->setShowingDotFiles(showHiddenFiles);
- m_dirLister->setDelayedMimeTypes(true);
-
- connect(m_dirLister, SIGNAL(clear()),
- this, SLOT(slotClear()));
- connect(m_dirLister, SIGNAL(percent(int)),
- this, SLOT(slotPercent(int)));
- connect(m_dirLister, SIGNAL(deleteItem(KFileItem*)),
- this, SLOT(slotDeleteItem(KFileItem*)));
+ m_controller = new DolphinController(this);
+ m_controller->setUrl(url);
+
+ connect(m_controller, SIGNAL(urlChanged(const KUrl&)),
+ this, SIGNAL(urlChanged(const KUrl&)));
+ connect(m_controller, SIGNAL(requestUrlChange(const KUrl&)),
+ this, SLOT(slotRequestUrlChange(const KUrl&)));
+
+ connect(m_controller, SIGNAL(requestContextMenu(const QPoint&, const QList<QAction*>&)),
+ this, SLOT(openContextMenu(const QPoint&, const QList<QAction*>&)));
+ connect(m_controller, SIGNAL(urlsDropped(const KFileItem&, const KUrl&, QDropEvent*)),
+ this, SLOT(dropUrls(const KFileItem&, const KUrl&, QDropEvent*)));
+ connect(m_controller, SIGNAL(sortingChanged(DolphinView::Sorting)),
+ this, SLOT(updateSorting(DolphinView::Sorting)));
+ connect(m_controller, SIGNAL(sortOrderChanged(Qt::SortOrder)),
+ this, SLOT(updateSortOrder(Qt::SortOrder)));
+ connect(m_controller, SIGNAL(additionalInfoChanged(const KFileItemDelegate::InformationList&)),
+ this, SLOT(updateAdditionalInfo(const KFileItemDelegate::InformationList&)));
+ connect(m_controller, SIGNAL(itemTriggered(const KFileItem&)),
+ this, SLOT(triggerItem(const KFileItem&)));
+ connect(m_controller, SIGNAL(tabRequested(const KUrl&)),
+ this, SIGNAL(tabRequested(const KUrl&)));
+ connect(m_controller, SIGNAL(activated()),
+ this, SLOT(activate()));
+ connect(m_controller, SIGNAL(itemEntered(const KFileItem&)),
+ this, SLOT(showHoverInformation(const KFileItem&)));
+ connect(m_controller, SIGNAL(viewportEntered()),
+ this, SLOT(clearHoverInformation()));
+
+ connect(m_dirLister, SIGNAL(redirection(KUrl, KUrl)),
+ this, SIGNAL(redirection(KUrl, KUrl)));