#include "imageobj.h" ///////////////////////////////////////////////////////////////// // ImageObj ///////////////////////////////////////////////////////////////// ImageObj::ImageObj( QCanvas *canvas ) : QCanvasRectangle( canvas ) { // cout << "Const ImageObj (canvas)\n"; setZ(Z_ICON); type=undef; } ImageObj::~ImageObj() { // cout << "Destr ImageObj\n"; } void ImageObj::copy(ImageObj* other) { setSize (other->width(), other->height() ); setVisibility (other->isVisible() ); type=other->type; // if (type==qimage) image=other->image; // if (type==qpixmap) pixmap=other->pixmap; } void ImageObj::setVisibility (bool v) { if (v) show(); else hide(); } void ImageObj::save(const QString &fn, const char *format) { switch (type) { case undef: qWarning("Warning: ImageObj::save() type=undef");break; case qimage: image.save (fn,format,-1);break; case qpixmap: pixmap.save (fn,format,-1);break; } } bool ImageObj::load (const QString &fn) { if (!image.load( fn) ) //cout << "Fatal Error in ImageObj::load ("<