CAknProgressDialog Class Reference

API published in: S60 1st Ed

Link against: avkon.lib eikctl.lib eikcdlg.lib

Capability Information

Required Capabilities

None


#include <aknprogressdialog.h>

Inherits CAknNoteDialog.

Inherited by CAknWaitDialog.


Detailed Description

CAknProgressDialog.

A note dialog with a timer. Display the note only if the process is at least 1 second long in order to avoid a note quickly flashing on the screen. Display the note for at least 1.5 seconds (even if the client process is shorter that this). The client can specify an initial delay when displaying the note. Timer events are used for displaying and dismissing the dialog. The client can set the progress by specifying the values in the constructors provided.

Usage:

Callback: To get a callback when/if the dialog has been dismissed use SetCallBack API: With class which uses a progressdialog:

Or make your dialog modal. If the dialog is used as a modal, RunLD returns 0 if the dialog is dismissed and EAknSoftkeyDone if not.

Resource flags:

Note! If aVisibilityDelayOff is set to ETrue in constructor the dialog will be visible immediality. This should only be used in cases where the process lasts ALWAYS atleast 1.5 seconds.

For comprehensive example, see


Public Member Functions

IMPORT_C  CAknProgressDialog (TInt aFinalValue, TInt anIncrement, TInt anInterval, CEikDialog **aSelfPtr)
  Constructor Use this when the length (in time) of the process is known.
IMPORT_C  CAknProgressDialog (CEikDialog **aSelfPtr)
  Constructor Use this if the length of the process is unknown but the progress can be calculated.
IMPORT_C  CAknProgressDialog (CEikDialog **aSelfPtr, TBool aVisibilityDelayOff)
  Constructor Use this if the length of the process is unknown but the progress can be calculated.
virtual IMPORT_C  ~CAknProgressDialog ()
  Destructor.
virtual IMPORT_C TInt  RunLD ()
  Executes the dialog (part of dialog framework).
IMPORT_C CEikProgressInfo GetProgressInfoL ()
  Get a handle to the progress bar.
IMPORT_C TKeyResponse  OfferKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)
  Handle key events (part of CONE framework).
IMPORT_C void  ProcessFinishedL ()
  This must be called when the dialog must be dismissed.
IMPORT_C void  SetCallback (MProgressDialogCallback *aCallback)
  This callback notifies the client when the dialog is dismissed.
IMPORT_C void  HandlePointerEventL (const TPointerEvent &aPointerEvent)
  HandlePointerEventL processes pointer events directed at the ProgressDialog.

Protected Types

enum   TProgressDialogState {
  EProcessOnDisplayOff, EProcessOnDisplayOn, EProcessOffDisplayOff, EProcessOffDisplayOn,
  EProcessOffDisplayOnCanBeDismissed, EProcessOnDisplayOnCanBeDismissed
}
  Enumeration to handle progress states. More...

Protected Member Functions

IMPORT_C void  PreLayoutDynInitL (void)
  Initializes dialog before layout is executed (part of dialog framework).
TInt  DialogTimerEvent ()
  Handles timer events.
IMPORT_C TBool  OkToExitL (TInt aButtonId)
  Called by the dialog framework, returns true if the dialog can exit, false otherwise.

Static Protected Member Functions

static TInt  DialogTimerCallback (TAny *aPtr)
  Timer callback.

Protected Attributes

CPeriodic *  iProgressDialogTimer
  Timer to handle dialog's visibility and existence.
TProgressDialogState  iState
  State to handle dialog's visibility and existence.
TTimerModel  iModel
  Contains progress timer's variables.
MProgressDialogCallback iCallback
  Callback pointer.
TBool  iVisibilityDelayOff
  Boolean to declare whether the visibility delay should be on or off.

Member Enumeration Documentation

enum CAknProgressDialog::TProgressDialogState [protected]
 

Enumeration to handle progress states.

Enumerator:
EProcessOnDisplayOff 
EProcessOnDisplayOn  cannot be dismissed
EProcessOffDisplayOff  cannot be dismissed
EProcessOffDisplayOn  can be dismissed
EProcessOffDisplayOnCanBeDismissed  cannot be dismissed
EProcessOnDisplayOnCanBeDismissed  can be dismissed when process ends

Constructor & Destructor Documentation

