.TH "KURLDrag" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KURLDrag \- This class is to be used instead of \fBQUriDrag\fP when using \fBKURL\fP.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kurldrag.h>\fP
.PP
Inherits \fBQUriDrag\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKURLDrag\fP (const  \fBKURL::List\fP &urls, \fBQWidget\fP *dragSource, const  char *name)"
.br
.RI "\fIConstructs an object to drag the list of URLs in \fCurls\fP. \fP"
.ti -1c
.RI "\fBKURLDrag\fP (const  \fBKURL::List\fP &urls, const  \fBQMap\fP< \fBQString\fP, \fBQString\fP > &metaData, \fBQWidget\fP *dragSource, const  char *name)"
.br
.RI "\fIConstructs an object to drag the list of URLs in \fCurls\fP. \fP"
.ti -1c
.RI "\fBQMap\fP< \fBQString\fP, \fBQString\fP > & \fBmetaData\fP ()"
.br
.RI "\fIMeta-data to associate with those URLs (to be used after newDrag). \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKURLDrag\fP * \fBnewDrag\fP (const  \fBKURL::List\fP &urls, \fBQWidget\fP *dragSource=0, const  char *name=0)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP Is equivalent with 'new KURLDrag(urls, dragSource, name)'. \fP"
.ti -1c
.RI "\fBKURLDrag\fP * \fBnewDrag\fP (const  \fBKURL::List\fP &urls, const  \fBQMap\fP< \fBQString\fP, \fBQString\fP > &metaData, \fBQWidget\fP *dragSource=0, const  char *name=0)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP Is equivalent with 'new KURLDrag(urls, metaData, dragSource, name)'. \fP"
.ti -1c
.RI "bool \fBdecode\fP (const  \fBQMimeSource\fP *e, \fBKURL::List\fP &urls)"
.br
.RI "\fIConvenience method that decodes the contents of \fCe\fP into a list of KURLs. \fP"
.ti -1c
.RI "bool \fBdecode\fP (const  \fBQMimeSource\fP *e, \fBKURL::List\fP &urls, \fBQMap\fP< \fBQString\fP, \fBQString\fP > &metaData)"
.br
.RI "\fIConvenience method that decodes the contents of \fCe\fP into a list of KURLs and a set of metadata. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "\fBKURLDrag\fP (const  \fBQStrList\fP &urls, const  \fBQMap\fP< \fBQString\fP, \fBQString\fP > &metaData, \fBQWidget\fP *dragSource, const  char *name)"
.br
.RI "\fIProtected constructor - use \fBnewDrag\fP. \fP"
.ti -1c
.RI "virtual const  char * \fBformat\fP (int i) const "
.br
.ti -1c
.RI "virtual \fBQByteArray\fP \fBencodedData\fP (const  char *mime) const "
.br
.in -1c
.SH "Detailed Description"
.PP 
This class is to be used instead of \fBQUriDrag\fP when using \fBKURL\fP. 

