add convenient function pixmap() function for QSGImageBase
authorCharles Yin <charles.yin@nokia.com>
Thu, 8 Sep 2011 05:00:55 +0000 (15:00 +1000)
committerQt by Nokia <qt-info@nokia.com>
Thu, 8 Sep 2011 23:08:45 +0000 (01:08 +0200)
Change-Id: I30e5c81daf10f001120ef04fe50f347f0b8578bb
Reviewed-on: http://codereview.qt-project.org/4387
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
src/declarative/items/qsgimagebase.cpp
src/declarative/items/qsgimagebase_p.h

index f8f2183..5c6334d 100644 (file)
@@ -163,6 +163,12 @@ void QSGImageBase::setCache(bool cache)
         load();
 }
 
+QPixmap QSGImageBase::pixmap() const
+{
+    Q_D(const QSGImageBase);
+    return d->pix.pixmap();
+}
+
 void QSGImageBase::setMirror(bool mirror)
 {
     Q_D(QSGImageBase);
index 567c46d..e17ca3b 100644 (file)
@@ -79,6 +79,8 @@ public:
     bool cache() const;
     void setCache(bool);
 
+    QPixmap pixmap() const;
+
     virtual void setSourceSize(const QSize&);
     QSize sourceSize() const;
     void resetSourceSize();