QTextDrag Class Reference
The QTextDrag class is a drag-and-drop object for
transferring plain and Unicode text.
More...
#include <qdragobject.h>
Inherits QDragObject.
List of all member functions.
Public Members
QTextDrag ( const QString & text, QWidget * dragSource = 0, const char * name = 0 )
QTextDrag ( QWidget * dragSource = 0, const char * name = 0 )
virtual void
setText ( const QString & text )
Static Public Members
bool
decode ( const QMimeSource * e, QString & str )
bool
decode ( const QMimeSource * e, QString & str, QCString & subtype )
Detailed Description
The QTextDrag class is a drag-and-drop object for
transferring plain and Unicode text.
Plain text is single- or multi-line 8-bit text in the local encoding.
Qt provides no built-in mechanism for delivering only single-line.
Drag-and-Drop text does not have a NULL terminator when it
is dropped onto the target.
For detailed information about drag-and-drop, see the QDragObject class.
Member Function Documentation
QTextDrag::QTextDrag ( const QString & text, QWidget * dragSource = 0, const char * name = 0 )
Constructs a text drag object and sets it to text. dragSource
must be the drag source; name is the object name.
QTextDrag::QTextDrag ( QWidget * dragSource = 0, const char * name = 0 )
Constructs a default text drag object. dragSource must be the drag
source; name is the object name.
QTextDrag::~QTextDrag ()
Destroys the text drag object and frees up all allocated resources.
bool QTextDrag::canDecode ( const QMimeSource * e ) [static]
Returns TRUE if the information in e can be decoded into a QString.
See also decode().
bool QTextDrag::decode ( const QMimeSource * e, QString & str ) [static]
Attempts to decode the dropped information in e
into str, returning TRUE if successful.
See also canDecode().
bool QTextDrag::decode ( const QMimeSource * e, QString & str, QCString & subtype ) [static]
Attempts to decode the dropped information in e
into str, returning TRUE if successful. If subtype is null,
any text subtype is accepted; otherwise only that specified is
accepted. subtype is set to the accepted subtype.
See also canDecode().
void QTextDrag::setSubtype ( const QCString & st ) [virtual]
Sets the MIME subtype of the text being dragged. The default subtype
is "plain", so the default MIME type of the text is "text/plain". You
might use this to declare that the text is "text/html" by calling
setSubtype("html").
void QTextDrag::setText ( const QString & text ) [virtual]
Sets the text to be dragged. You will need to call this if you did
not pass the text during construction.
Search the documentation, FAQ, qt-interest archive and more (uses
www.trolltech.com):
This file is part of the Qt toolkit,
copyright © 1995-2001
Trolltech, all rights reserved.
Copyright © 2001 Trolltech | Trademarks
| Qt version 3.0.0-beta1-beta1
|