API published in: S60 1st Ed
Link against: aknnotify.lib eiksrv.lib
Required Capabilities
None
#include <aknglobalprogressdialog.h>
Usage: Create an active object, start it and pass its TRequestStatus as a parameter to ShowProgressDialogL. After the dialog gets dismissed, the request status will hold the id of the pressed softkey. E.g. If the user selected Cancel, the request status will hold -1.
Example 1. Construct global progress dialog and set icon and image.
iGlobalProgressDialog = CAknGlobalProgressDialog::NewL(); iGlobalProgressDialog->SetIconL( iIconText, iIconFile, iIconId, iIconMaskId);
iGlobalProgressDialog->SetImageL( iImageFile, iImageId, iImageMaskId);
Example 2. Show the global progress dialog:
iGlobalProgressDialog->ShowMsgQueryL( iObserver->iStatus, iPrompt, R_AVKON_SOFTKEYS_OK_CANCEL, iFinalValue, CAknQueryDialog::EConfirmationTone );
Example 3. Update the progress (current and final value of the process).
iGlobalProgressDialog->UpdateProgressDialog( 100, 500 );
Example 4. Finish the progress Needs to be called everytime the process has finished. Dismisses the dialog.
iGlobalProgressDialog->ProcessFinished();
Example 5. Get and handle the result in active object.
void CMyActiveObject::RunL() { TBuf<120> msg = _L("Received: "); // iStatus.Int() holds the return value msg.AppendNum( iStatus.Int() ); iEnv->InfoMsg(msg); // Show infomsg Cancel(); }
Example 6. Cancel the progress dialog
iGlobalProgressDialog->CancelProgressDialog();
Public Member Functions |
|
IMPORT_C | ~CAknGlobalProgressDialog () |
IMPORT_C void | SetIconL (const TDesC &aIconText, const TDesC &aIconFile, TInt aIconId=0, TInt aIconMaskId=-1) |
Set icon for the progress dialog Must be called before ShowProgressDialogL. |
|
IMPORT_C void | SetImageL (const TDesC &aImageFile, TInt aImageId=0, TInt aImageMaskId=-1) |
Set image for the progress dialog Must be called before ShowProgressDialogL. |
|
IMPORT_C void | ShowProgressDialogL (TRequestStatus &aStatus, const TDesC &aPrompt, TInt aSoftkeys=0, TInt aFinalValue=0, CAknNoteDialog::TTone aTone=CAknNoteDialog::ENoTone) |
Shows global progress dialog asynchronously. |
|
IMPORT_C void | UpdateProgressDialog (TInt aValue, TInt aFinalValue=-1) |
Update Progress dialog with new progress values. |
|
IMPORT_C void | ProcessFinished () |
ProcessFinished. |
|
IMPORT_C void | CancelProgressDialog () |
Cancel the progress dialog. |
|
IMPORT_C void | SetImageSkinIds (TAknsItemID &aImageId, TAknsItemID &aIconId) |
Set Skin ids for note image and icon. |
|
IMPORT_C void | SetSecondaryDisplayData (CAknSDData *aData) |
Sets additional information to be sent to secondary display. |
|
Static Public Member Functions |
|
static IMPORT_C CAknGlobalProgressDialog * | NewL () |
static IMPORT_C CAknGlobalProgressDialog * | NewLC () |
|
|
Cancel the progress dialog. Cancels the request and deletes the dialog. |
|
|
|
ProcessFinished. Dismisses the dialog. Needs to be called after the process has finished. |
|
Set icon for the progress dialog Must be called before ShowProgressDialogL.
|
|
Set image for the progress dialog Must be called before ShowProgressDialogL. If not set, default image will be used, i.e. EMbmAvkonQgn_note_progress
|
|
Set Skin ids for note image and icon. Must be called before ShowProgressDialogL in order to have effect. No need to use this method if image from avkon.mbm is used. aImageId SkinId for image in query. If image not found from active skin, default image / SetImageL definitions used instead. aIconId SkinId for icon in query. If image not found from active skin, default icon / SetIconL definitions used instead. |
|
Sets additional information to be sent to secondary display. Takes ownership of object. Must be called before sending data to notifier to have effect. |
|
Shows global progress dialog asynchronously.
|
|
Update Progress dialog with new progress values.
|