CAknGlobalProgressDialog Class Reference

API published in: S60 1st Ed

Link against: aknnotify.lib eiksrv.lib

Capability Information

Required Capabilities

None


#include <
aknglobalprogressdialog.h>

Detailed Description

CAknGlobalProgressDialog Uses notification framework to show a global progress dialog.

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 CAknGlobalProgressDialogNewL ()
static IMPORT_C CAknGlobalProgressDialogNewLC ()

Constructor & Destructor Documentation

IMPORT_C CAknGlobalProgressDialog::~CAknGlobalProgressDialog  ) 
 

Member Function Documentation

IMPORT_C void CAknGlobalProgressDialog::CancelProgressDialog  ) 
 

Cancel the progress dialog.

Cancels the request and deletes the dialog.

static IMPORT_C CAknGlobalProgressDialog* CAknGlobalProgressDialog::NewL  )  [static]
 
static IMPORT_C CAknGlobalProgressDialog* CAknGlobalProgressDialog::NewLC  )  [static]
 
IMPORT_C void CAknGlobalProgressDialog::ProcessFinished  ) 
 

ProcessFinished.

Dismisses the dialog. Needs to be called after the process has finished.

IMPORT_C void CAknGlobalProgressDialog::SetIconL const TDesC &  aIconText,
const TDesC &  aIconFile,
TInt  aIconId = 0,
TInt  aIconMaskId = -1
 

Set icon for the progress dialog Must be called before ShowProgressDialogL.

Parameters:
aIconText Icon text
aIconFile Icon file
aIconId Icon id
aIconMaskId Mask id for icon
IMPORT_C void CAknGlobalProgressDialog::SetImageL const TDesC &  aImageFile,
TInt  aImageId = 0,
TInt  aImageMaskId = -1
 

Set image for the progress dialog Must be called before ShowProgressDialogL.

If not set, default image will be used, i.e. EMbmAvkonQgn_note_progress

Parameters:
aImageFile Image file
aImageId Image id
aImageMaskId Mask id for Image
IMPORT_C void CAknGlobalProgressDialog::SetImageSkinIds TAknsItemID aImageId,
TAknsItemID aIconId
 

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.

IMPORT_C void CAknGlobalProgressDialog::SetSecondaryDisplayData CAknSDData *  aData  ) 
 

Sets additional information to be sent to secondary display.

Takes ownership of object. Must be called before sending data to notifier to have effect.

IMPORT_C void CAknGlobalProgressDialog::ShowProgressDialogL TRequestStatus &  aStatus,
const TDesC &  aPrompt,
TInt  aSoftkeys = 0,
TInt  aFinalValue = 0,
CAknNoteDialog::TTone  aTone = CAknNoteDialog::ENoTone
 

Shows global progress dialog asynchronously.

Parameters:
aStatus TRequestStatus which will be completed when the dialog gets dismissed
aPrompt Prompt text
aSoftkeys Softkeys resource id If not set default softkeys are used. i.e. R_AVKON_SOFTKEYS_CANCEL
aFinalValue Final value of the process
aTone Tone to be played after completion
IMPORT_C void CAknGlobalProgressDialog::UpdateProgressDialog TInt  aValue,
TInt  aFinalValue = -1
 

Update Progress dialog with new progress values.

Parameters:
aValue Current value of the process.
aFinalValue Final value of the process. If not given the existing value is used.

The documentation for this class was generated from the following file:

Copyright © Nokia Corporation 2001-2008
Back to top