#include <kcategorizedsortfilterproxymodel.h>
#include <kdialog.h>
-#include <kdirmodel.h>
#include <kfileitemdelegate.h>
#include <QAbstractProxyModel>
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)));
connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)),
this, SLOT(slotGlobalSettingsChanged(int)));
- m_extensionsFactory = new ViewExtensionsFactory(this, controller);
updateGridSize(view->showPreview(), 0);
+ m_extensionsFactory = new ViewExtensionsFactory(this, controller);
}
DolphinIconsView::~DolphinIconsView()
void DolphinIconsView::wheelEvent(QWheelEvent* event)
{
- // let Ctrl+wheel events propagate to the DolphinView for icon zooming
- if (event->modifiers() & Qt::ControlModifier) {
- event->ignore();
- return;
- }
-
horizontalScrollBar()->setSingleStep(m_itemSize.width() / 10);
verticalScrollBar()->setSingleStep(m_itemSize.height() / 10);
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();