diff options
| author | Peter Penz <[email protected]> | 2009-08-30 18:39:03 +0000 |
|---|---|---|
| committer | Peter Penz <[email protected]> | 2009-08-30 18:39:03 +0000 |
| commit | 05762d42ea91ea034086c67099cf9208f86c00ff (patch) | |
| tree | c7cd12caf603595821cd44f9be2266c82a5a9c0f /src/dolphincontroller.h | |
| parent | 55704b419eb3ac864b2218cbeca2a8ae921ea1e1 (diff) | |
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
Diffstat (limited to 'src/dolphincontroller.h')
| -rw-r--r-- | src/dolphincontroller.h | 24 |
1 files changed, 24 insertions, 0 deletions
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 { @@ -196,6 +198,20 @@ public: 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<QAction*> 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<QAction*> versionControlActions(const KFileItemList& items); + + /** * Sets the name filter to \a and emits the signal nameFilterChanged(). */ void setNameFilter(const QString& nameFilter); @@ -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<QAction*> m_versionControlActions; }; inline const DolphinView* DolphinController::dolphinView() const |
