Home · All Classes · Main Classes · Annotated · Grouped Classes · Functions

Qt 3 Support Members for QPixmap

The following class members are part of the Qt 3 support layer. They are provided to help you port old code to Qt 4. We advise against using them in new code.

Public Types

Public Functions


Member Type Documentation

enum QPixmap::ColorMode

This enum type defines the color modes that exist for converting QImage objects to QPixmap.

ConstantValueDescription
QPixmap::Auto0Select Color or Mono on a case-by-case basis.
QPixmap::Color1Always create colored pixmaps.
QPixmap::Mono2Always create bitmaps.

Member Function Documentation

QPixmap::QPixmap ( const QString & fileName, const char * format, ColorMode mode )

Use the constructor that takes a Qt::ImageConversionFlag instead.

See also ColorMode and Qt::ImageConversionFlag.

QPixmap::QPixmap ( const QImage & image )

Constructs a pixmap from the QImage image.

See also fromImage().

bool QPixmap::convertFromImage ( const QImage & image, ColorMode mode )

Use fromImage() instead.

bool QPixmap::convertFromImage ( const QImage & image, Qt::ImageConversionFlags flags = Qt::AutoColor )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use fromImage() instead.

QImage QPixmap::convertToImage () const

Use toImage() instead.

bool QPixmap::load ( const QString & fileName, const char * format, ColorMode mode )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the load() function that takes a Qt::ImageConversionFlag instead.

See also ColorMode and Qt::ImageConversionFlag.

bool QPixmap::loadFromData ( const uchar * buf, uint len, const char * format, ColorMode mode )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Use the loadFromData() function that takes a Qt::ImageConversionFlag instead.

See also ColorMode and Qt::ImageConversionFlag.

void QPixmap::resize ( int w, int h )

Resizes the pixmap to w width and h height. If either w or h is 0, the pixmap becomes a null pixmap.

If both w and h are greater than 0, a valid pixmap is created. New pixels will be uninitialized (random) if the pixmap is expanded.

void QPixmap::resize ( const QSize & size )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Resizes the pixmap to size size.

bool QPixmap::selfMask () const

QPixmap QPixmap::xForm ( const QMatrix & matrix ) const

Use transform() instead.

QPixmap::operator QImage () const

Returns the pixmap as a QImage.

This automatic conversion is disabled when QT3_SUPPORT is not defined. Use toImage() instead.

QPixmap & QPixmap::operator= ( const QImage & image )

This is an overloaded member function, provided for convenience. It behaves essentially like the above function.

Converts the image image to a pixmap that is assigned to this pixmap. Returns a reference to the pixmap.

See also fromImage().


Copyright © 2005 Trolltech Trademarks
Qt 4.0.0