1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/imageobj.h Wed Feb 15 12:54:55 2006 +0000
1.3 @@ -0,0 +1,31 @@
1.4 +#ifndef IMAGEOBJ_H
1.5 +#define IMAGEOBJ_H
1.6 +
1.7 +#include <qimage.h>
1.8 +#include <qcanvas.h>
1.9 +#include <qpainter.h>
1.10 +
1.11 +#include "mapobj.h"
1.12 +
1.13 +enum ImageType {qimage,qpixmap,undef};
1.14 +
1.15 +class ImageObj: public QCanvasRectangle
1.16 +{
1.17 +public:
1.18 + ImageObj( QCanvas *canvas );
1.19 + ~ImageObj();
1.20 + virtual void copy (ImageObj*);
1.21 + virtual void setVisibility(bool);
1.22 + void save (const QString &, const char *);
1.23 + bool load (const QString &);
1.24 + bool load (QPixmap);
1.25 + void setImage(QImage img);
1.26 + QPixmap getPixmap();
1.27 +protected:
1.28 + void drawShape( QPainter & );
1.29 +private:
1.30 + QImage image;
1.31 + QPixmap pixmap;
1.32 + ImageType type;
1.33 +};
1.34 +#endif