1QTextDrag(3qt)                                                  QTextDrag(3qt)
2
3
4

NAME

6       QTextDrag - Drag and drop object for transferring plain and Unicode
7       text
8

SYNOPSIS

10       #include <qdragobject.h>
11
12       Inherits QDragObject.
13
14   Public Members
15       QTextDrag ( const QString & text, QWidget * dragSource = 0, const char
16           * name = 0 )
17       QTextDrag ( QWidget * dragSource = 0, const char * name = 0 )
18       ~QTextDrag ()
19       virtual void setText ( const QString & text )
20       virtual void setSubtype ( const QCString & st )
21
22   Static Public Members
23       bool canDecode ( const QMimeSource * e )
24       bool decode ( const QMimeSource * e, QString & str )
25       bool decode ( const QMimeSource * e, QString & str, QCString & subtype
26           )
27

DESCRIPTION

29       The QTextDrag class is a drag and drop object for transferring plain
30       and Unicode text.
31
32       Plain text is passed in a QString which may contain multiple lines
33       (i.e. may contain newline characters). The drag target will receive the
34       newlines according to the runtime environment, e.g. LF on Unix, and
35       CRLF on Windows.
36
37       Qt provides no built-in mechanism for delivering only a single-line.
38
39       For more information about drag and drop, see the QDragObject class and
40       the drag and drop documentation.
41
42       See also Drag And Drop Classes.
43

MEMBER FUNCTION DOCUMENTATION

QTextDrag::QTextDrag ( const QString & text, QWidget * dragSource = 0, const

46       char * name = 0 )
47       Constructs a text drag object and sets its data to text. dragSource
48       must be the drag source; name is the object name.
49

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

51       Constructs a default text drag object. dragSource must be the drag
52       source; name is the object name.
53

QTextDrag::~QTextDrag ()

55       Destroys the text drag object and frees up all allocated resources.
56

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

58       Returns TRUE if the information in e can be decoded into a QString;
59       otherwise returns FALSE.
60
61       See also decode().
62
63       Example: iconview/simple_dd/main.cpp.
64

bool QTextDrag::decode ( const QMimeSource * e, QString & str ) [static]

66       Attempts to decode the dropped information in e into str. Returns TRUE
67       if successful; otherwise returns FALSE.
68
69       See also canDecode().
70
71       Example: iconview/simple_dd/main.cpp.
72

bool QTextDrag::decode ( const QMimeSource * e, QString & str, QCString &

74       subtype ) [static]
75       This is an overloaded member function, provided for convenience. It
76       behaves essentially like the above function.
77
78       Attempts to decode the dropped information in e into str. Returns TRUE
79       if successful; otherwise returns FALSE. If subtype is null, any text
80       subtype is accepted; otherwise only the specified subtype is accepted.
81
82       See also canDecode().
83

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

85       Sets the MIME subtype of the text being dragged to st. The default
86       subtype is "plain", so the default MIME type of the text is
87       "text/plain". You might use this to declare that the text is"
88       text/html" by calling setSubtype("html").
89

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

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

SEE ALSO

96       http://doc.trolltech.com/qtextdrag.html
97       http://www.trolltech.com/faq/tech.html
98
100       Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
101       license file included in the distribution for a complete license
102       statement.
103

AUTHOR

105       Generated automatically from the source code.
106

BUGS

108       If you find a bug in Qt, please report it as described in
109       http://doc.trolltech.com/bughowto.html.  Good bug reports help us to
110       help you. Thank you.
111
112       The definitive Qt documentation is provided in HTML format; it is
113       located at $QTDIR/doc/html and can be read using Qt Assistant or with a
114       web browser. This man page is provided as a convenience for those users
115       who prefer man pages, although this format is not officially supported
116       by Trolltech.
117
118       If you find errors in this manual page, please report them to qt-
119       bugs@trolltech.com.  Please include the name of the manual page
120       (qtextdrag.3qt) and the Qt version (3.3.8).
121
122
123
124Trolltech AS                    2 February 2007                 QTextDrag(3qt)
Impressum