S60 3rd Edition SDK for Symbian OS
Example Applications Guide

CRegistrationAppUi Class Reference

#include <RegistrationAppui.h>

List of all members.

Public Member Functions

void ConstructL ()
 ~CRegistrationAppUi ()

Private Member Functions

void DynInitMenuPaneL (TInt aResourceId, CEikMenuPane *aMenuPane)
void HandleCommandL (TInt aCommand)
virtual void HandleResourceChangeL (TInt aType)
TKeyResponse HandleKeyEventL (const TKeyEvent &aKeyEvent, TEventCode aType)

Private Attributes

CRegistrationView * iAppView
TBuf< KMaxNoteLength > iNote


Detailed Description

Application UI class. Provides support for the following features:

Definition at line 40 of file RegistrationAppui.h.


Constructor & Destructor Documentation

CRegistrationAppUi::~CRegistrationAppUi (   ) 
 

Destructor.

Definition at line 44 of file RegistrationAppui.cpp.

00045     { 
00046         }


Member Function Documentation

void CRegistrationAppUi::ConstructL (   ) 
 

Symbian default constructor.

Definition at line 27 of file RegistrationAppui.cpp.

References iAppView, CRegistrationView::Id(), and CRegistrationView::NewL().

00028     {
00029     BaseConstructL( CAknAppUi::EAknEnableSkin );
00030     
00031     iAppView = CRegistrationView::NewL();
00032     CleanupStack::PushL( iAppView );
00033     AddViewL( iAppView );
00034     CleanupStack::Pop( iAppView );
00035     ActivateLocalViewL( iAppView->Id() );
00036     }

void CRegistrationAppUi::DynInitMenuPaneL (  TInt  aResourceId,
CEikMenuPane *  aMenuPane
)  [private]
 

This function is called by the EIKON framework just before it displays a menu pane.

Definition at line 57 of file RegistrationAppui.cpp.

00059     {
00060     // No implementation required
00061     }

void CRegistrationAppUi::HandleCommandL (  TInt  aCommand  )  [private]
 

Takes care of command handling.

Parameters:
aCommand command to be handled

Definition at line 80 of file RegistrationAppui.cpp.

References iAppView, iNote, and CRegistrationView::ValidateInput().

00081     {
00082     switch ( aCommand )
00083         {
00084         case EAknSoftkeyExit:
00085         case EEikCmdExit:
00086             {
00087             Exit();
00088             break;
00089             }
00090         case ERegistrationCmdAppRegister:
00091             { 
00092             if ( iAppView->ValidateInput() )
00093               {       
00094               // Add here your own code to handle registration data.
00095               //
00096               iCoeEnv->ReadResourceL( iNote, R_REGISTRATION_INFO_TEXT );
00097               CAknInformationNote* dlg = new ( ELeave ) CAknInformationNote;
00098               dlg->ExecuteLD( iNote );
00099               }
00100             else
00101               {
00102               iCoeEnv->ReadResourceL( iNote, R_REGISTRATION_ERR_TEXT );
00103               CAknErrorNote* dlg = new ( ELeave ) CAknErrorNote;
00104               dlg->ExecuteLD( iNote );  
00105               }
00106             break;
00107             }
00108 
00109         default:
00110             break;      
00111         }
00112     }

void CRegistrationAppUi::HandleResourceChangeL (  TInt  aType  )  [private, virtual]
 

Called by framework when layout is changed.

Parameters:
aType Type of resources that have changed

Definition at line 119 of file RegistrationAppui.cpp.

References iAppView, and CRegistrationView::SizeChanged().

00120     {
00121     CAknAppUi::HandleResourceChangeL( aType );
00122     if ( aType == KEikDynamicLayoutVariantSwitch )
00123         {               
00124         iAppView->SizeChanged();
00125         }
00126     }

TKeyResponse CRegistrationAppUi::HandleKeyEventL (  const TKeyEvent &  aKeyEvent,
TEventCode  aType
)  [private]
 

Handles key events.

Parameters:
aKeyEvent Event to handled
aType Type of the key event
Returns:
Response code (EKeyWasConsumed, EKeyWasNotConsumed)

Definition at line 69 of file RegistrationAppui.cpp.

00071     {
00072     return EKeyWasNotConsumed;
00073     }


© Nokia 2006

Back to top