|Q3IconDrag(QWidget * dragSource, const char * name = 0)|
|void||append(const Q3IconDragItem & i, const QRect & pr, const QRect & tr)|
Reimplemented Public Functions
- 9 public functions inherited from Q3DragObject
- 29 public functions inherited from QObject
- 3 public functions inherited from QMimeSource
Static Public Members
|bool||canDecode(QMimeSource * e)|
Additional Inherited Members
- 1 property inherited from QObject
- 1 public slot inherited from QObject
- 1 signal inherited from QObject
- 1 protected function inherited from Q3DragObject
- 8 protected functions inherited from QObject
A Q3IconDrag object is used to maintain information about the positions of dragged items and the data associated with them. Q3IconViews are able to use this information to paint the dragged items in the correct positions. Internally, Q3IconDrag stores the data associated with drag items in Q3IconDragItem objects.
If you want to use the extended drag and drop functionality of Q3IconView, create a Q3IconDrag object in a reimplementation of Q3IconView::dragObject(). Then create a Q3IconDragItem for each item which should be dragged, set the data it represents with Q3IconDragItem::setData(), and add each Q3IconDragItem to the drag object using append().
The data in Q3IconDragItems is stored in a QByteArray and is mime-typed (see QMimeSource and the Drag and Drop overview). If you want to use your own mime-types derive a class from Q3IconDrag and reimplement format(), encodedData() and canDecode().
See also QMimeSource::format().
Member Function Documentation
Q3IconDrag::Q3IconDrag(QWidget * dragSource, const char * name = 0)
Constructs a drag object called name, which is a child of dragSource.
Note that the drag object will be deleted when dragSource is deleted.
void Q3IconDrag::append(const Q3IconDragItem & i, const QRect & pr, const QRect & tr)
See also Q3IconDragItem.
[static] bool Q3IconDrag::canDecode(QMimeSource * e)
Returns true if e can be decoded by the Q3IconDrag, otherwise return false.
[virtual] QByteArray Q3IconDrag::encodedData(const char * mime) const
Reimplemented from QMimeSource::encodedData().
Returns the encoded data of the drag object if mime is application/x-qiconlist.
Reimplemented from QMimeSource::format().
© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.