- this, SLOT(updateItemCount()));
- connect(m_dirLister, SIGNAL(infoMessage(const QString&)),
- this, SLOT(showInfoMessage(const QString&)));
- connect(m_dirLister, SIGNAL(errorMessage(const QString&)),
- this, SLOT(showErrorMessage(const QString&)));
-
- m_dirModel = new KDirModel();
- m_dirModel->setDirLister(m_dirLister);
- m_dirModel->setDropsAllowed(KDirModel::DropOnDirectory);
-
- m_proxyModel = new DolphinSortFilterProxyModel(this);
- m_proxyModel->setSourceModel(m_dirModel);
-
- createView();
-
- m_iconSize = K3Icon::SizeMedium;
-
- m_filterBar = new FilterBar(this);
- m_filterBar->hide();
- connect(m_filterBar, SIGNAL(filterChanged(const QString&)),
- this, SLOT(changeNameFilter(const QString&)));
- connect(m_filterBar, SIGNAL(closeRequest()),
- this, SLOT(closeFilterBar()));
-
- m_topLayout->addWidget(m_urlNavigator);
+ this, SLOT(updateCutItems()));
+ connect(m_dirLister, SIGNAL(newItems(const QList<KFileItem>&)),
+ this, SLOT(generatePreviews(const QList<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(requestContextMenu(const QPoint&)),
+ this, SLOT(openContextMenu(const QPoint&)));
+ connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const QModelIndex&, QWidget*)),
+ this, SLOT(dropUrls(const KUrl::List&, const QModelIndex&, QWidget*)));
+ 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(itemTriggered(const QModelIndex&)),
+ this, SLOT(triggerItem(const QModelIndex&)));
+ connect(m_controller, SIGNAL(activated()),
+ this, SLOT(activate()));
+ connect(m_controller, SIGNAL(itemEntered(const QModelIndex&)),
+ this, SLOT(showHoverInformation(const QModelIndex&)));
+ connect(m_controller, SIGNAL(viewportEntered()),
+ this, SLOT(clearHoverInformation()));
+
+ applyViewProperties(url);