The Q3ColorDrag class provides a drag and drop object for transferring colors between widgets. More...
#include <Q3ColorDrag>
This class is part of the Qt 3 support library. It is provided to keep old source code working. We strongly advise against using it in new code. See Porting to Qt 4 for more information.
Inherits: Q3StoredDrag.
Q3ColorDrag ( const QColor & col, QWidget * dragsource = 0, const char * name = 0 ) | |
Q3ColorDrag ( QWidget * dragsource = 0, const char * name = 0 ) | |
void | setColor ( const QColor & color ) |
bool | canDecode ( QMimeSource * source ) |
bool | decode ( QMimeSource * source, QColor & color ) |
The Q3ColorDrag 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 Q3DragObject class and the drag and drop documentation.
Constructs a color drag object with the given col. Passes dragsource and name to the Q3StoredDrag constructor.
Constructs a color drag object with a white color. Passes dragsource and name to the Q3StoredDrag constructor.
Returns true if the color drag object can decode the MIME source; otherwise returns false.
Decodes the MIME source, and sets the decoded values to the given color. Returns true if the decoding is successful. Returns false if the size of the encoded data is not the expected size.
Sets the color of the color drag.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.