KDE3Support
k3colordrag.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _K3COLORDRAG_H
00021 #define _K3COLORDRAG_H
00022
00023 #include <kde3support_export.h>
00024
00025 #include <Qt3Support/Q3ColorDrag>
00026 #include <QtGui/QColor>
00027
00028 class K3ColorDragPrivate;
00035 class KDE3SUPPORT_EXPORT K3ColorDrag : public Q3StoredDrag {
00036 Q_OBJECT
00037
00038 public:
00042 K3ColorDrag( QWidget *dragsource = 0, const char *name = 0 );
00046 K3ColorDrag( const QColor &col, QWidget *dragsource = 0, const char *name = 0 );
00047 virtual ~K3ColorDrag() {}
00048
00049 virtual const char *format(int i) const;
00050 virtual QByteArray encodedData ( const char * m ) const;
00051
00055 void setColor(const QColor &col);
00059 static bool canDecode(QMimeSource *e);
00063 static bool decode(QMimeSource *e, QColor &col);
00067 static K3ColorDrag* makeDrag( const QColor&,QWidget *dragsource);
00068
00069 private:
00070 QColor m_color;
00071 protected:
00072 virtual void virtual_hook( int id, void* data );
00073 private:
00074 K3ColorDragPrivate *d;
00075 };
00076
00077
00078 #endif // _KCOLORDRAG_H