55 #if defined(Q_OS_SYMBIAN)
79 #ifndef QT_NO_IMAGEFORMAT_XPM
80 QPixmap(
const char *
const xpm[]);
86 #ifdef Q_COMPILER_RVALUE_REFS
88 {
qSwap(data, other.data);
return *
this; }
92 operator QVariant()
const;
103 static int defaultDepth();
105 void fill(
const QColor &fillColor =
Qt::white);
113 QT_DEPRECATED
QPixmap alphaChannel()
const;
114 QT_DEPRECATED
void setAlphaChannel(
const QPixmap &);
117 bool hasAlpha()
const;
118 bool hasAlphaChannel()
const;
120 #ifndef QT_NO_IMAGE_HEURISTIC_MASK
121 QBitmap createHeuristicMask(
bool clipTight =
true)
const;
123 QBitmap createMaskFromColor(
const QColor &maskColor)
const;
126 static QPixmap grabWindow(
WId,
int x=0,
int y=0,
int w=-1,
int h=-1);
129 {
return grabWidget(widget,
QRect(
x,
y, w, h)); }
134 {
return scaled(
QSize(w, h), aspectMode,
mode); }
146 static QPixmap fromImageReader(QImageReader *imageReader, Qt::ImageConversionFlags flags =
Qt::AutoColor);
149 bool loadFromData(
const uchar *buf, uint
len,
const char*
format = 0, Qt::ImageConversionFlags flags =
Qt::AutoColor);
151 bool save(
const QString& fileName,
const char*
format = 0,
int quality = -1)
const;
152 bool save(
QIODevice* device,
const char*
format = 0,
int quality = -1)
const;
156 #if defined(Q_WS_WIN)
164 HICON toWinHICON()
const;
167 static QPixmap fromWinHICON(HICON hicon);
170 #if defined(Q_WS_MAC)
175 #if defined(Q_OS_SYMBIAN)
176 CFbsBitmap *toSymbianCFbsBitmap()
const;
177 static QPixmap fromSymbianCFbsBitmap(CFbsBitmap *bitmap);
178 RSgImage* toSymbianRSgImage()
const;
179 static QPixmap fromSymbianRSgImage(RSgImage *sgImage);
189 QT_DEPRECATED
int serialNumber()
const;
193 bool isDetached()
const;
196 bool isQBitmap()
const;
198 #if defined(Q_WS_QWS)
199 const uchar *qwsBits()
const;
200 int qwsBytesPerLine()
const;
203 QT_DEPRECATED
int numCols()
const;
205 int colorCount()
const;
206 #elif defined(Q_WS_MAC)
210 #elif defined(Q_WS_X11)
214 static int x11SetDefaultScreen(
int screen);
215 void x11SetScreen(
int screen);
216 const QX11Info &x11Info()
const;
220 #if defined(Q_WS_X11) || defined(Q_WS_QWS)
229 int metric(PaintDeviceMetric)
const;
233 enum ColorMode { Auto, Color, Mono };
235 QT3_SUPPORT
bool load(
const QString& fileName,
const char *
format, ColorMode
mode);
236 QT3_SUPPORT
bool loadFromData(
const uchar *buf, uint
len,
const char*
format, ColorMode
mode);
239 inline QT3_SUPPORT
QImage convertToImage()
const {
return toImage(); }
240 QT3_SUPPORT
bool convertFromImage(
const QImage &, ColorMode
mode);
241 inline QT3_SUPPORT
operator QImage()
const {
return toImage(); }
243 inline QT3_SUPPORT
bool selfMask()
const {
return false; }
245 void resize_helper(
const QSize &
s);
247 inline QT3_SUPPORT
void resize(
const QSize &
s) { resize_helper(s); }
248 inline QT3_SUPPORT
void resize(
int width,
int height) { resize_helper(
QSize(width, height)); }
254 bool doImageIO(QImageWriter *io,
int quality)
const;
257 enum Type { PixmapType, BitmapType };
259 void init(
int,
int, Type = PixmapType);
262 void init(
int,
int,
int);
264 #if defined(Q_WS_WIN)
265 void initAlphaPixmap(uchar *bytes,
int length,
struct tagBITMAPINFO *bmi);
267 Q_DUMMY_COMPARISON_OPERATOR(
QPixmap)
269 friend CGContextRef qt_mac_cg_context(
const QPaintDevice*);
273 friend int qt_mac_pixmap_get_bytes_per_line(
const QPixmap*);
275 friend class QPixmapData;
276 friend class QX11PixmapData;
277 friend class QMacPixmapData;
278 friend class QSymbianRasterPixmapData;
280 friend class QPaintDevice;
283 friend class QX11PaintEngine;
284 friend class QCoreGraphicsPaintEngine;
285 friend class QWidgetPrivate;
286 friend class QRasterBuffer;
287 #if !defined(QT_NO_DATASTREAM)
293 QPixmapData* pixmapData()
const;
304 return copy(
QRect(ax, ay, awidth, aheight));
309 scroll(dx, dy,
QRect(ax, ay, awidth, aheight), exposed);
313 Qt::ImageConversionFlags flags)
322 #if !defined(QT_NO_DATASTREAM)
332 int sx=0,
int sy=0,
int sw=-1,
int sh=-1);
333 #endif // QT3_SUPPORT
GLuint GLuint GLsizei GLenum type
QExplicitlySharedDataPointer< QPixmapData > DataPtr
GLXFBConfig Pixmap pixmap
struct CGImage * CGImageRef
bool loadFromData(const uchar *buf, uint len, const char *format=0, Qt::ImageConversionFlags flags=Qt::AutoColor)
void scroll(int dx, int dy, int x, int y, int width, int height, QRegion *exposed=0)
GLenum GLsizei GLenum GLenum const GLvoid * image
QT_BEGIN_HEADER QT_BEGIN_NAMESPACE typedef unsigned int QRgb
const char * constData() const
#define QT_BEGIN_NAMESPACE
GLsizei GLsizei GLenum GLenum const GLvoid * data
GLenum GLsizei GLenum format
Q_INLINE_TEMPLATE void qSwap(QScopedPointer< T, Cleanup > &p1, QScopedPointer< T, Cleanup > &p2)
Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QPixmap &)
GLenum GLsizei GLsizei height
void fill(const QWidget *widget, int xofs, int yofs)
void swap(QPixmap &other)
GLuint GLsizei GLsizei * length
QPixmap scaled(int w, int h, Qt::AspectRatioMode aspectMode=Qt::IgnoreAspectRatio, Qt::TransformationMode mode=Qt::FastTransformation) const
GLint GLint GLsizei GLsizei GLsizei depth
Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QPixmap &)
int int int int int int h
GLubyte GLubyte GLubyte GLubyte w
struct CGContext * CGContextRef
static QPixmap grabWidget(QWidget *widget, int x=0, int y=0, int w=-1, int h=-1)
struct OpaqueIconRef * IconRef