The Q3StoredDrag class provides a simple stored-value drag object for arbitrary MIME data. 更多...
| 头: | #include <Q3StoredDrag> |
| 继承: | Q3DragObject |
| 继承者: | Q3ColorDrag and Q3UriDrag |
| Q3StoredDrag (const char * mimeType , QWidget * dragSource = 0, const char * name = 0) | |
| ~Q3StoredDrag () | |
| virtual void | setEncodedData (const QByteArray & data ) |
| virtual QByteArray | encodedData (const char * format ) const |
| virtual const char * | format (int i ) const |
The Q3StoredDrag class provides a simple stored-value drag object for arbitrary MIME data.
When a block of data has only one representation, you can use a Q3StoredDrag to hold it.
For more information about drag and drop, see the Q3DragObject 类和 drag and drop documentation .
构造 Q3StoredDrag 。 dragSource and name 被传递给 Q3DragObject constructor, and the format is set to mimeType .
The data will be unset. Use setEncodedData () to set it.
销毁拖拽对象。
[虚拟]
QByteArray
Q3StoredDrag::
encodedData
(const
char
*
format
) const
重实现自 QMimeSource::encodedData ().
Returns the stored data in the format 给定。
另请参阅 setEncodedData ().
[虚拟]
const
char
* Q3StoredDrag::
format
(
int
i
) const
重实现自 QMimeSource::format ().
[虚拟]
void
Q3StoredDrag::
setEncodedData
(const
QByteArray
&
data
)
Sets the encoded data of this drag object. The encoded data is delivered to drop sites; it must be in a strictly defined and portable format.
The drag object can't be dropped (by the user) until this function has been called.
另请参阅 encodedData ().