support dragMove

This commit is contained in:
Marco Martin 2012-10-23 13:09:53 +02:00
parent d4ad3e23c3
commit f8e9eeb587
2 changed files with 14 additions and 0 deletions

View File

@ -45,6 +45,12 @@ void DeclarativeDropArea::dragLeaveEvent(QGraphicsSceneDragDropEvent *event)
emit dragLeave(&dde);
}
void DeclarativeDropArea::dragMoveEvent(QGraphicsSceneDragDropEvent *event)
{
DeclarativeDragDropEvent dde(event, this);
emit dragMove(&dde);
}
void DeclarativeDropArea::dropEvent(QGraphicsSceneDragDropEvent *event)
{
DeclarativeDragDropEvent dde(event, this);

View File

@ -57,6 +57,13 @@ Q_SIGNALS:
*/
void dragLeave(DeclarativeDragDropEvent* event);
/**
* Emitted when the mouse cursor dragging something moves over the drag area
* @arg DeclarativeDragDropEvent description of the dragged content
* @see DeclarativeDragDropEvent
*/
void dragMove(DeclarativeDragDropEvent *event);
/**
* Emitted when the user drops something in the area
* @arg DeclarativeDragDropEvent description of the dragged content
@ -69,6 +76,7 @@ Q_SIGNALS:
protected:
void dragEnterEvent(QGraphicsSceneDragDropEvent *event);
void dragLeaveEvent(QGraphicsSceneDragDropEvent *event);
void dragMoveEvent(QGraphicsSceneDragDropEvent *event);
void dropEvent(QGraphicsSceneDragDropEvent *event);
private: