The QIconDrag is the drag object which is used for moving items in the iconview More...
#include <qiconview.h>
Inherits QDragObject.
The QIconDrag is the drag object which is used for moving items in the iconview. The QIconDrag stores exact informations about the positions of the items, which are dragged, so that each iconview is able to draw drag shapes in correct positions.
It's suggested that, if you write a drag object for own QIconViewItems, you derive the drag object class from QIconDrag and just (re)implement the methods which are needed for encoding/decoding your data and the mimetype handling. Because if you do this, the position information will be stored in the drag object too.
An example, how to implement this, is in the QtFileIconView example (qt/examples/qfileiconview/qfileiconview.h and qt/examples/qfileiconview/qfileiconview.cpp).
Reimplemented for internal reasons; the API is not affected.
Constructs a icon dragobject which contains a list of icons (list of QIconDragItems). dragSource is the widget which started the dragand name the name of the object.
See also: QIconDragItem.
[virtual]
Destructor.
Appends an icon drag item which should be stored in this dragobject.
See also: QIconDragItem.
[static]
Returns TRUE if e can be decoded by the QIconDrag, else FALSE.
[static]
Decodes the data which is stored (endocded) in e and if successful, fills the list of icon drag items with the decoded data.
[virtual]
Returns the encoded data of the drag object if mime is application/x-qiconlist.
[virtual]
Reimplemented for internal reasons; the API is not affected.
Sets the list of icon drag items which should be stored in this dragobject.
See also: QIconDragItem.
Search the documentation, FAQ, qt-interest archive and more (uses
www.troll.no):
This file is part of the Qt toolkit, copyright © 1995-2000 Troll Tech, all rights reserved.
Copyright © 2000 Troll Tech | Trademarks | Qt version 2.1.0 (pre-release)
|