summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <aportale@trolltech.com>2009-05-19 17:58:57 (GMT)
committerAlessandro Portale <aportale@trolltech.com>2009-05-19 17:58:57 (GMT)
commit26e6d20ef0abee7b2d721637d6eaea67e932b907 (patch)
treec2e197f5cb6c9986b4f3d29fe623f8fee67f6488
parent508fab3a5189bcad5636cc1ff850d55e4ac8f9ab (diff)
downloadQt-26e6d20ef0abee7b2d721637d6eaea67e932b907.zip
Qt-26e6d20ef0abee7b2d721637d6eaea67e932b907.tar.gz
Qt-26e6d20ef0abee7b2d721637d6eaea67e932b907.tar.bz2
Stub for backgroundTexture()
-rw-r--r--src/gui/styles/qs60style_simulated.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style_simulated.cpp b/src/gui/styles/qs60style_simulated.cpp
index 17c1ebe..5a88f9a 100644
--- a/src/gui/styles/qs60style_simulated.cpp
+++ b/src/gui/styles/qs60style_simulated.cpp
@@ -191,6 +191,25 @@ QVariant QS60StylePrivate::styleProperty_specific(const char *name) const
return styleProperty(name);
}
+QPixmap QS60StylePrivate::backgroundTexture()
+{
+ static QPixmap result;
+ // Poor mans caching. + Making sure that there is always only one background image in memory at a time
+
+/*
+ TODO: 1) Hold the background QPixmap as pointer in a static class member.
+ Also add a deleteBackground() function and call that in ~QS60StylePrivate()
+ 2) Don't cache the background at all as soon as we have native pixmap support
+*/
+
+ if (!m_backgroundValid) {
+ result = QPixmap();
+ result = part(QS60StyleEnums::SP_QsnBgScreen, QApplication::activeWindow()->size());
+ m_backgroundValid = true;
+ }
+ return result;
+}
+
bool QS60StylePrivate::isTouchSupported()
{
#ifdef QT_KEYPAD_NAVIGATION