src/gui/image/qpixmap_s60.cpp
changeset 7 f7bc934e204c
parent 3 41300fa6a67c
equal deleted inserted replaced
3:41300fa6a67c 7:f7bc934e204c
     1 /****************************************************************************
     1 /****************************************************************************
     2 **
     2 **
     3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
     3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
     4 ** All rights reserved.
     4 ** All rights reserved.
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     5 ** Contact: Nokia Corporation (qt-info@nokia.com)
     6 **
     6 **
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     7 ** This file is part of the QtGui module of the Qt Toolkit.
     8 **
     8 **
   335 QPixmap QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *bitmap)
   335 QPixmap QPixmap::fromSymbianCFbsBitmap(CFbsBitmap *bitmap)
   336 {
   336 {
   337     if (!bitmap)
   337     if (!bitmap)
   338         return QPixmap();
   338         return QPixmap();
   339 
   339 
   340     QScopedPointer<QS60PixmapData> data(new QS60PixmapData(QPixmapData::PixmapType));
   340     QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType));
   341     data->fromNativeType(reinterpret_cast<void*>(bitmap), QPixmapData::FbsBitmap);
   341     data->fromNativeType(reinterpret_cast<void*>(bitmap), QPixmapData::FbsBitmap);
   342     QPixmap pixmap(data.take());
   342     QPixmap pixmap(data.take());
   343     return pixmap;
   343     return pixmap;
   344 }
   344 }
   345 
   345 
   733     // Surely things might change in future
   733     // Surely things might change in future
   734 
   734 
   735     if (!sgImage)
   735     if (!sgImage)
   736         return QPixmap();
   736         return QPixmap();
   737 
   737 
   738     QScopedPointer<QS60PixmapData> data(new QS60PixmapData(QPixmapData::PixmapType));
   738     QScopedPointer<QPixmapData> data(QPixmapData::create(0,0, QPixmapData::PixmapType));
   739     data->fromNativeType(reinterpret_cast<void*>(sgImage), QPixmapData::SgImage);
   739     data->fromNativeType(reinterpret_cast<void*>(sgImage), QPixmapData::SgImage);
   740     QPixmap pixmap(data.take());
   740     QPixmap pixmap(data.take());
   741     return pixmap;
   741     return pixmap;
   742 }
   742 }
   743 
   743