┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/dolphiniconsview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/dolphiniconsview.cpp')
-rw-r--r--src/dolphiniconsview.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp
index c48497e82..81b5c18d9 100644
--- a/src/dolphiniconsview.cpp
+++ b/src/dolphiniconsview.cpp
@@ -1,5 +1,5 @@
/***************************************************************************
- * Copyright (C) 2006 by Peter Penz ([email protected]) *
+ * Copyright (C) 2006-2009 by Peter Penz <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
@@ -22,6 +22,7 @@
#include "dolphincategorydrawer.h"
#include "dolphincontroller.h"
#include "settings/dolphinsettings.h"
+#include "dolphinsortfilterproxymodel.h"
#include "dolphinviewautoscroller.h"
#include "dolphin_iconsmodesettings.h"
#include "dolphin_generalsettings.h"
@@ -85,6 +86,8 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle
controller, SLOT(emitItemEntered(const QModelIndex&)));
connect(this, SIGNAL(viewportEntered()),
controller, SLOT(emitViewportEntered()));
+ connect(controller, SIGNAL(nameFilterChanged(const QString&)),
+ this, SLOT(setNameFilter(const QString&)));
connect(controller, SIGNAL(zoomLevelChanged(int)),
this, SLOT(setZoomLevel(int)));
@@ -391,6 +394,12 @@ void DolphinIconsView::slotAdditionalInfoChanged()
updateGridSize(showPreview, view->additionalInfo().count());
}
+void DolphinIconsView::setNameFilter(const QString& nameFilter)
+{
+ DolphinSortFilterProxyModel* proxyModel = static_cast<DolphinSortFilterProxyModel*>(model());
+ proxyModel->setFilterRegExp(nameFilter);
+}
+
void DolphinIconsView::setZoomLevel(int level)
{
IconsModeSettings* settings = DolphinSettings::instance().iconsModeSettings();