From c05395ef9a6f449bd96b4323d308b53d70cede99 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 29 Aug 2009 09:42:21 +0000 Subject: Move code for initializing and handling view extensions to the new class ViewExtensionsFactory. Beside making DolphinView less complex this will allow the column view to share the view extension code instead of (partly) duplicating it as it has been done before. Currently only the tooltips- and filepreview-handling have been moved into ViewExtensionsFactory, a further cleanup will be done later. svn path=/trunk/KDE/kdebase/apps/; revision=1016893 --- src/dolphiniconsview.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/dolphiniconsview.cpp') diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 81b5c18d9..b07ce5a04 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -28,6 +28,7 @@ #include "dolphin_generalsettings.h" #include "draganddrophelper.h" #include "selectionmanager.h" +#include "viewextensionsfactory.h" #include "zoomlevelinfo.h" #include @@ -39,12 +40,15 @@ #include #include -DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controller) : +DolphinIconsView::DolphinIconsView(QWidget* parent, + DolphinController* controller, + DolphinSortFilterProxyModel* proxyModel) : KCategorizedView(parent), m_controller(controller), m_selectionManager(0), m_autoScroller(0), m_categoryDrawer(0), + m_extensionsFactory(0), m_font(), m_decorationSize(), m_decorationPosition(QStyleOptionViewItem::Top), @@ -53,6 +57,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle m_dropRect() { Q_ASSERT(controller != 0); + setModel(proxyModel); setLayoutDirection(Qt::LeftToRight); setViewMode(QListView::IconMode); setResizeMode(QListView::Adjust); @@ -130,6 +135,8 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, DolphinController* controlle connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)), this, SLOT(slotGlobalSettingsChanged(int))); + + m_extensionsFactory = new ViewExtensionsFactory(this, controller); } DolphinIconsView::~DolphinIconsView() -- cgit v1.3