Source Code (Use browser search to find items of interest.)

Class Index

qt'QBitmap (./qt-2.1.0/src/kernel/qbitmap.h:34)

class Q_EXPORT QBitmap : public QPixmap
{
public:
    QBitmap();
    QBitmap( int w, int h,  bool clear = FALSE,
	     QPixmap::Optimization = QPixmap::DefaultOptim );
    QBitmap( const QSize &, bool clear = FALSE,
	     QPixmap::Optimization = QPixmap::DefaultOptim );
    QBitmap( int w, int h,  const uchar *bits, bool isXbitmap=FALSE );
    QBitmap( const QSize &, const uchar *bits, bool isXbitmap=FALSE );
    QBitmap( const QBitmap & );
    QBitmap( const QString &fileName, const char *format=0 );

    QBitmap &operator=( const QBitmap & );
    QBitmap &operator=( const QPixmap & );
    QBitmap &operator=( const QImage  & );

    QBitmap  xForm( const QWMatrix & ) const;
};


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:69)

QBitmap::QBitmap()
{
    data->bitmap = TRUE;
}


/*!
  Constructs a bitmap with \a w width and \a h height.

  The contents of the bitmap is uninitialized if \a clear is FALSE, otherwise
  it is filled with pixel value 0 (the QColor \c Qt::color0).

  The optional \a optimization argument specifies the optimization
  setting for the bitmap.  The default optimization should be used
  in most cases.  Games and other pixmap-intensive applications may
  benefit from setting this argument.

  \sa QPixmap::setOptimization(), QPixmap::setDefaultOptimization()
*/


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:89)

QBitmap::QBitmap( int w, int h, bool clear,
		  QPixmap::Optimization optimization )
    : QPixmap( w, h, 1, optimization )
{
    data->bitmap = TRUE;
    if ( clear )
	fill( Qt::color0 );
}


/*!
  \overload
*/


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:103)

QBitmap::QBitmap( const QSize &size, bool clear,
		  QPixmap::Optimization optimization )
    : QPixmap( size, 1, optimization )
{
    data->bitmap = TRUE;
    if ( clear )
	fill( Qt::color0 );
}


/*!
  Constructs a bitmap with \a w width and \a h height and sets the contents
  to \a bits.

  The \a isXbitmap should be TRUE if \a bits was generated by the
  X11 bitmap program.  The X bitmap bit order is little endian.
  The QImage documentation discusses bit order of monochrome images.

  Example (creates an arrow bitmap):
  \code
    uchar arrow_bits[] = { 0x3f, 0x1f, 0x0f, 0x1f, 0x3b, 0x71, 0xe0, 0xc0 };
    QBitmap bm( 8, 8, arrow_bits, TRUE );
  \endcode
*/


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:128)

QBitmap::QBitmap( int w, int h, const uchar *bits, bool isXbitmap )
    : QPixmap( w, h, bits, isXbitmap )
{
    data->bitmap = TRUE;
}


/*!
  \overload
*/


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:139)

QBitmap::QBitmap( const QSize &size, const uchar *bits, bool isXbitmap )
    : QPixmap( size.width(), size.height(), bits, isXbitmap )
{
    data->bitmap = TRUE;
}


/*!
  Constructs a bitmap which is a copy of \a bitmap.
*/


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:150)

QBitmap::QBitmap( const QBitmap &bitmap )
    : QPixmap( bitmap )
{
}


/*!
  Constructs a pixmap from the file \a fileName. If the file does not
  exist, or is of an unknown format, the pixmap becomes a null pixmap.

  The parameters are passed on to QPixmap::load(). Dithering will be
  performed if the file format uses more than 1 bit per pixel.

  \sa QPixmap::isNull(), QPixmap::load(), QPixmap::loadFromData(),
  QPixmap::save(), QPixmap::imageFormat()
*/


qt'QBitmap::QBitmap() (./qt-2.1.0/src/kernel/qbitmap.cpp:167)

QBitmap::QBitmap( const QString& fileName, const char *format )
    : QPixmap() // Will set bitmap to null bitmap, explicit call for clarity
{
    data->bitmap = TRUE;
    load( fileName, format, Mono );
}


/*!
  Assigns the bitmap \a bitmap to this bitmap and returns a reference to this
  bitmap.
*/


qt'QBitmap::xForm() (./qt-2.1.0/src/kernel/qbitmap.cpp:244)

QBitmap QBitmap::xForm( const QWMatrix &matrix ) const
{
    QPixmap pm = QPixmap::xForm( matrix );
    QBitmap bm;
    // Here we fake the pixmap to think it's a QBitmap. With this trick,
    // the QBitmap::operator=(const QPixmap&) will just refer the
    // pm.data and we do not need to perform a bitBlt.
    pm.data->bitmap = TRUE;
    bm = pm;
    return bm;
}