22 #include "kvcarddrag.h"
24 #include <tdeabc/vcardconverter.h>
26 static const char vcard_mime_string[] =
"text/x-vcard";
28 #if defined(KABC_VCARD_ENCODING_FIX)
33 : TQStoredDrag( vcard_mime_string, dragsource, name )
39 : TQStoredDrag( vcard_mime_string, dragsource, name )
41 #if defined(KABC_VCARD_ENCODING_FIX)
48 #if defined(KABC_VCARD_ENCODING_FIX)
51 setEncodedData( content );
56 setEncodedData( content.utf8() );
62 return e->provides( vcard_mime_string );
65 #if defined(KABC_VCARD_ENCODING_FIX)
71 content = e->encodedData( vcard_mime_string );
80 content = TQString::fromUtf8( e->encodedData( vcard_mime_string ) );
90 #if defined(KABC_VCARD_ENCODING_FIX)
91 addressees = TDEABC::VCardConverter().parseVCardsRaw( e->encodedData( vcard_mime_string ).data() );
93 addressees = TDEABC::VCardConverter().parseVCards( e->encodedData( vcard_mime_string ) );
98 void KVCardDrag::virtual_hook(
int,
void* )
101 #include "kvcarddrag.moc"
KVCardDrag(TQWidget *dragsource=0, const char *name=0)
Constructs an empty vcard drag.
void setVCard(const TQString &content)
Sets the vcard of the drag to content.
static bool canDecode(TQMimeSource *e)
Returns true if the MIME source e contains a vcard object.
static bool decode(TQMimeSource *e, TQString &content)
Decodes the MIME source e and puts the resulting vcard into content.