KDE3Support
Go to the documentation of this file.
22 #include <QtGui/QPainter>
43 Q3ColorDrag tmp(color, 0, 0);
46 QPixmap colorpix( 25, 20);
47 colorpix.fill( color);
48 QPainter p( &colorpix );
49 p.setPen( Qt::black );
50 p.drawRect(0,0,25,20);
52 setPixmap(colorpix,
QPoint(-5,-7));
60 return Q3StoredDrag::format(i);
68 Q3ColorDrag::decode(const_cast<K3ColorDrag *>(
this), color);
69 QByteArray result = color.name().toLatin1();
70 result.resize(result.length());
73 return Q3StoredDrag::encodedData(m);
92 if (Q3ColorDrag::decode(e, color))
96 QString colorName = QString::fromLatin1(data.data(), data.size());
97 if ((colorName.length() < 4) || (colorName[0] !=
'#'))
99 color.setNamedColor(colorName);
100 return color.isValid();
113 #include "k3colordrag.moc"
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jun 1 2013 20:23:03 by
doxygen 1.8.3.1 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.