imageobj.cpp
branchqt4-port
changeset 7 84f76a3876d7
parent 0 7a96bd401351
     1.1 --- a/imageobj.cpp	Sun Jan 30 12:58:47 2005 +0000
     1.2 +++ b/imageobj.cpp	Tue Jul 04 12:10:56 2006 +0000
     1.3 @@ -1,10 +1,12 @@
     1.4  #include "imageobj.h"
     1.5 +//Added by qt3to4:
     1.6 +#include <QPixmap>
     1.7  
     1.8  /////////////////////////////////////////////////////////////////
     1.9  // ImageObj
    1.10  /////////////////////////////////////////////////////////////////
    1.11 -ImageObj::ImageObj( QCanvas *canvas )
    1.12 -    : QCanvasRectangle( canvas )
    1.13 +ImageObj::ImageObj( Q3Canvas *canvas )
    1.14 +    : Q3CanvasRectangle( canvas )
    1.15  {
    1.16  //	cout << "Const ImageObj (canvas)\n";
    1.17      setZ(Z_ICON);	
    1.18 @@ -39,7 +41,7 @@
    1.19  {
    1.20  	switch (type)
    1.21  	{
    1.22 -		case undef: qWarning("undef");break;
    1.23 +		case undef: qWarning("Warning: ImageObj::save() type=undef");break;
    1.24  		case qimage: image.save (fn,format,-1);break;
    1.25  		case qpixmap: pixmap.save (fn,format,-1);break;
    1.26  	}
    1.27 @@ -54,7 +56,7 @@
    1.28  	type=qimage;
    1.29  
    1.30  #if !defined(Q_WS_QWS)
    1.31 -    pixmap.convertFromImage(image, OrderedAlphaDither);
    1.32 +    pixmap.convertFromImage(image, Qt::OrderedAlphaDither);
    1.33  #endif
    1.34  	return true;
    1.35  }
    1.36 @@ -78,7 +80,7 @@
    1.37  {
    1.38  	type=qimage;
    1.39  	image=img;
    1.40 -    pixmap.convertFromImage(image, OrderedAlphaDither);
    1.41 +    pixmap.convertFromImage(image, Qt::OrderedAlphaDither);
    1.42  }
    1.43  
    1.44  QPixmap ImageObj::getPixmap()
    1.45 @@ -91,7 +93,7 @@
    1.46  // On Qt/Embedded, we can paint a QImage as fast as a QPixmap,
    1.47  // but on other platforms, we need to use a QPixmap.
    1.48  #if defined(Q_WS_QWS)
    1.49 -    p.drawImage( int(x()), int(y()), image, 0, 0, -1, -1, OrderedAlphaDither );
    1.50 +    p.drawImage( int(x()), int(y()), image, 0, 0, -1, -1, Qt::OrderedAlphaDither );
    1.51  #else
    1.52      p.drawPixmap( int(x()), int(y()), pixmap );
    1.53  #endif