IMPORT_C CAknProgressDialog::CAknProgressDialog TInt  aFinalValue,
TInt  anIncrement,
TInt  anInterval,
CEikDialog **  aSelfPtr
 

Constructor Use this when the length (in time) of the process is known.

Parameters:
aFinalValue  Final value for the process
anIncrement  Increment of the process
anInterval  Interval of the process
aSelfPtr  Pointer to itself. The pointer must be valid when the dialog is dismissed and it must not be on the stack.
IMPORT_C CAknProgressDialog::CAknProgressDialog CEikDialog **  aSelfPtr  ) 
 

Constructor Use this if the length of the process is unknown but the progress can be calculated.

Parameters:
aSelfPtr  Pointer to itself. The pointer must be valid when the dialog is dismissed and it must not be on the stack.
IMPORT_C CAknProgressDialog::CAknProgressDialog CEikDialog **  aSelfPtr,
TBool  aVisibilityDelayOff
 

Constructor Use this if the length of the process is unknown but the progress can be calculated.

Parameters:
aSelfPtr  Pointer to itself. The pointer must be valid when the dialog is dismissed and it must not be on the stack.
aVisibilityDelayOff  If set ETrue the dialog will be visible immediality. Use only when the length of the process is ALWAYS over 1.5 seconds.
virtual IMPORT_C CAknProgressDialog::~CAknProgressDialog  )  [virtual]
 

Destructor.


Member Function Documentation

static TInt CAknProgressDialog::DialogTimerCallback TAny *  aPtr  )  [static, protected]
 

Timer callback.

Parameters:
aPtr  Pointer to this
TInt CAknProgressDialog::DialogTimerEvent  )  [protected]
 

Handles timer events.

IMPORT_C CEikProgressInfo* CAknProgressDialog::GetProgressInfoL  ) 
 

Get a handle to the progress bar.

IMPORT_C void CAknProgressDialog::HandlePointerEventL const TPointerEvent &  aPointerEvent  )  [virtual]
 

HandlePointerEventL processes pointer events directed at the ProgressDialog.

Parameters:
aPointerEvent  Pointerevent to be handled.

Reimplemented from CAknNoteDialog.

Reimplemented in CAknWaitDialog.

IMPORT_C TKeyResponse CAknProgressDialog::OfferKeyEventL const TKeyEvent &  aKeyEvent,
TEventCode  aType
 

Handle key events (part of CONE framework).

Reimplemented from CAknNoteDialog.

IMPORT_C TBool CAknProgressDialog::OkToExitL TInt  aButtonId  )  [protected, virtual]
 

Called by the dialog framework, returns true if the dialog can exit, false otherwise.

Parameters:
aButtonId  Id of the softkey which was pressed
Returns:
ETrue if the dialog can exit, false otherwise.

Reimplemented from CEikDialog.

IMPORT_C void CAknProgressDialog::PreLayoutDynInitL void   )  [protected, virtual]
 

Initializes dialog before layout is executed (part of dialog framework).

Reimplemented from CAknNoteDialog.

IMPORT_C void CAknProgressDialog::ProcessFinishedL  ) 
 

This must be called when the dialog must be dismissed.

It stops the timer and deletes the dialog.

virtual IMPORT_C TInt CAknProgressDialog::RunLD  )  [virtual]
 

Executes the dialog (part of dialog framework).

PrepareLC needs to be called before this.

Reimplemented from CAknNoteDialog.

IMPORT_C void CAknProgressDialog::SetCallback MProgressDialogCallback aCallback  ) 
 

This callback notifies the client when the dialog is dismissed.

Parameters:
aCallBack  A pointer to a class that inherits from MProgressDialogCallback.

Field Documentation

MProgressDialogCallback* CAknProgressDialog::iCallback [protected]
 

Callback pointer.

TTimerModel CAknProgressDialog::iModel [protected]
 

Contains progress timer's variables.

CPeriodic* CAknProgressDialog::iProgressDialogTimer [protected]
 

Timer to handle dialog's visibility and existence.

TProgressDialogState CAknProgressDialog::iState [protected]
 

State to handle dialog's visibility and existence.

TBool CAknProgressDialog::iVisibilityDelayOff [protected]
 

Boolean to declare whether the visibility delay should be on or off.


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

Copyright © Nokia Corporation 2001-2008
Back to top