Qt Toolkit - QColorDrag Class

| Classes - Annotated - Tree - Functions - Home - Structure

# 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 * )
- bool decode ( QMimeSource *, 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 over the clipboard. It's e.g. used in the QColorDialog.

For detailed information about drag-and-drop, see the QDragObject class.

## Member Function Documentation

### QColorDrag::QColorDrag ( QWidget * dragsource = 0, const char * name = 0 )

Constructs a color drag with a while color.

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

Constructs a color drag with the color col.

### bool QColorDrag::canDecode ( QMimeSource * e ) `[static]`

Returns TRUE, if the color drag object can decode the mime source e.

### 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

Search the documentation, FAQ, qt-interest archive and more (uses www.trolltech.com):

This file is part of the Qt toolkit, copyright © 1995-2000 Trolltech, all rights reserved.