.TH "KColorDrag" 3 "28 Jan 2004" "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
.RI "\fIConstructs a color drag with a white color. \fP"
.ti -1c
.RI "\fBKColorDrag\fP (const  \fBQColor\fP &col, \fBQWidget\fP *dragsource=0, const  char *name=0)"
.br
.RI "\fIConstructs a color drag with the color \fC\fP. \fP"
.ti -1c
.RI "void \fBsetColor\fP (const  \fBQColor\fP &col)"
.br
.RI "\fISets the color of the drag to \fCcol\fP. \fP"
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "bool \fBcanDecode\fP (\fBQMimeSource\fP *e)"
.br
.RI "\fIReturns true if the MIME source \fCe\fP contains a color object. \fP"
.ti -1c
.RI "bool \fBdecode\fP (\fBQMimeSource\fP *e, \fBQColor\fP &col)"
.br
.RI "\fIDecodes the MIME source \fCe\fP and puts the resulting color into \fCcol\fP. \fP"
.ti -1c
.RI "\fBKColorDrag\fP * \fBmakeDrag\fP (const  \fBQColor\fP &, \fBQWidget\fP *dragsource)"
.br
.RI "\fI\fBThis class or method is obsolete, it is provided for compatibility only.\fP This is equivalent with 'new KColorDrag(color, dragsource)'. \fP"
.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 35 of file kcolordrag.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KColorDrag::KColorDrag (\fBQWidget\fP * dragsource = 0, const char * name = 0)"
.PP
Constructs a color drag with a white color. Definition at line 68 of file kcolordrag.cpp.
.PP
References KStdAccel::name(), and setColor().
.PP
Referenced by makeDrag().
.SS "KColorDrag::KColorDrag (const \fBQColor\fP & col, \fBQWidget\fP * dragsource = 0, const char * name = 0)"
.PP
Constructs a color drag with the color \fC\fP. Definition at line 61 of file kcolordrag.cpp.
.PP
References KStdAccel::name(), and setColor().
.SH "Member Function Documentation"
.PP 
.SS "void KColorDrag::setColor (const \fBQColor\fP & col)"
.PP
Sets the color of the drag to \fCcol\fP. Definition at line 75 of file kcolordrag.cpp.
.PP
References QColor::blue(), QPainter::drawRect(), QPainter::end(), QPixmap::fill(), QColor::green(), QColor::red(), 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. Definition at line 98 of file kcolordrag.cpp.
.PP
References QMimeSource::provides().
.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. Definition at line 104 of file kcolordrag.cpp.
.PP
References QMimeSource::encodedData(), and QColor::setRgb().
.SS "\fBKColorDrag\fP * KColorDrag::makeDrag (const \fBQColor\fP &, \fBQWidget\fP * dragsource)\fC [static]\fP"
.PP
\fBThis class or method is obsolete, it is provided for compatibility only.\fP This is equivalent with 'new KColorDrag(color, dragsource)'. Definition at line 116 of file kcolordrag.cpp.
.PP
References KColorDrag().

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