author | insilmaril |
Wed Mar 15 13:53:53 2006 +0000 (2006-03-15) | |
changeset 248 | 30a4b721cffd |
child 2 | 608f976aa7bb |
permissions | -rw-r--r-- |
insilmaril@0 | 1 |
#ifndef IMAGEOBJ_H |
insilmaril@0 | 2 |
#define IMAGEOBJ_H |
insilmaril@0 | 3 |
|
insilmaril@0 | 4 |
#include <qimage.h> |
insilmaril@0 | 5 |
#include <qcanvas.h> |
insilmaril@0 | 6 |
#include <qpainter.h> |
insilmaril@0 | 7 |
|
insilmaril@0 | 8 |
#include "mapobj.h" |
insilmaril@0 | 9 |
|
insilmaril@0 | 10 |
enum ImageType {qimage,qpixmap,undef}; |
insilmaril@0 | 11 |
|
insilmaril@0 | 12 |
class ImageObj: public QCanvasRectangle |
insilmaril@0 | 13 |
{ |
insilmaril@0 | 14 |
public: |
insilmaril@0 | 15 |
ImageObj( QCanvas *canvas ); |
insilmaril@0 | 16 |
~ImageObj(); |
insilmaril@0 | 17 |
virtual void copy (ImageObj*); |
insilmaril@0 | 18 |
virtual void setVisibility(bool); |
insilmaril@0 | 19 |
void save (const QString &, const char *); |
insilmaril@0 | 20 |
bool load (const QString &); |
insilmaril@0 | 21 |
bool load (QPixmap); |
insilmaril@0 | 22 |
void setImage(QImage img); |
insilmaril@0 | 23 |
QPixmap getPixmap(); |
insilmaril@0 | 24 |
protected: |
insilmaril@0 | 25 |
void drawShape( QPainter & ); |
insilmaril@0 | 26 |
private: |
insilmaril@0 | 27 |
QImage image; |
insilmaril@0 | 28 |
QPixmap pixmap; |
insilmaril@0 | 29 |
ImageType type; |
insilmaril@0 | 30 |
}; |
insilmaril@0 | 31 |
#endif |