┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/draganddrophelper.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2008-10-24 22:19:23 +0000
committerPeter Penz <[email protected]>2008-10-24 22:19:23 +0000
commite7bd514a39f0b07ddfec85f5f7b391e16af7d279 (patch)
treeea10c9444acfed8339121c9d884c024445f8067b /src/draganddrophelper.h
parenta96437d600ac1dad74084dff3fcd870cd8eb5024 (diff)
* Move code from DolphinDropController to DragAndDropHelper.
* Move code which checks whether the dragging of a MIME type is supported to DragAndDropHelper. This allows adding an improved support for dropping compressed files from Ark to Dolphin later... CCMAIL: [email protected] svn path=/trunk/KDE/kdebase/apps/; revision=875611
Diffstat (limited to 'src/draganddrophelper.h')
-rw-r--r--src/draganddrophelper.h27
1 files changed, 26 insertions, 1 deletions
diff --git a/src/draganddrophelper.h b/src/draganddrophelper.h
index 64e347e9c..920ff5135 100644
--- a/src/draganddrophelper.h
+++ b/src/draganddrophelper.h
@@ -1,6 +1,6 @@
/***************************************************************************
* Copyright (C) 2007 by Peter Penz <[email protected]> *
- * *
+ * Copyright (C) 2007 by David Faure <[email protected]> * * *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
@@ -23,6 +23,10 @@
#include <QtCore/Qt>
class DolphinController;
+class KFileItem;
+class KUrl;
+class QDropEvent;
+class QMimeData;
class QAbstractItemView;
class QBrush;
class QRect;
@@ -40,11 +44,32 @@ class DragAndDropHelper
public:
/**
+ * Returns true, if Dolphin supports the dragging of
+ * the given mime data.
+ */
+ static bool isMimeDataSupported(const QMimeData* mimeData);
+
+ /**
* Creates a drag object for the view \a itemView for all selected items.
*/
static void startDrag(QAbstractItemView* itemView,
Qt::DropActions supportedActions,
DolphinController* controller = 0);
+
+ /**
+ * 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.
+ * @param event Drop event.
+ * @param widget Source widget where the dragging has been started.
+ */
+ static void dropUrls(const KFileItem& destItem,
+ const KUrl& destPath,
+ QDropEvent* event,
+ QWidget* widget);
};
#endif