┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphincolumnview.cpp
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2007-09-17 04:02:17 +0000
committerRafael Fernández López <[email protected]>2007-09-17 04:02:17 +0000
commitc8072005fada01d772595ec64adca449134f421e (patch)
tree2bbcad6b43218569c813ef888bec3ad009335b69 /src/dolphincolumnview.cpp
parent231436769d037a83afbf57fedea167b6fb9a5ad4 (diff)
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: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=713319
Diffstat (limited to 'src/dolphincolumnview.cpp')
-rw-r--r--src/dolphincolumnview.cpp8
1 files changed, 3 insertions, 5 deletions
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 <kcolorutils.h>
#include <kcolorscheme.h>
#include <kdirlister.h>
-#include <kdirmodel.h>
#include <QAbstractProxyModel>
#include <QApplication>
@@ -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<const QAbstractProxyModel*>(m_view->model());
- const KDirModel* dirModel = static_cast<const KDirModel*>(proxyModel->sourceModel());
- const QModelIndex dirIndex = dirModel->indexForUrl(m_childUrl);
+ const DolphinModel* dolphinModel = static_cast<const DolphinModel*>(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);
}