summaryrefslogtreecommitdiff
authorzecke <zecke>2004-09-24 15:10:31 (UTC)
committer zecke <zecke>2004-09-24 15:10:31 (UTC)
commit5ec51a8bb49a0a668bb2d7ab652a1a1e776a0e42 (patch) (unidiff)
tree6be2b6e609bac292dcd7dae2d7e79b3a454a835f
parent8e903cd3ea735adf066e156462602987691a4c69 (diff)
downloadopie-5ec51a8bb49a0a668bb2d7ab652a1a1e776a0e42.zip
opie-5ec51a8bb49a0a668bb2d7ab652a1a1e776a0e42.tar.gz
opie-5ec51a8bb49a0a668bb2d7ab652a1a1e776a0e42.tar.bz2
Give Status for Sking Loading and Finishing Loading
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/skin.cpp25
1 files changed, 13 insertions, 12 deletions
diff --git a/noncore/multimedia/opieplayer2/skin.cpp b/noncore/multimedia/opieplayer2/skin.cpp
index 5d8929e..b2c1649 100644
--- a/noncore/multimedia/opieplayer2/skin.cpp
+++ b/noncore/multimedia/opieplayer2/skin.cpp
@@ -29,4 +29,5 @@
29 29
30#include <qpe/config.h> 30#include <qpe/config.h>
31#include <qpe/global.h>
31 32
32#include <assert.h> 33#include <assert.h>
@@ -180,9 +181,9 @@ SkinData *SkinCache::lookupAndTake( const QString &skinPath, const QString &file
180 data = new SkinData; 181 data = new SkinData;
181 else 182 else
182 odebug << "SkinCache: hit" << oendl; 183 odebug << "SkinCache: hit" << oendl;
183 184
184 QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath ); 185 QPixmap *bgPixmap = m_backgroundPixmapCache.find( skinPath );
185 if ( bgPixmap ) { 186 if ( bgPixmap ) {
186 odebug << "SkinCache: hit on bgpixmap" << oendl; 187 odebug << "SkinCache: hit on bgpixmap" << oendl;
187 data->backgroundPixmap = *bgPixmap; 188 data->backgroundPixmap = *bgPixmap;
188 } 189 }
@@ -220,15 +221,15 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
220 switch ( m_currentState ) { 221 switch ( m_currentState ) {
221 case LoadBackgroundPixmap: 222 case LoadBackgroundPixmap:
222 odebug << "load bgpixmap" << oendl; 223 odebug << "load bgpixmap" << oendl;
223 m_skin.backgroundPixmap(); 224 m_skin.backgroundPixmap();
224 m_currentState = LoadButtonUpImage; 225 m_currentState = LoadButtonUpImage;
225 break; 226 break;
226 case LoadButtonUpImage: 227 case LoadButtonUpImage:
227 odebug << "load upimage" << oendl; 228 odebug << "load upimage" << oendl;
228 m_skin.buttonUpImage(); 229 m_skin.buttonUpImage();
229 m_currentState = LoadButtonDownImage; 230 m_currentState = LoadButtonDownImage;
230 break; 231 break;
231 case LoadButtonDownImage: 232 case LoadButtonDownImage:
232 odebug << "load downimage" << oendl; 233 odebug << "load downimage" << oendl;
233 m_skin.buttonDownImage(); 234 m_skin.buttonDownImage();
234 m_currentState = LoadButtonMasks; 235 m_currentState = LoadButtonMasks;
@@ -236,5 +237,5 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
236 break; 237 break;
237 case LoadButtonMasks: 238 case LoadButtonMasks:
238 odebug << "load button masks " << m_currentButton << "" << oendl; 239 odebug << "load button masks " << m_currentButton << "" << oendl;
239 m_skin.buttonMaskImage( m_info.buttonInfo[ m_currentButton ].fileName ); 240 m_skin.buttonMaskImage( m_info.buttonInfo[ m_currentButton ].fileName );
240 241
@@ -245,5 +246,5 @@ SkinLoader::IncrementalLoader::LoaderResult SkinLoader::IncrementalLoader::loadS
245 break; 246 break;
246 case LoadButtonMask: 247 case LoadButtonMask:
247 odebug << "load whole mask" << oendl; 248 odebug << "load whole mask" << oendl;
248 m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount ); 249 m_skin.buttonMask( m_info.buttonInfo, m_info.buttonCount );
249 return LoadingCompleted; 250 return LoadingCompleted;
@@ -260,5 +261,5 @@ SkinLoader::SkinLoader()
260SkinLoader::~SkinLoader() 261SkinLoader::~SkinLoader()
261{ 262{
262 odebug << "SkinLoader::~SkinLoader()" << oendl; 263 Global::statusMessage( tr( "Loading of Skin finished" ) );
263 killTimers(); 264 killTimers();
264 delete m_currentLoader; 265 delete m_currentLoader;
@@ -279,5 +280,5 @@ void SkinLoader::start()
279 assert( m_timerId == -1 ); 280 assert( m_timerId == -1 );
280 m_timerId = startTimer( 100 /* ms */ ); 281 m_timerId = startTimer( 100 /* ms */ );
281 odebug << "SkinLoader::start() " << pendingSkins.count() << " jobs" << oendl; 282 odebug << "SkinLoader::start() " << pendingSkins.count() << " jobs" << oendl;
282} 283}
283 284
@@ -292,5 +293,5 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
292 293
293 if ( pendingSkins.isEmpty() ) { 294 if ( pendingSkins.isEmpty() ) {
294 odebug << "all jobs done" << oendl; 295 odebug << "all jobs done" << oendl;
295 killTimer( m_timerId ); 296 killTimer( m_timerId );
296 m_timerId = -1; 297 m_timerId = -1;
@@ -304,5 +305,5 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
304 305
305 m_currentLoader = new IncrementalLoader( nfo ); 306 m_currentLoader = new IncrementalLoader( nfo );
306 odebug << "new loader " << pendingSkins.count() << " jobs left" << oendl; 307 odebug << "new loader " << pendingSkins.count() << " jobs left" << oendl;
307 } 308 }
308 309
@@ -312,5 +313,5 @@ void SkinLoader::timerEvent( QTimerEvent *ev )
312 } 313 }
313 314
314 odebug << "finished step" << oendl; 315 odebug << "finished step" << oendl;
315} 316}
316 317