1.1 --- a/imageitem.cpp Sat Aug 08 21:58:26 2009 +0000
1.2 +++ b/imageitem.cpp Tue Aug 18 12:39:07 2009 +0000
1.3 @@ -7,8 +7,6 @@
1.4 #include <iostream>
1.5 using namespace std;
1.6
1.7 -uint ImageItem::saveCounter=0; // create instance
1.8 -
1.9 ImageItem::ImageItem()
1.10 {
1.11 init();
1.12 @@ -27,7 +25,7 @@
1.13
1.14 void ImageItem::init()
1.15 {
1.16 - type=Image;
1.17 + setType (Image);
1.18 imageType=Undefined;
1.19 hideLinkUnselected=true;
1.20 originalFilename="no original name available";
1.21 @@ -87,11 +85,6 @@
1.22 return originalFilename;
1.23 }
1.24
1.25 -void ImageItem::resetSaveCounter()
1.26 -{
1.27 - saveCounter=0;
1.28 -}
1.29 -
1.30 void ImageItem::save(const QString &fn, const QString &format)
1.31 {
1.32 pixmap.save (fn,qPrintable (format));
1.33 @@ -101,13 +94,12 @@
1.34 {
1.35 if (hidden) return "";
1.36
1.37 - saveCounter++;
1.38 -
1.39 -
1.40 QString zAttr=attribut ("zValue",QString().setNum(zValue));
1.41 QString url;
1.42
1.43 - url="images/"+prefix+"image-" + QString().number(saveCounter,10) + ".png" ;
1.44 + ulong n=reinterpret_cast <ulong> (this);
1.45 +
1.46 + url="images/"+prefix+"image-" + QString().number(n,10) + ".png" ;
1.47
1.48 // And really save the image
1.49 pixmap.save (tmpdir +"/"+ url, "PNG");