Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends

QPixmap Class Reference

Search for all occurrences

Detailed Description

Definition at line 71 of file qpixmap.h.

#include <qpixmap.h>

Inheritance diagram for QPixmap:
Inheritance graph
[legend]

List of all members.

Public Types

typedef
QExplicitlySharedDataPointer
< QPixmapData > 
DataPtr

Public Member Functions

  QPixmap ()
  QPixmap (QPixmapData *data)
  QPixmap (int w, int h)
  QPixmap (const QSize &)
  QPixmap (const QString &fileName, const char *format=0, Qt::ImageConversionFlags flags=Qt::AutoColor)
  QPixmap (const char *const xpm[])
  QPixmap (const QPixmap &)
  ~QPixmap ()
QPixmap operator= (const QPixmap &)
  operator QVariant () const
bool  isNull () const
int  devType () const
int  width () const
int  height () const
QSize  size () const
QRect  rect () const
int  depth () const
void  fill (const QColor &fillColor=Qt::white)
void  fill (const QWidget *widget, const QPoint &ofs)
void  fill (const QWidget *widget, int xofs, int yofs)
QBitmap  mask () const
void  setMask (const QBitmap &)
QPixmap  alphaChannel () const
void  setAlphaChannel (const QPixmap &)
bool  hasAlpha () const
bool  hasAlphaChannel () const
QBitmap  createHeuristicMask (bool clipTight=true) const
QBitmap  createMaskFromColor (const QColor &maskColor) const
QBitmap  createMaskFromColor (const QColor &maskColor, Qt::MaskMode mode) const
QPixmap  scaled (int w, int h, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap  scaled (const QSize &s, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap  scaledToWidth (int w, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap  scaledToHeight (int h, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap  transformed (const QMatrix &, Qt::TransformationMode mode=Qt::FastTransformation) const
QPixmap  transformed (const QTransform &, Qt::TransformationMode mode=Qt::FastTransformation) const
QImage  toImage () const
bool  load (const QString &fileName, const char *format=0, Qt::ImageConversionFlags flags=Qt::AutoColor)
bool  loadFromData (const uchar *buf, uint len, const char *format=0, Qt::ImageConversionFlags flags=Qt::AutoColor)
bool  loadFromData (const QByteArray &data, const char *format=0, Qt::ImageConversionFlags flags=Qt::AutoColor)
bool  save (const QString &fileName, const char *format=0, int quality=-1) const
bool  save (QIODevice *device, const char *format=0, int quality=-1) const
bool  convertFromImage (const QImage &img, Qt::ImageConversionFlags flags=Qt::AutoColor)
QPixmap  copy (int x, int y, int width, int height) const
QPixmap  copy (const QRect &rect=QRect()) const
void  scroll (int dx, int dy, int x, int y, int width, int height, QRegion *exposed=0)
void  scroll (int dx, int dy, const QRect &rect, QRegion *exposed=0)
int  serialNumber () const
qint64  cacheKey () const
bool  isDetached () const
void  detach ()
bool  isQBitmap () const
QPaintEngine paintEngine () const
bool  operator! () const
QPixmapData *  pixmapData () const
DataPtr data_ptr ()

Static Public Member Functions

static int  defaultDepth ()
static QPixmap  grabWindow (WId, int x=0, int y=0, int w=-1, int h=-1)
static QPixmap  grabWidget (QWidget *widget, const QRect &rect)
static QPixmap  grabWidget (QWidget *widget, int x=0, int y=0, int w=-1, int h=-1)
static QMatrix  trueMatrix (const QMatrix &m, int w, int h)
static QTransform  trueMatrix (const QTransform &m, int w, int h)
static QPixmap  fromImage (const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
static QPixmap  fromImageReader (QImageReader *imageReader, Qt::ImageConversionFlags flags=Qt::AutoColor)

Protected Member Functions

int  metric (PaintDeviceMetric) const

Friends

class  QPixmapData
class  QX11PixmapData
class  QMacPixmapData
class  QS60PixmapData
class  QBitmap
class  QPaintDevice
class  QPainter
class  QGLWidget
class  QX11PaintEngine
class  QCoreGraphicsPaintEngine
class  QWidgetPrivate
class  QRasterBuffer
Q_GUI_EXPORT QDataStream operator>> (QDataStream &, QPixmap &)
Q_GUI_EXPORT qint64  qt_pixmap_id (const QPixmap &pixmap)

Member Typedef Documentation

typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr

Reimplemented in QBitmap.

Definition at line 286 of file qpixmap.h.


Constructor & Destructor Documentation

QPixmap ( )
QPixmap ( QPixmapData *  data ) [explicit]
QPixmap ( int  w,
int  h 
)
QPixmap ( const QSize )
QPixmap ( const QString fileName,
const char *  format = 0,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
QPixmap ( const char *const  xpm[] )
QPixmap ( const QPixmap )
~QPixmap ( )

Member Function Documentation

QPixmap& operator= ( const QPixmap )

Reimplemented in QBitmap.

operator QVariant ( ) const

Reimplemented in QBitmap.

bool isNull ( ) const
int devType ( ) const [virtual]
int width ( ) const
int height ( ) const
QSize size ( ) const
QRect rect ( ) const
int depth ( ) const
static int defaultDepth ( ) [static]
void fill ( const QColor fillColor = Qt::white )
void fill ( const QWidget widget,
const QPoint ofs 
)
void fill ( const QWidget widget,
int  xofs,
int  yofs 
) [inline]

Definition at line 101 of file qpixmap.h.

{ fill(widget, QPoint(xofs, yofs)); }
QBitmap mask ( ) const
void setMask ( const QBitmap )
QPixmap alphaChannel ( ) const
void setAlphaChannel ( const QPixmap )
bool hasAlpha ( ) const
bool hasAlphaChannel ( ) const
QBitmap createHeuristicMask ( bool  clipTight = true ) const
QBitmap createMaskFromColor ( const QColor maskColor ) const
QBitmap createMaskFromColor ( const QColor maskColor,
Qt::MaskMode  mode 
) const
static QPixmap grabWindow ( WId  ,
int  x = 0,
int  y = 0,
int  w = -1,
int  h = -1 
) [static]
static QPixmap grabWidget ( QWidget widget,
const QRect rect 
) [static]
static QPixmap grabWidget ( QWidget widget,
int  x = 0,
int  y = 0,
int  w = -1,
int  h = -1 
) [inline, static]

Definition at line 120 of file qpixmap.h.

    { return grabWidget(widget, QRect(x, y, w, h)); }
QPixmap scaled ( int  w,
int  h,
Qt::AspectRatioMode  aspectMode = Qt::IgnoreAspectRatio,
Qt::TransformationMode  mode = Qt::FastTransformation 
) const [inline]

Definition at line 124 of file qpixmap.h.

        { return scaled(QSize(w, h), aspectMode, mode); }
QPixmap scaled ( const QSize s,
Qt::AspectRatioMode  aspectMode = Qt::IgnoreAspectRatio,
Qt::TransformationMode  mode = Qt::FastTransformation 
) const
QPixmap scaledToWidth ( int  w,
Qt::TransformationMode  mode = Qt::FastTransformation 
) const
QPixmap scaledToHeight ( int  h,
Qt::TransformationMode  mode = Qt::FastTransformation 
) const
QPixmap transformed ( const QMatrix ,
Qt::TransformationMode  mode = Qt::FastTransformation 
) const
static QMatrix trueMatrix ( const QMatrix m,
int  w,
int  h 
) [static]
QPixmap transformed ( const QTransform ,
Qt::TransformationMode  mode = Qt::FastTransformation 
) const
static QTransform trueMatrix ( const QTransform m,
int  w,
int  h 
) [static]
QImage toImage ( ) const
static QPixmap fromImage ( const QImage image,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
) [static]
static QPixmap fromImageReader ( QImageReader imageReader,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
) [static]
bool load ( const QString fileName,
const char *  format = 0,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
bool loadFromData ( const uchar *  buf,
uint  len,
const char *  format = 0,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
bool loadFromData ( const QByteArray data,
const char *  format = 0,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
) [inline]

Definition at line 302 of file qpixmap.h.

{
    return loadFromData(reinterpret_cast<const uchar *>(buf.constData()), buf.size(), format, flags);
}
bool save ( const QString fileName,
const char *  format = 0,
int  quality = -1 
) const
bool save ( QIODevice device,
const char *  format = 0,
int  quality = -1 
) const
bool convertFromImage ( const QImage img,
Qt::ImageConversionFlags  flags = Qt::AutoColor 
)
QPixmap copy ( int  x,
int  y,
int  width,
int  height 
) const [inline]

Definition at line 292 of file qpixmap.h.

{
    return copy(QRect(ax, ay, awidth, aheight));
}
QPixmap copy ( const QRect rect = QRect() ) const
void scroll ( int  dx,
int  dy,
int  x,
int  y,
int  width,
int  height,
QRegion exposed = 0 
) [inline]

Definition at line 297 of file qpixmap.h.

{
    scroll(dx, dy, QRect(ax, ay, awidth, aheight), exposed);
}
void scroll ( int  dx,
int  dy,
const QRect rect,
QRegion exposed = 0 
)
int serialNumber ( ) const
qint64 cacheKey ( ) const
bool isDetached ( ) const
void detach ( )
bool isQBitmap ( ) const
QPaintEngine* paintEngine ( ) const [virtual]
bool operator! ( void  ) const [inline]

Definition at line 216 of file qpixmap.h.

{ return isNull(); }
int metric ( PaintDeviceMetric  ) const [protected, virtual]
QPixmapData* pixmapData ( ) const
DataPtr& data_ptr ( ) [inline]

Definition at line 287 of file qpixmap.h.

{ return data; }

Friends And Related Function Documentation

friend class QPixmapData [friend]

Definition at line 265 of file qpixmap.h.

friend class QX11PixmapData [friend]

Definition at line 266 of file qpixmap.h.

friend class QMacPixmapData [friend]

Definition at line 267 of file qpixmap.h.

friend class QS60PixmapData [friend]

Definition at line 268 of file qpixmap.h.

friend class QBitmap [friend]

Definition at line 269 of file qpixmap.h.

friend class QPaintDevice [friend]

Definition at line 270 of file qpixmap.h.

friend class QPainter [friend]

Reimplemented from QPaintDevice.

Definition at line 271 of file qpixmap.h.

friend class QGLWidget [friend]

Definition at line 272 of file qpixmap.h.

friend class QX11PaintEngine [friend]

Reimplemented from QPaintDevice.

Definition at line 273 of file qpixmap.h.

friend class QCoreGraphicsPaintEngine [friend]

Definition at line 274 of file qpixmap.h.

friend class QWidgetPrivate [friend]

Definition at line 275 of file qpixmap.h.

friend class QRasterBuffer [friend]

Definition at line 276 of file qpixmap.h.

Q_GUI_EXPORT QDataStream& operator>> ( QDataStream ,
QPixmap  
) [friend]
Q_GUI_EXPORT qint64 qt_pixmap_id ( const QPixmap pixmap ) [friend]

The documentation for this class was generated from the following file:

QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap
QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap QPixmap