diff options
| author | Peter Penz <[email protected]> | 2009-08-29 11:36:22 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-29 11:36:22 +0000 |
| commit | 95f0ba76ae26e45a6ff9f1ec51db7d270ca278c0 (patch) | |
| tree | 53e19752852ded3c61f4c1c51b56790642a6f1d2 /src/dolphiniconsview.cpp | |
| parent | 69686ffbba123f2b05f5cb7b74a927953e5157a5 (diff) | |
move handling of SelectionManager and AutoScroller to ViewExtensionsFactory
svn path=/trunk/KDE/kdebase/apps/; revision=1016927
Diffstat (limited to 'src/dolphiniconsview.cpp')
| -rw-r--r-- | src/dolphiniconsview.cpp | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/src/dolphiniconsview.cpp b/src/dolphiniconsview.cpp index 2670aab82..efbcfd6fb 100644 --- a/src/dolphiniconsview.cpp +++ b/src/dolphiniconsview.cpp @@ -23,7 +23,6 @@ #include "dolphincontroller.h" #include "settings/dolphinsettings.h" #include "dolphinsortfilterproxymodel.h" -#include "dolphinviewautoscroller.h" #include "dolphin_iconsmodesettings.h" #include "dolphin_generalsettings.h" #include "draganddrophelper.h" @@ -45,9 +44,8 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, 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), @@ -66,7 +64,6 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, viewport()->setAcceptDrops(true); setMouseTracking(true); - m_autoScroller = new DolphinViewAutoScroller(this); connect(this, SIGNAL(clicked(const QModelIndex&)), controller, SLOT(requestTab(const QModelIndex&))); @@ -78,14 +75,6 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, controller, SLOT(triggerItem(const QModelIndex&))); } - if (DolphinSettings::instance().generalSettings()->showSelectionToggle()) { - m_selectionManager = new SelectionManager(this); - connect(m_selectionManager, SIGNAL(selectionChanged()), - this, SLOT(requestActivation())); - connect(m_controller, SIGNAL(urlChanged(const KUrl&)), - m_selectionManager, SLOT(reset())); - } - connect(this, SIGNAL(entered(const QModelIndex&)), controller, SLOT(emitItemEntered(const QModelIndex&))); connect(this, SIGNAL(viewportEntered()), @@ -135,7 +124,7 @@ DolphinIconsView::DolphinIconsView(QWidget* parent, connect(KGlobalSettings::self(), SIGNAL(settingsChanged(int)), this, SLOT(slotGlobalSettingsChanged(int))); - new ViewExtensionsFactory(this, controller); + m_extensionsFactory = new ViewExtensionsFactory(this, controller); } DolphinIconsView::~DolphinIconsView() @@ -328,10 +317,6 @@ void DolphinIconsView::keyPressEvent(QKeyEvent* event) void DolphinIconsView::wheelEvent(QWheelEvent* event) { - if (m_selectionManager != 0) { - m_selectionManager->reset(); - } - // let Ctrl+wheel events propagate to the DolphinView for icon zooming if (event->modifiers() & Qt::ControlModifier) { event->ignore(); @@ -377,7 +362,7 @@ void DolphinIconsView::leaveEvent(QEvent* event) void DolphinIconsView::currentChanged(const QModelIndex& current, const QModelIndex& previous) { KCategorizedView::currentChanged(current, previous); - m_autoScroller->handleCurrentIndexChange(current, previous); + m_extensionsFactory->handleCurrentIndexChange(current, previous); } void DolphinIconsView::resizeEvent(QResizeEvent* event) @@ -521,10 +506,6 @@ void DolphinIconsView::updateGridSize(bool showPreview, int additionalInfoCount) if (delegate != 0) { delegate->setMaximumSize(m_itemSize); } - - if (m_selectionManager != 0) { - m_selectionManager->reset(); - } } int DolphinIconsView::additionalInfoCount() const |
