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/dolphincolumnview.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/dolphincolumnview.cpp')
| -rw-r--r-- | src/dolphincolumnview.cpp | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/src/dolphincolumnview.cpp b/src/dolphincolumnview.cpp index 5d52a62c4..925663568 100644 --- a/src/dolphincolumnview.cpp +++ b/src/dolphincolumnview.cpp @@ -33,12 +33,12 @@ #include "selectionmanager.h" #include "tooltips/tooltipmanager.h" #include "versioncontrolobserver.h" +#include "viewextensionsfactory.h" #include "zoomlevelinfo.h" #include <kcolorscheme.h> #include <kdirlister.h> #include <kfileitem.h> -#include <kfilepreviewgenerator.h> #include <kio/previewjob.h> #include <kiconeffect.h> #include <kjob.h> @@ -58,6 +58,7 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, m_container(container), m_selectionManager(0), m_autoScroller(0), + m_extensionsFactory(0), m_url(url), m_childUrl(), m_font(), @@ -65,8 +66,6 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, m_dirLister(0), m_dolphinModel(0), m_proxyModel(0), - m_previewGenerator(0), - m_toolTipManager(0), m_dropRect() { setMouseTracking(true); @@ -149,13 +148,6 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, m_selectionManager, SLOT(reset())); } - //m_previewGenerator = new KFilePreviewGenerator(this); - //m_previewGenerator->setPreviewShown(m_container->m_controller->dolphinView()->showPreview()); - - //if (DolphinSettings::instance().generalSettings()->showToolTips()) { - // m_toolTipManager = new ToolTipManager(this, m_proxyModel); - //} - //m_dirLister->openUrl(url, KDirLister::NoFlags); connect(KGlobalSettings::self(), SIGNAL(kdisplayFontChanged()), @@ -180,6 +172,8 @@ DolphinColumnView::DolphinColumnView(QWidget* parent, this, SLOT(setNameFilter(const QString&))); updateDecorationSize(dolphinView->showPreview()); + + m_extensionsFactory = new ViewExtensionsFactory(this, controller); } DolphinColumnView::~DolphinColumnView() @@ -391,10 +385,6 @@ void DolphinColumnView::keyPressEvent(QKeyEvent* event) default: break; } - - if (m_toolTipManager != 0) { - m_toolTipManager->hideTip(); - } } void DolphinColumnView::contextMenuEvent(QContextMenuEvent* event) @@ -413,10 +403,6 @@ void DolphinColumnView::contextMenuEvent(QContextMenuEvent* event) clearSelection(); } - if (m_toolTipManager != 0) { - m_toolTipManager->hideTip(); - } - const QPoint pos = m_container->viewport()->mapFromGlobal(event->globalPos()); Q_ASSERT(m_container->m_controller->itemView() == this); m_container->m_controller->triggerContextMenuRequest(pos); |
