S60 3rd Edition SDK FP2 for Symbian OS
CommonDialogsEx

CCommonDialogsExAppUi Class Reference

#include <CommonDialogsExAppUi.h>

Inherits CAknAppUi.

List of all members.


Detailed Description

Application UI class. Provides support for the following features:

Definition at line 35 of file CommonDialogsExAppUi.h.

Public Member Functions

void ConstructL ()
 ~CCommonDialogsExAppUi ()

Private Member Functions

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

Private Attributes

CCommonDialogsExContaineriAppContainer
CAknMemorySelectionDialog::TMemory iMemory
TDriveNumber iDrive


Constructor & Destructor Documentation

CCommonDialogsExAppUi::~CCommonDialogsExAppUi (  ) 

Destructor.

Definition at line 60 of file CommonDialogsExAppUi.cpp.

References iAppContainer.

00061     {
00062     RemoveFromStack( iAppContainer );
00063     delete iAppContainer;
00064     }


Member Function Documentation

void CCommonDialogsExAppUi::ConstructL (  ) 

EPOC default constructor.

Definition at line 46 of file CommonDialogsExAppUi.cpp.

References CCommonDialogsExContainer::ConstructL(), and iAppContainer.

00047     {
00048     BaseConstructL(EAknEnableSkin);
00049     iAppContainer = new (ELeave) CCommonDialogsExContainer;
00050     iAppContainer->ConstructL( ClientRect() );
00051     AddToStackL( iAppContainer );
00052     }

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

From CEikAppUi, takes care of command handling.

Parameters:
aCommand command to be handled

Definition at line 96 of file CommonDialogsExAppUi.cpp.

References iAppContainer, iDrive, iMemory, CCommonDialogsExSettingsDialog::NewL(), and CCommonDialogsExContainer::ShowTextL().

00097     {
00098     TFileName rootFileName( KRootPath );
00099     TFileName emptyFileName( KNullDesC );
00100     TFileName defaultFileName( KDefaultFileName );
00101     TFileName tempRootPath;
00102     TFileName tempDefaultFolder;
00103     TInt returnValue;
00104     
00105     TBuf<32> textMain;
00106     TBuf<64> textSub;
00107             
00108     switch ( aCommand )
00109         {
00110         case EAknSoftkeyExit:
00111         case EEikCmdExit:
00112             {
00113             Exit();
00114             break;
00115             }
00116         //Memory selection (default)
00117         case ECommonDialogsExCmd101:
00118             {
00119             CAknMemorySelectionDialog* dlg = CAknMemorySelectionDialog::NewL( 
00120                                                         ECFDDialogTypeNormal, 
00121                                                         ETrue );
00122             CleanupStack::PushL( dlg );
00123             returnValue = dlg->ExecuteL( iMemory );
00124             if( returnValue )
00125                 {
00126                 textMain.Append( KCommonDialogsExSelected );
00127                 if ( iMemory == CAknMemorySelectionSettingPage::EPhoneMemory )
00128                     {
00129                     textSub.Append( KCommonDialogsExPhoneMemoryName );
00130                     }
00131                 else
00132                     {
00133                     textSub.Append( KCommonDialogsExMemoryCardName );
00134                     }
00135                 }
00136             else
00137                 {
00138                 textMain.Append( KCommonDialogsExCanceled );
00139                 textSub.Append( KCommonDialogsExSpace );
00140                 }
00141             //set display text
00142             iAppContainer->ShowTextL( textMain, textSub );
00143             CleanupStack::PopAndDestroy();
00144             break;
00145             }
00146             
00147         //Memory selection (Multi drive)
00148         case ECommonDialogsExCmd102:
00149             {
00150             CAknMemorySelectionDialogMultiDrive* dlg =
00151                 CAknMemorySelectionDialogMultiDrive::NewL(
00152                         ECFDDialogTypeNormal, ETrue );
00153             CleanupStack::PushL( dlg );
00154             returnValue = dlg->ExecuteL( iDrive , &tempRootPath, NULL );
00155             
00156             if( returnValue )
00157                 {
00158                 textMain.Append( KCommonDialogsExSelected );
00159                 textSub.Append( KCommonDialogsExMultiDrive );
00160                 textSub.Append( tempRootPath );
00161                 }
00162             else
00163                 {
00164                 textMain.Append( KCommonDialogsExCanceled );
00165                 textSub.Append( KCommonDialogsExSpace );
00166                 }
00167                 
00168             iAppContainer->ShowTextL( textMain, textSub );
00169             CleanupStack::PopAndDestroy();
00170 
00171             break;
00172             }
00173             
00174         //Memory setting (default)           
00175         case ECommonDialogsExCmd201:
00176             {
00177             CCommonDialogsExSettingsDialog* dlg = 
00178                           CCommonDialogsExSettingsDialog::NewL(0, EFalse);
00179             dlg->ExecuteLD( R_COMMONDIALOGSEX_SETTINGS_DIALOG );
00180             textMain.Append( KCommonDialogsExSelected );
00181             textSub.Append( KCommonDialogsExDefaultSetting );
00182             iAppContainer->ShowTextL( textMain, textSub );
00183             break;
00184             }
00185             
00186         //Memory setting (Multi drive)   
00187         case ECommonDialogsExCmd202:
00188             {
00189             CCommonDialogsExSettingsDialog* dlg =
00190                 CCommonDialogsExSettingsDialog::NewL(0, ETrue);
00191             dlg->ExecuteLD( R_COMMONDIALOGSEX_SETTINGS_DIALOG );
00192             textMain.Append( KCommonDialogsExSelected );
00193             textSub.Append( KCommonDialogsExMultiSetting );
00194             iAppContainer->ShowTextL( textMain, textSub );
00195             break;
00196             }
00197             
00198         //File selection            
00199         case ECommonDialogsExCmd301:
00200             {
00201             CAknFileSelectionDialog* dlg = 
00202                        CAknFileSelectionDialog::NewL( ECFDDialogTypeSelect );
00203             CleanupStack::PushL( dlg );
00204             returnValue = dlg->ExecuteL( rootFileName );
00205             if( returnValue )
00206                 {
00207                 textMain.Append( KCommonDialogsExSelected );
00208                 textSub.Append( KCommonDialogsExFile );
00209                 }
00210             else
00211                 {
00212                 textMain.Append( KCommonDialogsExCanceled );
00213                 textSub.Append( KCommonDialogsExSpace );
00214                 }
00215             iAppContainer->ShowTextL( textMain, textSub );
00216             CleanupStack::PopAndDestroy();
00217             break;
00218             }
00219 
00220         // Filename prompt
00221         case ECommonDialogsExCmd401:
00222             {
00223             returnValue = CAknFileNamePromptDialog::RunDlgLD( 
00224                                   defaultFileName, 
00225                                   KRootPath );
00226             if( returnValue )
00227                 {
00228                 textMain.Append( KCommonDialogsExSelected );
00229                 textSub.Append( KCommonDialogsExFileName );
00230                 }
00231             else
00232                 {
00233                 textMain.Append( KCommonDialogsExCanceled );
00234                 textSub.Append( KCommonDialogsExSpace );
00235                 }
00236             iAppContainer->ShowTextL( textMain, textSub );
00237             break;
00238             }
00239             
00240         default:
00241             {
00242             break;
00243             }
00244         }
00245     }

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

From CEikAppUi, handles key events.

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

Definition at line 85 of file CommonDialogsExAppUi.cpp.

00087     {
00088     return EKeyWasNotConsumed;
00089     }


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

© Nokia 2007

Back to top