author | insilmaril |
Thu Nov 23 16:18:26 2006 +0000 (2006-11-23) | |
changeset 407 | 5db8dfd30ea2 |
parent 0 | 7a96bd401351 |
child 408 | c2a05fa925a1 |
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@2 | 5 |
#include <q3canvas.h> |
insilmaril@0 | 6 |
#include <qpainter.h> |
insilmaril@2 | 7 |
//Added by qt3to4: |
insilmaril@2 | 8 |
#include <QPixmap> |
insilmaril@0 | 9 |
|
insilmaril@0 | 10 |
#include "mapobj.h" |
insilmaril@0 | 11 |
|
insilmaril@0 | 12 |
enum ImageType {qimage,qpixmap,undef}; |
insilmaril@0 | 13 |
|
insilmaril@2 | 14 |
class ImageObj: public Q3CanvasRectangle |
insilmaril@0 | 15 |
{ |
insilmaril@0 | 16 |
public: |
insilmaril@2 | 17 |
ImageObj( Q3Canvas *canvas ); |
insilmaril@0 | 18 |
~ImageObj(); |
insilmaril@0 | 19 |
virtual void copy (ImageObj*); |
insilmaril@0 | 20 |
virtual void setVisibility(bool); |
insilmaril@0 | 21 |
void save (const QString &, const char *); |
insilmaril@0 | 22 |
bool load (const QString &); |
insilmaril@0 | 23 |
bool load (QPixmap); |
insilmaril@0 | 24 |
void setImage(QImage img); |
insilmaril@0 | 25 |
QPixmap getPixmap(); |
insilmaril@0 | 26 |
protected: |
insilmaril@0 | 27 |
void drawShape( QPainter & ); |
insilmaril@0 | 28 |
private: |
insilmaril@0 | 29 |
QImage image; |
insilmaril@0 | 30 |
QPixmap pixmap; |
insilmaril@0 | 31 |
ImageType type; |
insilmaril@0 | 32 |
}; |
insilmaril@0 | 33 |
#endif |