diff options
author | Charles Yin <[email protected]> | 2011-09-08 15:00:55 +1000 |
---|---|---|
committer | Qt by Nokia <[email protected]> | 2011-09-09 01:08:45 +0200 |
commit | 5d6c7a35c44b811a167691d2f07b19ee05e91ef0 (patch) | |
tree | 19f8318c9afacccb74521cb23a9ce636b05c6808 | |
parent | e5b13e6eae3782163dc3414bd87158797d5af6e0 (diff) |
add convenient function pixmap() function for QSGImageBase
Change-Id: I30e5c81daf10f001120ef04fe50f347f0b8578bb
Reviewed-on: http://codereview.qt-project.org/4387
Reviewed-by: Qt Sanity Bot <[email protected]>
Reviewed-by: Michael Brasser <[email protected]>
-rw-r--r-- | src/declarative/items/qsgimagebase.cpp | 6 | ||||
-rw-r--r-- | src/declarative/items/qsgimagebase_p.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/declarative/items/qsgimagebase.cpp b/src/declarative/items/qsgimagebase.cpp index f8f2183a15..5c6334de66 100644 --- a/src/declarative/items/qsgimagebase.cpp +++ b/src/declarative/items/qsgimagebase.cpp @@ -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); diff --git a/src/declarative/items/qsgimagebase_p.h b/src/declarative/items/qsgimagebase_p.h index 567c46d30b..e17ca3b059 100644 --- a/src/declarative/items/qsgimagebase_p.h +++ b/src/declarative/items/qsgimagebase_p.h @@ -79,6 +79,8 @@ public: bool cache() const; void setCache(bool); + QPixmap pixmap() const; + virtual void setSourceSize(const QSize&); QSize sourceSize() const; void resetSourceSize(); |