KColorDrag Class Reference
A drag-and-drop object for colors. More...
#include <kcolordrag.h>
Inheritance diagram for KColorDrag:


| Public Member Functions | |
| KColorDrag (QWidget *dragsource=0, const char *name=0) | |
| KColorDrag (const QColor &col, QWidget *dragsource=0, const char *name=0) | |
| virtual const char * | format (int i) const | 
| virtual QByteArray | encodedData (const char *m) const | 
| void | setColor (const QColor &col) | 
| Static Public Member Functions | |
| bool | canDecode (QMimeSource *e) | 
| bool | decode (QMimeSource *e, QColor &col) | 
| KColorDrag * | makeDrag (const QColor &, QWidget *dragsource) KDE_DEPRECATED | 
| Protected Member Functions | |
| virtual void | virtual_hook (int id, void *data) | 
Detailed Description
A drag-and-drop object for colors.The according MIME type is set to application/x-color.
See the Qt drag'n'drop documentation.
Definition at line 36 of file kcolordrag.h.
Constructor & Destructor Documentation
| 
 | ||||||||||||
| Constructs a color drag with a white color. 
 Definition at line 36 of file kcolordrag.cpp. References setColor(). Referenced by makeDrag(). | 
| 
 | ||||||||||||||||
| 
Constructs a color drag with the color  
 Definition at line 29 of file kcolordrag.cpp. References setColor(). | 
Member Function Documentation
| 
 | 
| 
Sets the color of the drag to  
 Definition at line 43 of file kcolordrag.cpp. References QPainter::drawRect(), QPainter::end(), QPixmap::fill(), QStoredDrag::setEncodedData(), and QPainter::setPen(). Referenced by KColorDrag(). | 
| 
 | 
| 
Returns true if the MIME source  
 Definition at line 79 of file kcolordrag.cpp. References decode(), and QMimeSource::provides(). | 
| 
 | ||||||||||||
| 
Decodes the MIME source  
 Definition at line 92 of file kcolordrag.cpp. References QColorDrag::decode(), QMimeSource::encodedData(), QString::fromLatin1(), QColor::isValid(), QString::length(), and QColor::setNamedColor(). Referenced by canDecode(). | 
| 
 | ||||||||||||
| 
 
 Definition at line 107 of file kcolordrag.cpp. References KColorDrag(). | 
The documentation for this class was generated from the following files:

