X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/85aec92f819eae5a6189bd3ec25cff44dce3ae19..b1c9b5126d:/src/draganddrophelper.h diff --git a/src/draganddrophelper.h b/src/draganddrophelper.h index bf8c0b79d..4859740cd 100644 --- a/src/draganddrophelper.h +++ b/src/draganddrophelper.h @@ -38,7 +38,7 @@ class QWidget; * @brief Helper class for having a common drag and drop behavior. * * The class is used by DolphinIconsView, DolphinDetailsView, - * DolphinColumnView and SidebarTreeView to have a consistent + * DolphinColumnView and PanelTreeView to have a consistent * drag and drop behavior between all views. */ class LIBDOLPHINPRIVATE_EXPORT DragAndDropHelper : public QObject @@ -61,6 +61,12 @@ public: Qt::DropActions supportedActions, DolphinController* controller = 0); + /** + * Returns true if and only if the view \a itemView was the last view to + * be passed to startDrag(...), and that drag is still in progress. + */ + bool isDragSource(QAbstractItemView* itemView); + /** * Handles the dropping of URLs to the given * destination. A context menu with the options @@ -80,6 +86,9 @@ signals: private: DragAndDropHelper(); + // The last view passed in startDrag(...), or 0 if + // no startDrag(...) initiated drag is in progress. + QAbstractItemView *m_dragSource; friend class DragAndDropHelperSingleton; };