summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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