- this, SLOT(slotErrorMessage(const QString&)));
-
- m_iconsView = new DolphinIconsView(this);
- applyModeToView();
-
- KDirModel* model = new KDirModel();
- model->setDirLister(m_dirLister);
- m_iconsView->setModel(model);
+ 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);
+
+ m_controller = new DolphinController(this);
+ connect(m_controller, SIGNAL(requestContextMenu(const QPoint&)),
+ this, SLOT(openContextMenu(const QPoint&)));
+ connect(m_controller, SIGNAL(urlsDropped(const KUrl::List&, const QPoint&)),
+ this, SLOT(dropUrls(const KUrl::List&, const QPoint&)));
+ 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(selectionChanged()),
+ this, SLOT(emitSelectionChangedSignal()));
+ connect(m_controller, SIGNAL(activated()),
+ this, SLOT(requestActivation()));