diff -r df4fdaa07527 -r 97f5d07bf47d floatimageobj.cpp --- a/floatimageobj.cpp Wed May 31 12:27:38 2006 +0000 +++ b/floatimageobj.cpp Tue Sep 05 11:53:54 2006 +0000 @@ -1,5 +1,7 @@ #include "floatimageobj.h" #include "branchobj.h" +//Added by qt3to4: +#include ///////////////////////////////////////////////////////////////// @@ -17,7 +19,7 @@ depth=-1; } -FloatImageObj::FloatImageObj (QCanvas* c):FloatObj(c) +FloatImageObj::FloatImageObj (Q3Canvas* c):FloatObj(c) { // cout << "Const FloatImageObj (c) called from MapCenterObj (c)\n"; setParObj (this); @@ -25,7 +27,7 @@ depth=-1; } -FloatImageObj::FloatImageObj (QCanvas* c, OrnamentedObj* p):FloatObj(c,p) +FloatImageObj::FloatImageObj (Q3Canvas* c, OrnamentedObj* p):FloatObj(c,p) { // cout << "Const FloatImageObj (c,p)\n"; init(); @@ -94,7 +96,7 @@ bbox.setSize (QSize(icon->size().width()+8, icon->size().height()+8)); positionBBox(); filename=fn; - filetype=QPixmap::imageFormat (fn); +//FIXME QT3 was filetype=QPixmap::imageFormat (fn); setOriginalFilename (fn); return true; } else @@ -102,9 +104,9 @@ } -void FloatImageObj::save (const QString &fn, const char *format) +void FloatImageObj::save (const QString &fn, const QString &format) { - icon->save (fn,format); + icon->save (fn,qPrintable (format)); } void FloatImageObj::setOriginalFilename(const QString & fn) @@ -180,14 +182,10 @@ QString zAttr=attribut ("zPlane",QString().setNum(zPlane)); QString url; - // prevent saving as GIF - if (filetype=="GIF") - filetype="PNG"; - url="images/"+prefix+"image-" + QString().number(saveCounter,10) + "." +filetype; // And really save the image - icon->save (tmpdir + "/" + url, filetype); + icon->save (tmpdir + "/" + url, "PNG"); QString nameAttr=attribut ("orgName",originalFilename);