From c8072005fada01d772595ec64adca449134f421e Mon Sep 17 00:00:00 2001 From: Rafael Fernández López Date: Mon, 17 Sep 2007 04:02:17 +0000 Subject: Create the new architecture for KCategorizedView. Now DolphinModel is created, inheriting KDirModel for returning valid data for the role of the category of an item. DolphinSortFilterProxyModel implements now methods lessThanCategoryMethod and lessThanGeneralMethod from KCategorizedSortFilterProxyModel. The only thing that needs to be adapted is the keyboard navigation on the KCategorizedView. CCMAIL: peter.penz@gmx.at svn path=/trunk/KDE/kdebase/apps/; revision=713319 --- src/dolphincolumnview.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/dolphincolumnview.cpp') diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 3c3c8e828..658bd8587 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -19,6 +19,7 @@ #include "dolphincolumnview.h" +#include "dolphinmodel.h" #include "dolphincontroller.h" #include "dolphinsettings.h" @@ -27,7 +28,6 @@ #include #include #include -#include #include #include @@ -239,8 +239,8 @@ void ColumnWidget::paintEvent(QPaintEvent* event) if (!m_childUrl.isEmpty()) { // indicate the shown URL of the next column by highlighting the shown folder item const QAbstractProxyModel* proxyModel = static_cast(m_view->model()); - const KDirModel* dirModel = static_cast(proxyModel->sourceModel()); - const QModelIndex dirIndex = dirModel->indexForUrl(m_childUrl); + const DolphinModel* dolphinModel = static_cast(proxyModel->sourceModel()); + const QModelIndex dirIndex = dolphinModel->indexForUrl(m_childUrl); const QModelIndex proxyIndex = proxyModel->mapFromSource(dirIndex); if (proxyIndex.isValid() && !selectionModel()->isSelected(proxyIndex)) { const QRect itemRect = visualRect(proxyIndex); @@ -420,8 +420,6 @@ QRect DolphinColumnView::visualRect(const QModelIndex& index) const void DolphinColumnView::setModel(QAbstractItemModel* model) { - // TODO: remove all columns - activeColumn()->setModel(model); QAbstractItemView::setModel(model); } -- cgit v1.3