diff options
| author | Peter Penz <[email protected]> | 2009-08-29 09:42:21 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-29 09:42:21 +0000 |
| commit | c05395ef9a6f449bd96b4323d308b53d70cede99 (patch) | |
| tree | ee8b6db0d0b07a7439b95395cbce0429c17ef635 /src/dolphindetailsview.cpp | |
| parent | e1c74b05fdae664aa9211cba3afb7993b51ec23b (diff) | |
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
Diffstat (limited to 'src/dolphindetailsview.cpp')
| -rw-r--r-- | src/dolphindetailsview.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/dolphindetailsview.cpp b/src/dolphindetailsview.cpp index 92ffd5e1f..2769064e4 100644 --- a/src/dolphindetailsview.cpp +++ b/src/dolphindetailsview.cpp @@ -28,6 +28,7 @@ #include "dolphinviewautoscroller.h" #include "draganddrophelper.h" #include "selectionmanager.h" +#include "viewextensionsfactory.h" #include "viewproperties.h" #include "zoomlevelinfo.h" @@ -45,7 +46,9 @@ #include <QPainter> #include <QScrollBar> -DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* controller) : +DolphinDetailsView::DolphinDetailsView(QWidget* parent, + DolphinController* controller, + DolphinSortFilterProxyModel* proxyModel) : QTreeView(parent), m_autoResize(true), m_expandingTogglePressed(false), @@ -55,6 +58,7 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr m_controller(controller), m_selectionManager(0), m_autoScroller(0), + m_extensionsFactory(0), m_expandableFoldersAction(0), m_font(), m_decorationSize(), @@ -75,6 +79,7 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr setRootIsDecorated(settings->expandableFolders()); setItemsExpandable(settings->expandableFolders()); setEditTriggers(QAbstractItemView::NoEditTriggers); + setModel(proxyModel); setMouseTracking(true); m_autoScroller = new DolphinViewAutoScroller(this); @@ -160,6 +165,8 @@ DolphinDetailsView::DolphinDetailsView(QWidget* parent, DolphinController* contr m_expandableFoldersAction->setCheckable(true); connect(m_expandableFoldersAction, SIGNAL(toggled(bool)), this, SLOT(setFoldersExpandable(bool))); + + m_extensionsFactory = new ViewExtensionsFactory(this, controller); } DolphinDetailsView::~DolphinDetailsView() |
