diff options
Diffstat (limited to 'src/gui/image/qpixmap.h')
-rw-r--r-- | src/gui/image/qpixmap.h | 31 |
1 files changed, 23 insertions, 8 deletions
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h index ca00b31..961008f 100644 --- a/src/gui/image/qpixmap.h +++ b/src/gui/image/qpixmap.h @@ -46,11 +46,16 @@ #include <QtGui/qcolor.h> #include <QtCore/qnamespace.h> #include <QtCore/qstring.h> // char*->QString conversion +#include <QtCore/qsharedpointer.h> #include <QtGui/qimage.h> #include <QtGui/qtransform.h> QT_BEGIN_HEADER +#if defined(Q_OS_SYMBIAN) +class CFbsBitmap; +#endif + QT_BEGIN_NAMESPACE QT_MODULE(Gui) @@ -59,7 +64,6 @@ class QImageWriter; class QColor; class QVariant; class QX11Info; - class QPixmapData; class Q_GUI_EXPORT QPixmap : public QPaintDevice @@ -79,11 +83,11 @@ public: QPixmap &operator=(const QPixmap &); operator QVariant() const; - bool isNull() const; + bool isNull() const; // ### Qt 5: make inline int devType() const; - int width() const; - int height() const; + int width() const; // ### Qt 5: make inline + int height() const; // ### Qt 5: make inline QSize size() const; QRect rect() const; int depth() const; @@ -152,9 +156,17 @@ public: static QPixmap fromMacCGImageRef(CGImageRef image); #endif +#if defined(Q_OS_SYMBIAN) + CFbsBitmap *toSymbianCFbsBitmap() const; + static QPixmap fromSymbianCFbsBitmap(CFbsBitmap *bitmap); +#endif + inline QPixmap copy(int x, int y, int width, int height) const; QPixmap copy(const QRect &rect = QRect()) const; + inline 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; @@ -216,7 +228,7 @@ public: #endif private: - QPixmapData *data; + QExplicitlySharedDataPointer<QPixmapData> data; bool doImageIO(QImageWriter *io, int quality) const; @@ -251,8 +263,6 @@ private: friend class QWidgetPrivate; friend class QRasterPaintEngine; friend class QRasterBuffer; - friend class QDirect3DPaintEngine; - friend class QDirect3DPaintEnginePrivate; friend class QDetachedPixmap; #if !defined(QT_NO_DATASTREAM) friend Q_GUI_EXPORT QDataStream &operator>>(QDataStream &, QPixmap &); @@ -263,7 +273,7 @@ public: QPixmapData* pixmapData() const; public: - typedef QPixmapData * DataPtr; + typedef QExplicitlySharedDataPointer<QPixmapData> DataPtr; inline DataPtr &data_ptr() { return data; } }; @@ -274,6 +284,11 @@ inline QPixmap QPixmap::copy(int ax, int ay, int awidth, int aheight) const return copy(QRect(ax, ay, awidth, aheight)); } +inline void QPixmap::scroll(int dx, int dy, int ax, int ay, int awidth, int aheight, QRegion *exposed) +{ + scroll(dx, dy, QRect(ax, ay, awidth, aheight), exposed); +} + inline bool QPixmap::loadFromData(const QByteArray &buf, const char *format, Qt::ImageConversionFlags flags) { |