diff options
author | Alessandro Portale <aportale@trolltech.com> | 2009-05-19 17:58:57 (GMT) |
---|---|---|
committer | Alessandro Portale <aportale@trolltech.com> | 2009-05-19 18:17:50 (GMT) |
commit | 9db91e3d4a7f3bd92c7815b3257f459f3b3de01f (patch) | |
tree | 98d9f41326b259662447d567c50c7ed2c0b4a517 /src/gui/styles/qs60style_simulated.cpp | |
parent | 2698a9f27eb83a7145560def144bdc53ad5c2eb8 (diff) | |
download | Qt-9db91e3d4a7f3bd92c7815b3257f459f3b3de01f.zip Qt-9db91e3d4a7f3bd92c7815b3257f459f3b3de01f.tar.gz Qt-9db91e3d4a7f3bd92c7815b3257f459f3b3de01f.tar.bz2 |
Stub for backgroundTexture()
Diffstat (limited to 'src/gui/styles/qs60style_simulated.cpp')
-rw-r--r-- | src/gui/styles/qs60style_simulated.cpp | 19 |
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 |