1.1 --- a/imageobj.h Tue Jun 06 14:58:11 2006 +0000
1.2 +++ b/imageobj.h Fri Jan 05 11:17:33 2007 +0000
1.3 @@ -1,33 +1,20 @@
1.4 #ifndef IMAGEOBJ_H
1.5 #define IMAGEOBJ_H
1.6
1.7 -#include <qimage.h>
1.8 -#include <q3canvas.h>
1.9 -#include <qpainter.h>
1.10 -//Added by qt3to4:
1.11 -#include <QPixmap>
1.12 +#include <QGraphicsScene>
1.13 +#include <QGraphicsPixmapItem>
1.14
1.15 -#include "mapobj.h"
1.16 -
1.17 -enum ImageType {qimage,qpixmap,undef};
1.18 -
1.19 -class ImageObj: public Q3CanvasRectangle
1.20 +class ImageObj: public QGraphicsPixmapItem
1.21 {
1.22 public:
1.23 - ImageObj( Q3Canvas *canvas );
1.24 + ImageObj( QGraphicsScene *);
1.25 ~ImageObj();
1.26 - virtual void copy (ImageObj*);
1.27 - virtual void setVisibility(bool);
1.28 + void copy (ImageObj*);
1.29 + void setVisibility(bool);
1.30 void save (const QString &, const char *);
1.31 bool load (const QString &);
1.32 - bool load (QPixmap);
1.33 - void setImage(QImage img);
1.34 - QPixmap getPixmap();
1.35 -protected:
1.36 - void drawShape( QPainter & );
1.37 + bool load (const QPixmap &);
1.38 private:
1.39 - QImage image;
1.40 - QPixmap pixmap;
1.41 - ImageType type;
1.42 + QGraphicsScene *mapScene;
1.43 };
1.44 #endif