S60 5th Edition SDK
Example Applications Guide

CCSSyncAppUi Class Reference

#include <cssyncappui.h>

Inheritance diagram for CCSSyncAppUi:

List of all members.

Detailed Description

CCSSyncAppUi An instance of class CCSSyncAppUi is the UserInterface part of the AVKON application framework for the CSSync example application

Definition at line 33 of file cssyncappui.h.

Public Member Functions

 CCSSyncAppUi ()
virtual ~CCSSyncAppUi ()
void HandleCommandL (TInt aCommand)
virtual void HandleResourceChangeL (TInt aType)

Private Member Functions

void ConstructL ()
CCSSyncDocumentSyncDocument () const

Private Attributes

CCSSyncAppViewiAppView


Constructor & Destructor Documentation

CCSSyncAppUi::CCSSyncAppUi  ) 
 

CCSSyncAppUi. C++ default constructor. This needs to be public due to the way the framework constructs the AppUi.

Definition at line 35 of file cssyncappui.cpp.

00036     {
00037     // No implementation required
00038     }

CCSSyncAppUi::~CCSSyncAppUi  )  [virtual]
 

~CCSSyncAppUi. Destructor.

Definition at line 59 of file cssyncappui.cpp.

References iAppView.

00060     {
00061     if ( iAppView )
00062         {
00063         iEikonEnv->RemoveFromStack( iAppView );
00064         delete iAppView;
00065         iAppView = NULL;
00066         }
00067     }


Member Function Documentation

void CCSSyncAppUi::HandleCommandL TInt  aCommand  ) 
 

From CAknAppUi, HandleCommandL. Handles user menu selections.

Parameters:
aCommand The enumerated code for the option selected.

Definition at line 84 of file cssyncappui.cpp.

References iAppView, SyncDocument(), and CCSSyncDocument::UpdateTime().

00085     {
00086     switch( aCommand )
00087         {
00088         case EEikCmdExit:
00089         case EAknSoftkeyExit:
00090             Exit();
00091             break;
00092 
00093         case EDisplayTime:
00094             // Pull the time from the server
00095             SyncDocument()->UpdateTime();
00096 
00097             // Get view to display the new time
00098             iAppView->DrawNow();
00099             break;
00100 
00101         default:
00102             break;
00103         }
00104     }

void CCSSyncAppUi::HandleResourceChangeL TInt  aType  )  [virtual]
 

HandleResourceChangeL() Called by framework when layout is changed.

Parameters:
aType The type of resources that have changed.

Definition at line 111 of file cssyncappui.cpp.

References iAppView.

00112     {
00113     CAknAppUi::HandleResourceChangeL( aType );
00114 
00115     if ( aType==KEikDynamicLayoutVariantSwitch )
00116         {
00117         iAppView->SetRect( ClientRect() );
00118         }
00119     //Controls derived from CCoeControl, handled in container class
00120     iAppView->HandleResourceChange( aType );
00121     }

void CCSSyncAppUi::ConstructL  )  [private]
 

ConstructL. 2nd phase constructor.

Definition at line 45 of file cssyncappui.cpp.

References iAppView, CCSSyncAppView::NewL(), and SyncDocument().

00046     {
00047     BaseConstructL();
00048 
00049     iAppView = CCSSyncAppView::NewL( ClientRect(), *SyncDocument() );
00050 
00051     AddToStackL( iAppView );
00052     }

CCSSyncDocument * CCSSyncAppUi::SyncDocument  )  const [private]
 

SyncDocument. Casts iDocument member from CAknAppUi to CCSSyncDocument.

Definition at line 74 of file cssyncappui.cpp.

Referenced by ConstructL(), and HandleCommandL().

00075     {
00076     return static_cast<CCSSyncDocument*>( iDocument );
00077     }


Member Data Documentation

CCSSyncAppView* CCSSyncAppUi::iAppView [private]
 

iAppView, the application view. Owned by CCSSyncAppUi object.

Definition at line 88 of file cssyncappui.h.

Referenced by ConstructL(), HandleCommandL(), HandleResourceChangeL(), and ~CCSSyncAppUi().


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

© Nokia 2009

Back to top