imageobj.h
changeset 408 c2a05fa925a1
parent 2 608f976aa7bb
child 472 83a3be747ad9
     1.1 --- a/imageobj.h	Thu Nov 23 16:18:26 2006 +0000
     1.2 +++ b/imageobj.h	Fri Dec 08 20:18:56 2006 +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