.TH "KColorDrag" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KColorDrag \- A drag-and-drop object for colors.  

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

.in +1c
.ti -1c
.RI "\fBKColorDrag\fP (\fBQWidget\fP *dragsource=0, const char *name=0)"
.br
.ti -1c
.RI "\fBKColorDrag\fP (const \fBQColor\fP &col, \fBQWidget\fP *dragsource=0, const char *name=0)"
.br
.ti -1c
.RI "virtual const char * \fBformat\fP (int i) const "
.br
.ti -1c
.RI "virtual \fBQByteArray\fP \fBencodedData\fP (const char *m) const "
.br
.ti -1c
.RI "void \fBsetColor\fP (const \fBQColor\fP &col)"
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static bool \fBcanDecode\fP (\fBQMimeSource\fP *e)"
.br
.ti -1c
.RI "static bool \fBdecode\fP (\fBQMimeSource\fP *e, \fBQColor\fP &col)"
.br
.ti -1c
.RI "static \fBKColorDrag\fP * \fBmakeDrag\fP (const \fBQColor\fP &, \fBQWidget\fP *dragsource) KDE_DEPRECATED"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A drag-and-drop object for colors. 

The according MIME type is set to application/x-color.
.PP
See the \fBQt\fP drag'n'drop documentation. 
.PP
Definition at line 36 of file kcolordrag.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KColorDrag::KColorDrag (\fBQWidget\fP * dragsource = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs a color drag with a white color. 
.PP
Definition at line 33 of file kcolordrag.cpp.
.PP
References setColor().
.PP
Referenced by makeDrag().
.SS "KColorDrag::KColorDrag (const \fBQColor\fP & col, \fBQWidget\fP * dragsource = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs a color drag with the color \fCcol\fP. 
.PP
Definition at line 26 of file kcolordrag.cpp.
.PP
References setColor().
.SH "Member Function Documentation"
.PP 
.SS "void KColorDrag::setColor (const \fBQColor\fP & col)"
.PP
Sets the color of the drag to \fCcol\fP. 
.PP
Definition at line 40 of file kcolordrag.cpp.
.PP
References QPainter::drawRect(), QPainter::end(), QPixmap::fill(), QStoredDrag::setEncodedData(), and QPainter::setPen().
.PP
Referenced by KColorDrag().
.SS "bool KColorDrag::canDecode (\fBQMimeSource\fP * e)\fC [static]\fP"
.PP
Returns true if the MIME source \fCe\fP contains a color object. 
.PP
Definition at line 76 of file kcolordrag.cpp.
.PP
References decode().
.SS "bool KColorDrag::decode (\fBQMimeSource\fP * e, \fBQColor\fP & col)\fC [static]\fP"
.PP
Decodes the MIME source \fCe\fP and puts the resulting color into \fCcol\fP. 
.PP
Definition at line 89 of file kcolordrag.cpp.
.PP
References QString::fromLatin1(), and QString::length().
.PP
Referenced by canDecode().
.SS "\fBKColorDrag\fP * KColorDrag::makeDrag (const \fBQColor\fP &, \fBQWidget\fP * dragsource)\fC [static]\fP"
.PP
\fBDeprecated\fP
.RS 4
This is equivalent with 'new KColorDrag(color, dragsource)'. 
.RE
.PP

.PP
Definition at line 104 of file kcolordrag.cpp.
.PP
References KColorDrag().

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