Home | All Classes | Main Classes | Annotated | Grouped Classes | Functions

QColorDrag Class Reference

The QColorDrag class provides a drag and drop object for transferring colors between widgets. More...

#include <QColorDrag>

Inherits QStoredDrag.

List of all members.

Writable Properties

Public Functions

Public Slots

Signals

Static Public Members

Protected Functions


Detailed Description

The QColorDrag class provides a drag and drop object for transferring colors between widgets.

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.


Member Function Documentation

QColorDrag::QColorDrag ( const QColor & col, QWidget * dragsource = 0 )

Constructs a color drag object with the given col and dragsource. The dragsource is passed to the QStoredDrag constructor.

QColorDrag::QColorDrag ( QWidget * dragsource = 0 )

Constructs a color drag object with a white color. Passes dragsource to the QStoredDrag constructor.

bool QColorDrag::canDecode ( QMimeSource * source )   [static]

Returns true if the color drag object can decode the MIME source; otherwise returns false.

bool QColorDrag::decode ( QMimeSource * source, QColor & color )   [static]

Decodes the MIME source, and sets the decoded values to the given color.

void QColorDrag::setColor ( const QColor & color )

Sets the color of the color drag.


Copyright © 2004 Trolltech. Trademarks
Qt 4.0.0-tp1