From 05762d42ea91ea034086c67099cf9208f86c00ff Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sun, 30 Aug 2009 18:39:03 +0000 Subject: Move the VersionControlObserver from the DolphinView to the ViewExtensionsFactory. This automatically enables also the column view to be able handling version controlled files. svn path=/trunk/KDE/kdebase/apps/; revision=1017482 --- src/dolphincontroller.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) (limited to 'src/dolphincontroller.h') diff --git a/src/dolphincontroller.h b/src/dolphincontroller.h index ccfef5306..355cff8cf 100644 --- a/src/dolphincontroller.h +++ b/src/dolphincontroller.h @@ -64,12 +64,14 @@ class QPoint; * - emitViewportEntered() * - replaceUrlByClipboard() * - hideToolTip() + * - setVersionControlActions() * * The communication of the abstract view to the view implementations is done by: * - setUrl() * - indicateActivationChange() * - setNameFilter() * - setZoomLevel() + * - versionControlActions() */ class LIBDOLPHINPRIVATE_EXPORT DolphinController : public QObject { @@ -195,6 +197,20 @@ public: void setZoomLevel(int level); int zoomLevel() const; + /** + * Sets the available version control actions. Is called by the view + * implementation as soon as the controller has send the signal + * requestVersionControlActions(). + */ + void setVersionControlActions(QList actions); + + /** + * Returns the version control actions that are provided for the items \p items. + * Is called by the abstract Dolphin view to show the version control actions + * inside the context menu. + */ + QList versionControlActions(const KFileItemList& items); + /** * Sets the name filter to \a and emits the signal nameFilterChanged(). */ @@ -400,6 +416,13 @@ signals: */ void cancelPreviews(); + /** + * Requests the view implementation to invoke DolphinController::setVersionControlActions(), + * so that they can be returned with DolphinController::versionControlActions() for + * the abstract Dolphin view. + */ + void requestVersionControlActions(const KFileItemList& items); + private slots: void updateMouseButtonState(); @@ -410,6 +433,7 @@ private: KUrl m_url; DolphinView* m_dolphinView; QAbstractItemView* m_itemView; + QList m_versionControlActions; }; inline const DolphinView* DolphinController::dolphinView() const -- cgit v1.3