diff -r 325958acb69b -r 494e8f40f0f7 floatimageobj.cpp --- a/floatimageobj.cpp Mon Oct 10 11:20:25 2005 +0000 +++ b/floatimageobj.cpp Tue Jan 03 09:44:41 2006 +0000 @@ -6,7 +6,7 @@ // FloatImageObj ///////////////////////////////////////////////////////////////// -int FloatImageObj::counter=0; // make instance +uint FloatImageObj::saveCounter=0; // make instance FloatImageObj::FloatImageObj ():FloatObj() @@ -43,6 +43,7 @@ icon->move (absPos.x(), absPos.y() ); icon->setVisibility (true); bbox.setSize (QSize(icon->size().width(), icon->size().height())); + clickBox.setSize (QSize(icon->size().width(), icon->size().height())); filename=""; originalFilename="no original name available"; filetype=""; @@ -53,7 +54,9 @@ { FloatObj::copy (other); icon->copy (other->icon); + filetype=other->filetype; filename=other->filename; + originalFilename=other->originalFilename; saveInMap=other->saveInMap; positionBBox(); } @@ -73,6 +76,7 @@ { icon->load(pixmap); bbox.setSize (QSize(icon->size().width()+8, icon->size().height()+8)); + clickBox.setSize (QSize(icon->size().width()+8, icon->size().height()+8)); positionBBox(); filetype="PNG"; filename="noname.png"; @@ -130,7 +134,7 @@ void FloatImageObj::positionBBox() { - // TODO + clickBox=bbox; } void FloatImageObj::calcBBoxSize() @@ -140,12 +144,14 @@ QString FloatImageObj::saveToDir (const QString &tmpdir,const QString &prefix, const QPoint &p) { - counter++; + saveCounter++; QString posAttr= attribut("relPosX",QString().setNum(relPos.x(),10)) + attribut("relPosY",QString().setNum(relPos.y(),10)); + QString linkAttr=getLinkAttr(); + QString useOrientAttr; if (useOrientation) useOrientAttr=attribut ("useOrientation","true"); @@ -172,13 +178,14 @@ if (filetype=="GIF") filetype="PNG"; - url="images/"+prefix+"image-" + QString().number(counter,10) + "." +filetype; + url="images/"+prefix+"image-" + QString().number(saveCounter,10) + "." +filetype; // And really save the image icon->save (tmpdir + "/" + url, filetype); return singleElement ("floatimage", posAttr + + linkAttr + useOrientAttr + saveInMapAttr + exportAttr + @@ -189,7 +196,7 @@ void FloatImageObj::resetSaveCounter() { - counter=0; + saveCounter=0; }