|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <RegistrationView.h>
Public Member Functions | |
| virtual | ~CRegistrationView () |
| void | SizeChanged () |
| TBool | ValidateInput () |
| TUid | Id () const |
| void | HandleCommandL (TInt aCommand) |
Static Public Member Functions | |
| static CRegistrationView * | NewL () |
| static CRegistrationView * | NewLC () |
Private Member Functions | |
| CRegistrationView () | |
| void | ConstructL () |
| void | DoActivateL (const TVwsViewId &aPrevViewId, TUid aCustomMessageId, const TDesC8 &aCustomMessage) |
| void | DoDeactivate () |
Private Attributes | |
| CRegistrationListbox * | iListbox |
| TRegistrationItemdata | iItemData |
Definition at line 42 of file RegistrationView.h.
|
|
~CRegistrationView Virtual Destructor. Definition at line 85 of file RegistrationView.cpp. References iListbox. 00086 { 00087 if ( iListbox ) 00088 { 00089 AppUi()->RemoveFromStack( iListbox ); 00090 } 00091 00092 delete iListbox; 00093 }
|
|
|
CRegistrationView C++ default constructor. Definition at line 75 of file RegistrationView.cpp.
|
|
|
NewL Two-phased constructor. Create a CRegistrationView object, which will draw itself to aRect.
Definition at line 27 of file RegistrationView.cpp. References NewLC(). 00028 { 00029 CRegistrationView* self = CRegistrationView::NewLC(); 00030 CleanupStack::Pop( self ); 00031 return self; 00032 }
|
|
|
NewLC Two-phased constructor. Create a CRegistrationView object, which will draw itself to aRect.
Definition at line 39 of file RegistrationView.cpp. References ConstructL(). 00040 { 00041 CRegistrationView* self = new ( ELeave ) CRegistrationView; 00042 CleanupStack::PushL( self ); 00043 self->ConstructL(); 00044 return self; 00045 }
|
|
|
SizeChanged Creates Listbox Called by AppUi when the view size is changed. Definition at line 133 of file RegistrationView.cpp. References iListbox. 00134 { 00135 iListbox->SetRect( ClientRect() ); 00136 }
|
|
|
ValidateInput Checks validity of input.
Definition at line 164 of file RegistrationView.cpp. References TRegistrationItemdata::iEmail, and iItemData. 00165 { 00166 _LIT( KAt, "@" ); 00167 TBool isValid = EFalse; 00168 TBuf<KMaxEmailLength> iEmailEnd; 00169 00170 //Searching for @ character. 00171 // Returns index of character if found. Returns KErrNotFound if not found. 00172 TInt index = iItemData.iEmail.Find( KAt ); 00173 if( KErrNotFound != index ) 00174 { 00175 if ( iItemData.iEmail.Length() > ++index ) 00176 { 00177 // iEmailEnd contains email address from @ to end. 00178 iEmailEnd = iItemData.iEmail.MidTPtr( index ); 00179 00180 // Search for @ is performed again. 00181 if ( iEmailEnd.Find(KAt) == KErrNotFound ) 00182 { 00183 isValid = ETrue; 00184 } 00185 } 00186 else 00187 { 00188 isValid = ETrue; 00189 } 00190 } 00191 return isValid; 00192 }
|
|
|
Id Returns the ID of view.
Definition at line 101 of file RegistrationView.cpp.
|
|
|
HandleCommandL. handles the commands. if the command is command which is require to display outline-screen, the command is reported to container class.
Definition at line 111 of file RegistrationView.cpp. 00112 { 00113 00114 switch ( aCommand ) 00115 { 00116 case EAknCmdExit: 00117 case EAknSoftkeyBack: 00118 { 00119 AppUi()->ProcessCommandL( EAknCmdExit ); 00120 break; 00121 } 00122 00123 default: 00124 break; 00125 } 00126 }
|
|
|
ConstructL 2nd phase constructor. Perform the second phase construction of a CRegistrationView object. Definition at line 53 of file RegistrationView.cpp. References iItemData, iListbox, and CRegistrationListbox::SetData(). 00054 { 00055 BaseConstructL(); 00056 00057 iListbox = new ( ELeave ) CRegistrationListbox; 00058 iListbox->SetData( &iItemData ); 00059 iListbox->SetMopParent( this ); 00060 iListbox->ConstructFromResourceL( R_REGISTRATION_SETTING_ITEM_LIST ); 00061 00062 AppUi()->AddToStackL( *this, iListbox ); 00063 iListbox->MakeVisible( ETrue ); 00064 iListbox->SetRect( ClientRect() ); 00065 iListbox->ActivateL(); 00066 iListbox->DrawNow(); 00067 00068 }
|
|
||||||||||||||||
|
DoActivateL. Creates the Container class object.
Definition at line 142 of file RegistrationView.cpp.
|
|
|
DoDeactivate. Deletes the Container class object. Definition at line 153 of file RegistrationView.cpp.
|
|
© Nokia 2006 |