kdeui Library API Documentation

KColorDrag Class Reference

A drag-and-drop object for colors. More...

#include <kcolordrag.h>

Inheritance diagram for KColorDrag:

QStoredDrag List of all members.

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)
KColorDragmakeDrag (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

KColorDrag::KColorDrag QWidget dragsource = 0,
const char *  name = 0
 

Constructs a color drag with a white color.

Definition at line 36 of file kcolordrag.cpp.

References KColorDrag(), and setColor().

Referenced by KColorDrag().

KColorDrag::KColorDrag const QColor col,
QWidget dragsource = 0,
const char *  name = 0
 

Constructs a color drag with the color col.

Definition at line 29 of file kcolordrag.cpp.

References KColorDrag(), and setColor().


Member Function Documentation

void KColorDrag::setColor const QColor col  ) 
 

Sets the color of the drag to col.

Definition at line 43 of file kcolordrag.cpp.

References setColor().

Referenced by KColorDrag(), and setColor().

bool KColorDrag::canDecode QMimeSource e  )  [static]
 

Returns true if the MIME source e contains a color object.

Definition at line 79 of file kcolordrag.cpp.

References canDecode(), and decode().

Referenced by canDecode().

bool KColorDrag::decode QMimeSource e,
QColor col
[static]
 

Decodes the MIME source e and puts the resulting color into col.

Definition at line 92 of file kcolordrag.cpp.

References decode().

Referenced by canDecode(), and decode().

KColorDrag * KColorDrag::makeDrag const QColor ,
QWidget dragsource
[static]
 

Deprecated:
This is equivalent with "new KColorDrag(color, dragsource)".

Definition at line 107 of file kcolordrag.cpp.

References makeDrag().

Referenced by makeDrag().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdeui Library Version 3.2.3.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 8 11:14:31 2004 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003