99 |
101 |
100 EXPORT_C CAknProgressDialog::CAknProgressDialog(TInt aFinalValue,TInt anIncrement, |
102 EXPORT_C CAknProgressDialog::CAknProgressDialog(TInt aFinalValue,TInt anIncrement, |
101 TInt anInterval,CEikDialog** aSelfPtr) : |
103 TInt anInterval,CEikDialog** aSelfPtr) : |
102 CAknNoteDialog(aSelfPtr),iInternalTimerControl(ETrue) |
104 CAknNoteDialog(aSelfPtr),iInternalTimerControl(ETrue) |
103 { |
105 { |
|
106 _AKNTRACE_FUNC_ENTER; |
|
107 _AKNTRACE("aFinalValue = %d anIncrement = %d anInterval = %d", aFinalValue, anIncrement, anInterval); |
104 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS |
108 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS |
105 GfxTransEffect::Register( this, KGfxWaitNoteControlUid ); |
109 GfxTransEffect::Register( this, KGfxWaitNoteControlUid ); |
106 #endif |
110 #endif |
107 iModel.iFinalValue = aFinalValue; |
111 iModel.iFinalValue = aFinalValue; |
108 iModel.iHundreths = anInterval; |
112 iModel.iHundreths = anInterval; |
109 iModel.iIncrement = anIncrement; |
113 iModel.iIncrement = anIncrement; |
110 iModel.iRunning = EFalse; |
114 iModel.iRunning = EFalse; |
111 AKNTASHOOK_ADD( this, "CAknProgressDialog" ); |
115 AKNTASHOOK_ADD( this, "CAknProgressDialog" ); |
|
116 _AKNTRACE_FUNC_EXIT; |
112 } |
117 } |
113 |
118 |
114 EXPORT_C CAknProgressDialog::CAknProgressDialog(CEikDialog** aSelfPtr) : |
119 EXPORT_C CAknProgressDialog::CAknProgressDialog(CEikDialog** aSelfPtr) : |
115 CAknNoteDialog(aSelfPtr),iInternalTimerControl(EFalse) |
120 CAknNoteDialog(aSelfPtr),iInternalTimerControl(EFalse) |
116 { |
121 { |
|
122 _AKNTRACE_FUNC_ENTER; |
117 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS |
123 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS |
118 GfxTransEffect::Register( this, KGfxWaitNoteControlUid ); |
124 GfxTransEffect::Register( this, KGfxWaitNoteControlUid ); |
119 #endif |
125 #endif |
120 AKNTASHOOK_ADD( this, "CAknProgressDialog" ); |
126 AKNTASHOOK_ADD( this, "CAknProgressDialog" ); |
|
127 _AKNTRACE_FUNC_EXIT; |
121 } |
128 } |
122 |
129 |
123 EXPORT_C CAknProgressDialog::CAknProgressDialog(CEikDialog** aSelfPtr, |
130 EXPORT_C CAknProgressDialog::CAknProgressDialog(CEikDialog** aSelfPtr, |
124 TBool aVisibilityDelayOff) |
131 TBool aVisibilityDelayOff) |
125 : CAknNoteDialog(aSelfPtr), |
132 : CAknNoteDialog(aSelfPtr), |
126 iVisibilityDelayOff( aVisibilityDelayOff ), |
133 iVisibilityDelayOff( aVisibilityDelayOff ), |
127 iInternalTimerControl(EFalse) |
134 iInternalTimerControl(EFalse) |
128 { |
135 { |
|
136 _AKNTRACE_FUNC_ENTER; |
|
137 _AKNTRACE("iVisibilityDelayOff = %d ", aVisibilityDelayOff); |
129 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS |
138 #ifdef RD_UI_TRANSITION_EFFECTS_POPUPS |
130 GfxTransEffect::Register( this, KGfxWaitNoteControlUid ); |
139 GfxTransEffect::Register( this, KGfxWaitNoteControlUid ); |
131 #endif |
140 #endif |
132 AKNTASHOOK_ADD( this, "CAknProgressDialog" ); |
141 AKNTASHOOK_ADD( this, "CAknProgressDialog" ); |
|
142 _AKNTRACE_FUNC_EXIT; |
133 } |
143 } |
134 |
144 |
135 EXPORT_C CAknProgressDialog::~CAknProgressDialog() |
145 EXPORT_C CAknProgressDialog::~CAknProgressDialog() |
136 { |
146 { |
|
147 _AKNTRACE_FUNC_ENTER; |
137 AKNTASHOOK_REMOVE(); |
148 AKNTASHOOK_REMOVE(); |
138 if ( iInternalTimerControl ) |
149 if ( iInternalTimerControl ) |
139 { |
150 { |
140 PlayTone(); |
151 PlayTone(); |
141 } |
152 } |
142 iEikonEnv->RemoveFromStack(this); |
153 iEikonEnv->RemoveFromStack(this); |
143 delete iCancelWhileHidden; |
154 delete iCancelWhileHidden; |
144 delete iProgressTimer; |
155 delete iProgressTimer; |
145 delete iProgressDialogTimer; |
156 delete iProgressDialogTimer; |
|
157 _AKNTRACE_FUNC_EXIT; |
146 } |
158 } |
147 |
159 |
148 EXPORT_C void CAknProgressDialog::PreLayoutDynInitL() |
160 EXPORT_C void CAknProgressDialog::PreLayoutDynInitL() |
149 { |
161 { |
150 //If the progress bar is to be controlled externally, it won't be updated |
162 //If the progress bar is to be controlled externally, it won't be updated |
386 } |
406 } |
387 } |
407 } |
388 |
408 |
389 EXPORT_C TBool CAknProgressDialog::OkToExitL(TInt aButtonId) |
409 EXPORT_C TBool CAknProgressDialog::OkToExitL(TInt aButtonId) |
390 { |
410 { |
|
411 _AKNTRACE_FUNC_ENTER; |
391 // if dialog is invisible and app isn't exiting, eg during view switch, |
412 // if dialog is invisible and app isn't exiting, eg during view switch, |
392 // don't stop the progress dialog - it's most likely part of some |
413 // don't stop the progress dialog - it's most likely part of some |
393 // asynchronous operation. |
414 // asynchronous operation. |
394 if ((iState == EProcessOnDisplayOff && !CAknEnv::AppWithShutterRunning()) || |
415 if ((iState == EProcessOnDisplayOff && !CAknEnv::AppWithShutterRunning()) || |
395 aButtonId == EAknSoftkeyEmpty ) |
416 aButtonId == EAknSoftkeyEmpty ) |
396 { |
417 { |
|
418 _AKNTRACE("CAknProgressDialog::OkToExitL return for EProcessOnDisplayOff"); |
397 delete iCancelWhileHidden; |
419 delete iCancelWhileHidden; |
398 iCancelWhileHidden = NULL; |
420 iCancelWhileHidden = NULL; |
399 return EFalse; |
421 return EFalse; |
400 } |
422 } |
401 if ( iCallback ) |
423 if ( iCallback ) |
402 { |
424 { |
|
425 _AKNTRACE("CAknProgressDialog::OkToExitL succeed to execut DialogDismissedL"); |
403 iCallback->DialogDismissedL(aButtonId); |
426 iCallback->DialogDismissedL(aButtonId); |
404 } |
427 } |
|
428 _AKNTRACE_FUNC_EXIT; |
405 return ETrue; |
429 return ETrue; |
406 } |
430 } |
407 |
431 |
408 //------------------------------------------------------------------------------------- |
432 //------------------------------------------------------------------------------------- |
409 // CAknProgressDialog::HandlePointerEventL() |
433 // CAknProgressDialog::HandlePointerEventL() |