The reason is: \fBQUriDrag\fP (and the XDND/W3C standards) expect URLs to be encoded in UTF-8 (unicode), but \fBKURL\fP uses the current locale by default. The other reasons for using this class are: 
.IP "\(bu" 2
it exports text/plain (for dropping/pasting into lineedits, mails etc.) 
.IP "\(bu" 2
it has support for metadata, shipped as part of the dragobject This is important, for instance to set a correct HTTP referrer (some websites require it for downloading e.g. an image).
.PP
To create a drag object, use \fBKURLDrag::newDrag()\fP with a list of KURLs. To decode a drop, use \fBKURLDrag::decode()\fP or \fBQUriDrag::decodeLocalFiles()\fP. 
.PP
Definition at line 43 of file kurldrag.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KURLDrag::KURLDrag (const \fBKURL::List\fP & urls, \fBQWidget\fP * dragSource, const char * name)"
.PP
Constructs an object to drag the list of URLs in \fCurls\fP. The \fCdragSource\fP and \fCname\fP arguments are passed on to \fBQUriDrag\fP, and the list of urls is converted to UTF-8 before being passed to \fBQUriDrag\fP. 
.PP
\fBParameters:\fP
.RS 4
\fIurls\fP the list of URLs 
.br
\fIdragSource\fP the parent of the \fBQObject\fP 
.br
\fIname\fP the name of the \fBQObject\fP 
.RE
.PP
Definition at line 25 of file kurldrag.cpp.
.PP
References KStdAction::name().
.PP
Referenced by newDrag().
.SS "KURLDrag::KURLDrag (const \fBKURL::List\fP & urls, const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & metaData, \fBQWidget\fP * dragSource, const char * name)"
.PP
Constructs an object to drag the list of URLs in \fCurls\fP. This version also includes metadata. 
.PP
\fBParameters:\fP
.RS 4
\fIurls\fP the list of URLs 
.br
\fImetaData\fP a map containing meta data 
.br
\fIdragSource\fP the parent of the \fBQObject\fP 
.br
\fIname\fP the name of the \fBQObject\fP 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBmetaData()\fP 
.RE
.PP
Definition at line 31 of file kurldrag.cpp.
.PP
References KStdAction::name().
.SS "KURLDrag::KURLDrag (const \fBQStrList\fP & urls, const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & metaData, \fBQWidget\fP * dragSource, const char * name)\fC [inline, protected]\fP"
.PP
Protected constructor - use \fBnewDrag\fP. Definition at line 122 of file kurldrag.h.
.PP
References KStdAction::name().
.SH "Member Function Documentation"
.PP 
.SS "\fBKURLDrag\fP * KURLDrag::newDrag (const \fBKURL::List\fP & urls, \fBQWidget\fP * dragSource = 0, const char * name = 0)\fC [static]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP Is equivalent with 'new KURLDrag(urls, dragSource, name)'. Definition at line 53 of file kurldrag.cpp.
.PP
References KURLDrag(), and KStdAction::name().
.SS "\fBKURLDrag\fP * KURLDrag::newDrag (const \fBKURL::List\fP & urls, const \fBQMap\fP< \fBQString\fP, \fBQString\fP > & metaData, \fBQWidget\fP * dragSource = 0, const char * name = 0)\fC [static]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP Is equivalent with 'new KURLDrag(urls, metaData, dragSource, name)'. Definition at line 58 of file kurldrag.cpp.
.PP
References KURLDrag(), and KStdAction::name().
.SS "\fBQMap\fP<\fBQString\fP, \fBQString\fP>& KURLDrag::metaData ()\fC [inline]\fP"
.PP
Meta-data to associate with those URLs (to be used after newDrag). This is an alternative way of setting the metadata: either use the constructor to pass it all at once, or use drag->\fBmetaData()\fP['key'] = data; 
.PP
\fBSee also:\fP
.RS 4
KIO::TransferJob 
.RE
.PP
Definition at line 88 of file kurldrag.h.
.SS "bool KURLDrag::decode (const \fBQMimeSource\fP * e, \fBKURL::List\fP & urls)\fC [static]\fP"
.PP
Convenience method that decodes the contents of \fCe\fP into a list of KURLs. \fBParameters:\fP
.RS 4
\fIe\fP the mime source 
.br
\fIurls\fP the list of urls will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
Definition at line 64 of file kurldrag.cpp.
.PP
References QValueList< KURL >::append(), and QUriDrag::decode().
.PP
Referenced by decode().
.SS "bool KURLDrag::decode (const \fBQMimeSource\fP * e, \fBKURL::List\fP & urls, \fBQMap\fP< \fBQString\fP, \fBQString\fP > & metaData)\fC [static]\fP"
.PP
Convenience method that decodes the contents of \fCe\fP into a list of KURLs and a set of metadata. You should be using this one, if possible. 
.PP
\fBParameters:\fP
.RS 4
\fIe\fP the mime source 
.br
\fIurls\fP the list of urls will be written here 
.br
\fImetaData\fP the metadata map will be written here 
.RE
.PP
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP
Definition at line 73 of file kurldrag.cpp.
.PP
References decode(), QMimeSource::encodedData(), KStdAccel::key(), QMap::replace(), and QStringList::split().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
