diff options
| author | Rafael Fernández López <[email protected]> | 2007-09-17 04:02:17 +0000 |
|---|---|---|
| committer | Rafael Fernández López <[email protected]> | 2007-09-17 04:02:17 +0000 |
| commit | c8072005fada01d772595ec64adca449134f421e (patch) | |
| tree | 2bbcad6b43218569c813ef888bec3ad009335b69 /src/dolphindetailsview.cpp | |
| parent | 231436769d037a83afbf57fedea167b6fb9a5ad4 (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/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index d7c8c5ab1..defe93192 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -20,6 +20,7 @@ #include "dolphindetailsview.h" +#include "dolphinmodel.h" #include "dolphincontroller.h" #include "dolphinsettings.h" #include "dolphinsortfilterproxymodel.h" @@ -27,8 +28,6 @@ #include "dolphin_detailsmodesettings.h" -#include <kdirmodel.h> - #include <QApplication> #include <QHeaderView> #include <QRubberBand> @@ -122,23 +121,23 @@ bool DolphinDetailsView::event(QEvent* event) const DetailsModeSettings* settings = DolphinSettings::instance().detailsModeSettings(); Q_ASSERT(settings != 0); if (!settings->showDate()) { - hideColumn(KDirModel::ModifiedTime); + hideColumn(DolphinModel::ModifiedTime); } if (!settings->showPermissions()) { - hideColumn(KDirModel::Permissions); + hideColumn(DolphinModel::Permissions); } if (!settings->showOwner()) { - hideColumn(KDirModel::Owner); + hideColumn(DolphinModel::Owner); } if (!settings->showGroup()) { - hideColumn(KDirModel::Group); + hideColumn(DolphinModel::Group); } if (!settings->showType()) { - hideColumn(KDirModel::Type); + hideColumn(DolphinModel::Type); } } @@ -163,7 +162,7 @@ void DolphinDetailsView::mousePressEvent(QMouseEvent* event) QTreeView::mousePressEvent(event); const QModelIndex index = indexAt(event->pos()); - if (!index.isValid() || (index.column() != KDirModel::Name)) { + if (!index.isValid() || (index.column() != DolphinModel::Name)) { const Qt::KeyboardModifiers modifier = QApplication::keyboardModifiers(); if (!(modifier & Qt::ShiftModifier) && !(modifier & Qt::ControlModifier)) { clearSelection(); @@ -227,7 +226,7 @@ void DolphinDetailsView::dragMoveEvent(QDragMoveEvent* event) // TODO: remove this code when the issue #160611 is solved in Qt 4.4 setDirtyRegion(m_dropRect); const QModelIndex index = indexAt(event->pos()); - if (!index.isValid() || (index.column() != KDirModel::Name)) { + if (!index.isValid() || (index.column() != DolphinModel::Name)) { m_dragging = false; } else { m_dragging = true; @@ -314,7 +313,7 @@ void DolphinDetailsView::synchronizeSortingState(int column) void DolphinDetailsView::slotEntered(const QModelIndex& index) { const QPoint pos = viewport()->mapFromGlobal(QCursor::pos()); - const int nameColumnWidth = header()->sectionSize(KDirModel::Name); + const int nameColumnWidth = header()->sectionSize(DolphinModel::Name); if (pos.x() < nameColumnWidth) { m_controller->emitItemEntered(index); } |
