Provides information about a ListItem drag event.
|Import Statement:||import Ubuntu.Components 1.3|
The object cannot be instantiated and it is passed as parameter to ViewItems::dragUpdated attached signal. Developer can decide whether to accept or restrict the dragging event based on the input provided by this event.
The direction of the drag can be found via the status property and the source and destination the drag can be applied via from and to properties. The allowed directions can be configured through minimumIndex and maximumIndex properties, and the event acceptance through accept property. If the event is not accepted, the drag action will be considered as cancelled.
|accept : bool|
The property can be used to dismiss the event. By default its value is true, meaning the drag event is accepted. The value of false blocks the drag event to be handled by the ListItem’s dragging mechanism.
|[read-only] from : int|
Specifies the source index the ListItem is dragged from.
|maximumIndex : int|
|minimumIndex : int|
These properties configure the minimum and maximum indexes the item can be dragged. The properties can be set in ViewItems::dragUpdated signal. A negative value means no restriction defined on the dragging interval side.
|[read-only] status : enum|
The property provides information about the status of the drag. Its value can be one of the following:
- ListItemDrag.Started - indicates that the dragging is about to start, giving opportunities to define restrictions on the dragging indexes, like minimumIndex, maximumIndex
- ListItemDrag.Moving - the dragged item is moved upwards or downwards in the ListItem
- ListItemDrag.Dropped - indicates that the drag event is finished, and the dragged item is about to be dropped to the given position.
|[read-only] to : int|
Specifies the index the ListItem is dragged to or dropped.