/* * MathPlanner 3.1 - Mathematical design tool. * Copyright(C) 2002 Jarmo Nikkanen * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation. * * You should have received a copy of the GNU General Public License with this program. * */ #ifndef _MATHPLANNER_DRAGDROP_H #define _MATHPLANNER_DRAGDROP_H #include #include #include #include #include #include #include "Frame.h" class DataStorage; class ApplicationControl; class Paper; class DataDragObject : public QDragObject { class DataStorage *datastore; public: DataDragObject(class DataStorage *,QWidget *w=NULL); ~DataDragObject(); QByteArray encodedData(const char *) const; const char *format(int x=0) const; static class DataStorage *Decode(QMimeSource *); static bool canDecode(QMimeSource *); }; class MathDragObject : public QDragObject { class DataStorage *datastore; QImage image; QPicture pic; public: MathDragObject(QWidget *w=NULL,class MathFrame *f=NULL); ~MathDragObject(); QByteArray encodedData(const char *) const; const char *format(int x=0) const; static class DataStorage *Decode(QMimeSource *); static bool canDecode(QMimeSource *); }; class ImageDragObject : public QDragObject { QImage image; public: ImageDragObject(QImage,QWidget *w=NULL,const char *name=NULL); ImageDragObject(QWidget *w=NULL,const char *name=NULL); ~ImageDragObject(); QByteArray encodedData(const char *) const; const char *format(int x=0) const; static QImage Decode(QMimeSource *); static QImage Decode(QByteArray,const char *); static bool canDecode(QMimeSource *); }; class QPictureDragObject : public QDragObject { QByteArray array; public: QPictureDragObject(QPicture *,QWidget *w=NULL,const char *name=NULL); QPictureDragObject(QWidget *w=NULL,const char *name=NULL); ~QPictureDragObject(); QByteArray encodedData(const char *) const; const char *format(int x=0) const; static QPicture *Decode(QMimeSource *); static QPicture *Decode(QByteArray); static bool canDecode(QMimeSource *); }; #endif