equal
deleted
inserted
replaced
239 void GlxViewManager::updateProgressDialog( int currentValue ) |
239 void GlxViewManager::updateProgressDialog( int currentValue ) |
240 { |
240 { |
241 static int i = 0; |
241 static int i = 0; |
242 HbIcon icon; |
242 HbIcon icon; |
243 User::ResetInactivityTime(); |
243 User::ResetInactivityTime(); |
244 |
244 QString text( GLX_REFRESHING ); |
245 //To:Do temp code remove later |
245 |
246 if ( mProgressDialog ) { |
246 if ( mProgressDialog ) { |
247 i = ++i % 10; |
247 i = ++i % 10; |
248 icon = HbIcon( QString( ":/data/Wait/qgn_graf_ring_wait_%1.svg" ).arg( i + 1, 2, 10, QChar( '0' ) ) ); |
248 icon = HbIcon( QString( ":/data/Wait/qgn_graf_ring_wait_%1.svg" ).arg( i + 1, 2, 10, QChar( '0' ) ) ); |
249 mProgressDialog->setIcon(icon); |
249 mProgressDialog->setIcon(icon); |
250 |
250 |
253 mProgressDialog->setMaximum( currentValue ); |
253 mProgressDialog->setMaximum( currentValue ); |
254 max = currentValue ; |
254 max = currentValue ; |
255 } |
255 } |
256 |
256 |
257 if ( currentValue < 0 ) { |
257 if ( currentValue < 0 ) { |
258 mProgressDialog->setText( QString( GLX_REFRESHING ) ); //To:Do string will change later |
258 mProgressDialog->setText( text ); |
259 mProgressDialog->setProgressValue( 0 ); |
259 mProgressDialog->setProgressValue( 0 ); |
|
260 mProgressDialog->setProgressDialogType( HbProgressDialog::WaitDialog ); |
260 } |
261 } |
261 else { |
262 else { |
262 int value = max - currentValue; |
263 int value = max - currentValue; |
263 mProgressDialog->setProgressValue( value ); |
264 mProgressDialog->setProgressValue( value ); |
264 mProgressDialog->setText( QString( " %1 " ).arg( currentValue ) ); |
265 text.append( QString( "\n %1 " ).arg( currentValue ) ); |
|
266 mProgressDialog->setText( text ); |
|
267 mProgressDialog->setProgressDialogType( HbProgressDialog::ProgressDialog ); |
265 } |
268 } |
266 } |
269 } |
267 } |
270 } |
268 |
271 |
269 //to be called only when the photos plugin was activated by external means |
272 //to be called only when the photos plugin was activated by external means |