X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/e1c74b05fdae664aa9211cba3afb7993b51ec23b..abb6807645598e8117e98bbf232cd9cd90fe019a:/src/dolphincontroller.cpp diff --git a/src/dolphincontroller.cpp b/src/dolphincontroller.cpp index 47c661e83..89d6509ca 100644 --- a/src/dolphincontroller.cpp +++ b/src/dolphincontroller.cpp @@ -34,7 +34,8 @@ DolphinController::DolphinController(DolphinView* dolphinView) : m_nameFilter(), m_url(), m_dolphinView(dolphinView), - m_itemView(0) + m_itemView(0), + m_versionControlActions() { } @@ -46,10 +47,16 @@ void DolphinController::setUrl(const KUrl& url) { if (m_url != url) { m_url = url; + emit cancelPreviews(); emit urlChanged(url); } } +void DolphinController::redirectToUrl(const KUrl& url) +{ + m_url = url; +} + void DolphinController::setItemView(QAbstractItemView* view) { if (m_itemView != 0) { @@ -143,6 +150,20 @@ void DolphinController::setZoomLevel(int level) } } +void DolphinController::setVersionControlActions(QList actions) +{ + m_versionControlActions = actions; +} + +QList DolphinController::versionControlActions(const KFileItemList& items) +{ + emit requestVersionControlActions(items); + // All view implementations are connected with the signal requestVersionControlActions() + // (see ViewExtensionFactory) and will invoke DolphinController::setVersionControlActions(), + // so that the context dependent actions can be returned. + return m_versionControlActions; +} + void DolphinController::handleKeyPressEvent(QKeyEvent* event) { Q_ASSERT(m_itemView != 0); @@ -234,6 +255,11 @@ void DolphinController::emitViewportEntered() emit viewportEntered(); } +void DolphinController::emitSelectionChanged() +{ + emit selectionChanged(); +} + void DolphinController::updateMouseButtonState() { m_mouseButtons = QApplication::mouseButtons();