imageobj.h
author insilmaril
Thu, 16 Nov 2006 10:07:11 +0000
changeset 399 190b3a70fabc
parent 2 608f976aa7bb
child 408 c2a05fa925a1
permissions -rw-r--r--
Version 1.8.59: More fixes in undo/redo area
     1 #ifndef IMAGEOBJ_H
     2 #define IMAGEOBJ_H
     3 
     4 #include <qimage.h>
     5 #include <q3canvas.h>
     6 #include <qpainter.h>
     7 //Added by qt3to4:
     8 #include <QPixmap>
     9 
    10 #include "mapobj.h"
    11 
    12 enum ImageType {qimage,qpixmap,undef};
    13 
    14 class ImageObj: public Q3CanvasRectangle
    15 {
    16 public:
    17     ImageObj( Q3Canvas *canvas );
    18     ~ImageObj();
    19 	virtual void copy (ImageObj*);
    20     virtual void setVisibility(bool);
    21 	void save (const QString &, const char *);
    22 	bool load (const QString &);
    23 	bool load (QPixmap);
    24 	void setImage(QImage img);
    25 	QPixmap getPixmap();
    26 protected:
    27     void drawShape( QPainter & );
    28 private:
    29     QImage image;
    30     QPixmap pixmap;
    31 	ImageType type;
    32 };
    33 #endif