diff options
| author | Peter Penz <[email protected]> | 2009-08-28 21:53:18 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-28 21:53:18 +0000 |
| commit | e1c74b05fdae664aa9211cba3afb7993b51ec23b (patch) | |
| tree | 3f8a7a4dc75f2e27f8bbb85ec058fd1e59b1888f /src/dolphincolumnview.cpp | |
| parent | 8d31eca0e0ee89c74318af0bc8a79c2d17e63187 (diff) | |
Restore filtering of items. The DolphinView just tells the controller about the filter, the views (1:1 iconView + detailView, 1:n columnView) connect to the filter-changed signal and apply it to their proxy model.
svn path=/trunk/KDE/kdebase/apps/; revision=1016782
Diffstat (limited to 'src/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 14ee18bef..5d52a62c4 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -172,6 +172,13 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, connect(controller, SIGNAL(zoomLevelChanged(int)), this, SLOT(setZoomLevel(int))); + const QString nameFilter = controller->nameFilter(); + if (!nameFilter.isEmpty()) { + m_proxyModel->setFilterRegExp(nameFilter); + } + connect(controller, SIGNAL(nameFilterChanged(const QString&)), + this, SLOT(setNameFilter(const QString&))); + updateDecorationSize(dolphinView->showPreview()); } @@ -458,6 +465,10 @@ void DolphinColumnView::currentChanged(const QModelIndex& current, const QModelI m_autoScroller->handleCurrentIndexChange(current, previous); } +void DolphinColumnView::setNameFilter(const QString& nameFilter) +{ + m_proxyModel->setFilterRegExp(nameFilter); +} void DolphinColumnView::setZoomLevel(int level) { |
