]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/draganddrophelper.h
Merge remote-tracking branch 'origin/KDE/4.10'
[dolphin.git] / src / views / draganddrophelper.h
index d00e111579c3abb6748f40b42f2abcc3f2963f84..eda5fc5c268fb1daa7322cdf5e88ffe778892f6c 100644 (file)
@@ -29,24 +29,33 @@ class KFileItem;
 class KUrl;
 class QDropEvent;
 class QWidget;
+class KonqOperations;
 
 class LIBDOLPHINPRIVATE_EXPORT DragAndDropHelper
 {
 public:
     /**
-     * Handles the dropping of URLs to the given
-     * destination. A context menu with the options
-     * 'Move Here', 'Copy Here', 'Link Here' and
-     * 'Cancel' is offered to the user.
-     * @param destItem  Item of the destination (can be null, see KFileItem::isNull()).
-     * @param destPath  Path of the destination.
+     * Handles the dropping of URLs to the given destination. A context menu
+     * with the options 'Move Here', 'Copy Here', 'Link Here' and 'Cancel' is
+     * offered to the user. The drag destination must represent a directory or
+     * a desktop-file, otherwise the dropping gets ignored.
+     *
+     * @param destItem  Item of the destination. Can be 0 (KFileItem::isNull()) if
+     *                  no file-item is available for the destination. In this case
+     *                  destUrl is used as fallback. For performance reasons it is
+     *                  recommended to pass a file-item if available.
+     * @param destUrl   URL of the item destination. Is used only if destItem::isNull()
+     *                  is true.
      * @param event     Drop event.
-     * @return          Error message if dropping is not possible. If an empty string
-     *                  is returned, the dropping has been successful.
+     * @param error     Error message intended to be shown for users if dropping is not
+     *                  possible. If an empty string is returned, the dropping has been
+     *                  successful.
+     * @return          KonqOperations pointer
      */
-    static QString dropUrls(const KFileItem& destItem,
-                            const KUrl& destPath,
-                            QDropEvent* event);
+    static KonqOperations* dropUrls(const KFileItem& destItem,
+                                    const KUrl& destUrl,
+                                    QDropEvent* event,
+                                    QString& error);
 };
 
 #endif