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) | |
Constructs a color drag with a white color. | |
KColorDrag (const QColor &col, QWidget *dragsource=0, const char *name=0) | |
Constructs a color drag with the color . | |
void | setColor (const QColor &col) |
Sets the color of the drag to col . | |
Static Public Member Functions | |
bool | canDecode (QMimeSource *e) |
Returns true if the MIME source e contains a color object. | |
bool | decode (QMimeSource *e, QColor &col) |
Decodes the MIME source e and puts the resulting color into col . | |
KColorDrag * | makeDrag (const QColor &, QWidget *dragsource) |
This class or method is obsolete, it is provided for compatibility only. This is equivalent with "new KColorDrag(color, dragsource)". | |
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 35 of file kcolordrag.h.
Constructor & Destructor Documentation
|
Constructs a color drag with a white color.
Definition at line 68 of file kcolordrag.cpp. References KStdAccel::name(), and setColor(). Referenced by makeDrag(). |
|
Constructs a color drag with the color
Definition at line 61 of file kcolordrag.cpp. References KStdAccel::name(), and setColor(). |
Member Function Documentation
|
Sets the color of the drag to
Definition at line 75 of file kcolordrag.cpp. References QColor::blue(), QPainter::drawRect(), QPainter::end(), QPixmap::fill(), QColor::green(), QColor::red(), QStoredDrag::setEncodedData(), and QPainter::setPen(). Referenced by KColorDrag(). |
|
Returns true if the MIME source
Definition at line 98 of file kcolordrag.cpp. References QMimeSource::provides(). |
|
Decodes the MIME source
Definition at line 104 of file kcolordrag.cpp. References QMimeSource::encodedData(), and QColor::setRgb(). |
|
This class or method is obsolete, it is provided for compatibility only. This is equivalent with "new KColorDrag(color, dragsource)".
Definition at line 116 of file kcolordrag.cpp. References KColorDrag(). |
The documentation for this class was generated from the following files: