Eneboo - Documentación para desarrolladores
Métodos públicos | Métodos públicos estáticos
Referencia de la Clase QTextDrag

The QTextDrag class is a drag and drop object for transferring plain and Unicode text. Más...

#include <qdragobject.h>

Diagrama de herencias de QTextDrag
QDragObject QDragObject QMimeSource QObject QMimeSource QObject QMimeSource QObject QMimeSource QObject QRichTextDrag

Lista de todos los miembros.

Métodos públicos

 QTextDrag (const QString &, QWidget *dragSource=0, const char *name=0)
 QTextDrag (QWidget *dragSource=0, const char *name=0)
 ~QTextDrag ()
virtual void setText (const QString &)
virtual void setSubtype (const QCString &)
const char * format (int i) const
virtual QByteArray encodedData (const char *) const
 QTextDrag (const QString &, QWidget *dragSource=0, const char *name=0)
 QTextDrag (QWidget *dragSource=0, const char *name=0)
 ~QTextDrag ()
virtual void setText (const QString &)
virtual void setSubtype (const QCString &)
const char * format (int i) const
virtual QByteArray encodedData (const char *) const

Métodos públicos estáticos

static bool canDecode (const QMimeSource *e)
static bool decode (const QMimeSource *e, QString &s)
static bool decode (const QMimeSource *e, QString &s, QCString &subtype)
static bool canDecode (const QMimeSource *e)
static bool decode (const QMimeSource *e, QString &s)
static bool decode (const QMimeSource *e, QString &s, QCString &subtype)

Descripción detallada

The QTextDrag class is a drag and drop object for transferring plain and Unicode text.

Plain text is passed in a QString which may contain multiple lines (i.e. may contain newline characters). The drag target will receive the newlines according to the runtime environment, e.g. LF on Unix, and CRLF on Windows.

Qt provides no built-in mechanism for delivering only a single-line.

For more information about drag and drop, see the QDragObject class and the drag and drop documentation.


Documentación del constructor y destructor

QTextDrag::QTextDrag ( const QString text,
QWidget dragSource = 0,
const char *  name = 0 
)

Constructs a text drag object and sets its data 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.

QTextDrag::QTextDrag ( const QString ,
QWidget dragSource = 0,
const char *  name = 0 
)
QTextDrag::QTextDrag ( QWidget dragSource = 0,
const char *  name = 0 
)
QTextDrag::~QTextDrag ( )

Documentación de las funciones miembro

bool QTextDrag::canDecode ( const QMimeSource e) [static]

Returns TRUE if the information in e can be decoded into a QString; otherwise returns FALSE.

Ver también:
decode()
static bool QTextDrag::canDecode ( const QMimeSource e) [static]
static bool QTextDrag::decode ( const QMimeSource e,
QString s 
) [static]
static bool QTextDrag::decode ( const QMimeSource e,
QString s,
QCString subtype 
) [static]
bool QTextDrag::decode ( const QMimeSource e,
QString str 
) [static]

Attempts to decode the dropped information in e into str. Returns TRUE if successful; otherwise returns FALSE.

Ver también:
canDecode()
bool QTextDrag::decode ( const QMimeSource e,
QString str,
QCString subtype 
) [static]

Esta es una función miembro sobrecargada que se suministra por conveniencia. Difiere de la anterior función solamente en los argumentos que acepta. Attempts to decode the dropped information in e into str. Returns TRUE if successful; otherwise returns FALSE. If subtype is null, any text subtype is accepted; otherwise only the specified subtype is accepted.

Ver también:
canDecode()
QByteArray QTextDrag::encodedData ( const char *  mime) const [virtual]

Implementa QMimeSource.

Reimplementado en QRichTextDrag.

virtual QByteArray QTextDrag::encodedData ( const char *  ) const [virtual]

Returns the encoded data of this object in the specified MIME format.

Subclasses must reimplement this function.

Implementa QMimeSource.

Reimplementado en QRichTextDrag.

const char * QTextDrag::format ( int  i) const [virtual]

Implementa QMimeSource.

Reimplementado en QRichTextDrag.

const char* QTextDrag::format ( int  i) const [virtual]

Returns the {i}-th supported MIME format, or 0.

Implementa QMimeSource.

Reimplementado en QRichTextDrag.

virtual void QTextDrag::setSubtype ( const QCString ) [virtual]
void QTextDrag::setSubtype ( const QCString st) [virtual]

Sets the MIME subtype of the text being dragged to st. 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").

virtual void QTextDrag::setText ( const QString ) [virtual]
void QTextDrag::setText ( const QString text) [virtual]

Sets the text to be dragged to text. You will need to call this if you did not pass the text during construction.


La documentación para esta clase fue generada a partir de los siguientes ficheros:
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'