summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap.h
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-06-04 16:41:47 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-06-05 08:20:19 (GMT)
commitfd6e80b7cc36ebc111d062301ba8bfca5e6e6f50 (patch)
tree29b1720a5e251045c9ebf0e7331c790b8d6390f0 /src/gui/image/qpixmap.h
parent7b9b55e3a0deb69a6ff04ee9b76840a5f8d11545 (diff)
downloadQt-fd6e80b7cc36ebc111d062301ba8bfca5e6e6f50.zip
Qt-fd6e80b7cc36ebc111d062301ba8bfca5e6e6f50.tar.gz
Qt-fd6e80b7cc36ebc111d062301ba8bfca5e6e6f50.tar.bz2
Introduce Symbian CFbsBitmap <-> QPixmap conversion functions.
Introduce functions for converting to and from a CFbsBitmap on Symbian. Currently these functions unfortunately have to copy the data to the internal QImage stored in the raster pixmap data backend :( Hopefully we can improve this with a native Symbian pixmap backend in the future. The autotest generates both small and large CFbsBitmaps of different formats and then verifies that the color makes it into the QPixmap. Currently the indexed image formats don't seem to work, but this is most likely because we don't set a palette for them. The semi-trans bitmaps seem to work fine (verified visually), but the current QCOMPARE doesn't consider the fact that the color was alpha blended. Reviewed-by: Sami Merilä
Diffstat (limited to 'src/gui/image/qpixmap.h')
-rw-r--r--src/gui/image/qpixmap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gui/image/qpixmap.h b/src/gui/image/qpixmap.h
index 1863273..9ef5347 100644
--- a/src/gui/image/qpixmap.h
+++ b/src/gui/image/qpixmap.h
@@ -62,6 +62,10 @@ class QX11Info;
class QPixmapData;
+#if defined(Q_OS_SYMBIAN)
+class CFbsBitmap;
+#endif
+
class Q_GUI_EXPORT QPixmap : public QPaintDevice
{
public:
@@ -152,6 +156,11 @@ 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;