+ view->setModel(m_proxyModel);
+
+ view->setSelectionMode(QAbstractItemView::ExtendedSelection);
+
+ KFileItemDelegate* delegate = new KFileItemDelegate(this);
+ delegate->setAdditionalInformation(KFileItemDelegate::FriendlyMimeType);
+ view->setItemDelegate(delegate);
+
+ new KMimeTypeResolver(view, m_dirModel);
+
+ connect(view, SIGNAL(clicked(const QModelIndex&)),
+ this, SLOT(triggerItem(const QModelIndex&)));
+ connect(view->selectionModel(), SIGNAL(selectionChanged(const QItemSelection&, const QItemSelection&)),
+ this, SLOT(emitSelectionChangedSignal()));
+
+ m_topLayout->insertWidget(1, view);
+}
+
+int DolphinView::columnIndex(Sorting sorting) const
+{
+ int index = 0;
+ switch (sorting) {
+ case SortByName: index = KDirModel::Name; break;
+ case SortBySize: index = KDirModel::Size; break;
+ case SortByDate: index = KDirModel::ModifiedTime; break;
+ default: assert(false);
+ }
+ return index;
+}
+
+void DolphinView::selectAll(QItemSelectionModel::SelectionFlags flags)
+{
+ QItemSelectionModel* selectionModel = itemView()->selectionModel();
+ const QAbstractItemModel* itemModel = selectionModel->model();
+
+ const QModelIndex topLeft = itemModel->index(0, 0);
+ const QModelIndex bottomRight = itemModel->index(itemModel->rowCount() - 1,
+ itemModel->columnCount() - 1);
+
+ QItemSelection selection(topLeft, bottomRight);
+ selectionModel->select(selection, flags);
+}
+
+QAbstractItemView* DolphinView::itemView() const
+{
+ assert((m_iconsView == 0) || (m_detailsView == 0));
+ if (m_detailsView != 0) {
+ return m_detailsView;