QColorDrag Class Reference
The QColorDrag class provides a drag and drop object for
transferring colors.
More...
#include <qdragobject.h>
Inherits QStoredDrag.
List of all member functions.
Public Members
- QColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 )
- QColorDrag ( QWidget * dragsource = 0, const char * name = 0 )
- void setColor ( const QColor & col )
Static Public Members
- bool canDecode ( QMimeSource * e )
- bool decode ( QMimeSource * e, QColor & col )
Detailed Description
The QColorDrag class provides a drag and drop object for
transferring colors.
This class provides a drag object which can be used to transfer data
about colors for drag and drop and in the clipboard. For example, it
is used in QColorDialog.
The color is set in the constructor but can be changed with
setColor().
For more information about drag and drop, see the QDragObject class
and the drag and drop documentation.
See also Drag And Drop Classes.
Member Function Documentation
QColorDrag::QColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 )
Constructs a color drag object with the color col. Passes dragsource and name to the QStoredDrag constructor.
QColorDrag::QColorDrag ( QWidget * dragsource = 0, const char * name = 0 )
Constructs a color drag object with a white color. Passes dragsource and name to the QStoredDrag constructor.
bool QColorDrag::canDecode ( QMimeSource * e ) [static]
Returns TRUE if the color drag object can decode the mime source
e; otherwise returns FALSE.
bool QColorDrag::decode ( QMimeSource * e, QColor & col ) [static]
Decodes the mime source e and sets the decoded values to col.
void QColorDrag::setColor ( const QColor & col )
Sets the color of the color drag to col.
This file is part of the Qt toolkit.
Copyright © 1995-2007
Trolltech. All Rights Reserved.