]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/versioncontrol/kversioncontrolplugin.h
SVN_SILENT made messages (.desktop file) - always resolve ours
[dolphin.git] / src / views / versioncontrol / kversioncontrolplugin.h
index e5a26784829b56eb46266b92603067a5c62670c3..0d94a3fc88fb0823738380420d68f726c27648b6 100644 (file)
 #ifndef KVERSIONCONTROLPLUGIN_H
 #define KVERSIONCONTROLPLUGIN_H
 
-#include <dolphin_export.h>
+#include <dolphinvcs_export.h>
 
-#include <QObject>
-#include <KFileItem>
 #include <QAction>
+#include <QObject>
 
+class KFileItemList;
+class KFileItem;
 /**
  * @brief Base class for version control plugins.
  *
@@ -81,7 +82,7 @@
  *
  * @since 4.8
  */
-class DOLPHIN_EXPORT KVersionControlPlugin : public QObject
+class DOLPHINVCS_EXPORT KVersionControlPlugin : public QObject
 {
     Q_OBJECT
 
@@ -136,7 +137,7 @@ public:
          */
         IgnoredVersion,
         /**
-         * The file is is tracked by the version control system, but
+         * The file is tracked by the version control system, but
          * is missing in the directory (e.g. by deleted without using
          * a version control command).
          * @since 4.8
@@ -144,8 +145,8 @@ public:
         MissingVersion
     };
 
-    KVersionControlPlugin(QObject* parent = 0);
-    virtual ~KVersionControlPlugin();
+    KVersionControlPlugin(QObject* parent = nullptr);
+    ~KVersionControlPlugin() override;
 
     /**
      * Returns the name of the file which stores
@@ -165,28 +166,31 @@ public:
     /**
      * Is invoked after the version control information has been
      * received. It is assured that
-     * KVersionControlPluginV2::beginInfoRetrieval() has been
+     * KVersionControlPlugin::beginRetrieval() has been
      * invoked before.
      */
     virtual void endRetrieval() = 0;
 
     /**
      * @return The version for the item \p item.
-     *         It is assured that KVersionControlPlugin::beginInfoRetrieval() has been
+     *         It is assured that KVersionControlPlugin::beginRetrieval() has been
      *         invoked before and that the file is part of the directory specified
-     *         in beginInfoRetrieval().
+     *         in beginRetrieval().
      */
     virtual ItemVersion itemVersion(const KFileItem& item) const = 0;
 
     /**
-     * @return List of actions that are available for the items \p items.
-     *         It is recommended to keep the number of returned actions small
-     *         in case if an item is an unversioned directory that is not
-     *         inside the hierarchy tree of the version control system. This
-     *         prevents having a cluttered context menu for directories
-     *         outside the version control system.
+     * @return List of actions that are available for the \p items in a version controlled
+     *         path.
+     */
+    virtual QList<QAction*> versionControlActions(const KFileItemList& items) const = 0;
+
+    /**
+     * @return List of actions that are available for the out of version control
+     *         items \p items. It's opposed to the \p versionedActions. Common usage
+     *         is for clone/checkout actions.
      */
-    virtual QList<QAction*> actions(const KFileItemList& items) const = 0;
+    virtual QList<QAction*> outOfVersionControlActions(const KFileItemList& items) const = 0;
 
 Q_SIGNALS:
     /**