uiservicetab/vimpstutils/src/vimpstutilsdialog.cpp
branchRCL_3
changeset 14 9fdee5e1da30
parent 0 5e5d6b214f4f
equal deleted inserted replaced
13:796276a1bdcc 14:9fdee5e1da30
    24 #include    <StringLoader.h>
    24 #include    <StringLoader.h>
    25 #include 	<AknQueryDialog.h> 
    25 #include 	<AknQueryDialog.h> 
    26 #include    <vimpstuires.rsg>
    26 #include    <vimpstuires.rsg>
    27 #include 	<AknQueryDialog.h>
    27 #include 	<AknQueryDialog.h>
    28 
    28 
    29 
    29 #include "uiservicetabtracer.h"
    30 
    30 
    31 
    31 
    32 // ---------------------------------------------------------
    32 // ---------------------------------------------------------
    33 // VIMPSTUtilsDialog::DisplayNoteDialogL
    33 // VIMPSTUtilsDialog::DisplayNoteDialogL
    34 // (other items were commented in a header).
    34 // (other items were commented in a header).
    36 //
    36 //
    37 EXPORT_C TInt VIMPSTUtilsDialog::DisplayNoteDialogL( const TDesC& aText,
    37 EXPORT_C TInt VIMPSTUtilsDialog::DisplayNoteDialogL( const TDesC& aText,
    38         const TInt aButtonsResourceId, /*= R_AVKON_SOFTKEYS_EMPTY*/
    38         const TInt aButtonsResourceId, /*= R_AVKON_SOFTKEYS_EMPTY*/
    39         const CAknNoteDialog::TTimeout& aTimeout /*= CAknNoteDialog::EShortTimeout*/ )
    39         const CAknNoteDialog::TTimeout& aTimeout /*= CAknNoteDialog::EShortTimeout*/ )
    40 	{
    40 	{
       
    41 	TRACER_AUTO;
    41 	// CodeScanner warning ignored because CS does not
    42 	// CodeScanner warning ignored because CS does not
    42     // notice that PrepareLC puts the dialog to cleanupstack
    43     // notice that PrepareLC puts the dialog to cleanupstack
    43     CAknNoteDialog* dlg = new ( ELeave ) CAknNoteDialog( // CSI: 35 # See comment above
    44     CAknNoteDialog* dlg = new ( ELeave ) CAknNoteDialog( // CSI: 35 # See comment above
    44 		CAknNoteDialog::EConfirmationTone , aTimeout );
    45 		CAknNoteDialog::EConfirmationTone , aTimeout );
    45 
    46 
    61 // ---------------------------------------------------------
    62 // ---------------------------------------------------------
    62 //
    63 //
    63 EXPORT_C TInt VIMPSTUtilsDialog::DisplayErrorNoteL( const TDesC& aText, 
    64 EXPORT_C TInt VIMPSTUtilsDialog::DisplayErrorNoteL( const TDesC& aText, 
    64 													TBool aSoftkeyOk /*= EFalse*/ )
    65 													TBool aSoftkeyOk /*= EFalse*/ )
    65 	{
    66 	{
       
    67 	TRACER_AUTO;
    66 	//TODO : Modify the function body when required later
    68 	//TODO : Modify the function body when required later
    67 	if( aSoftkeyOk )
    69 	if( aSoftkeyOk )
    68 	    {
    70 	    {
    69 	    return VIMPSTUtilsDialog::DisplayQueryDialogL( R_IM_ERROR_NOTE_TEMPLATE_WITH_OK, aText );
    71 	    return VIMPSTUtilsDialog::DisplayQueryDialogL( R_IM_ERROR_NOTE_TEMPLATE_WITH_OK, aText );
    70 	    }
    72 	    }
    88 // ---------------------------------------------------------
    90 // ---------------------------------------------------------
    89 //
    91 //
    90 EXPORT_C TInt VIMPSTUtilsDialog::DisplayQueryDialogL( TInt aDialogResourceId, 
    92 EXPORT_C TInt VIMPSTUtilsDialog::DisplayQueryDialogL( TInt aDialogResourceId, 
    91             											const TDesC& aPrompt )
    93             											const TDesC& aPrompt )
    92 	{
    94 	{
       
    95 	TRACER_AUTO;
    93 	CAknQueryDialog* dlg = new (ELeave) CAknQueryDialog(
    96 	CAknQueryDialog* dlg = new (ELeave) CAknQueryDialog(
    94 											CAknQueryDialog::ENoTone );
    97 											CAknQueryDialog::ENoTone );
    95 	if( aPrompt != KNullDesC )
    98 	if( aPrompt != KNullDesC )
    96 		{
    99 		{
    97 		CleanupStack::PushL( dlg );
   100 		CleanupStack::PushL( dlg );
   116         TBool aLeftSoftkeyAlwaysVisible /* = EFalse */,
   119         TBool aLeftSoftkeyAlwaysVisible /* = EFalse */,
   117         TLeftSoftkey /*aLeftSoftkey  = EDefault */,
   120         TLeftSoftkey /*aLeftSoftkey  = EDefault */,
   118         TInitialSelectionMode aSelectionMode /* = ESelectAll */,
   121         TInitialSelectionMode aSelectionMode /* = ESelectAll */,
   119         TBool aDomainSelectionQuery /* = EFalse */ )
   122         TBool aDomainSelectionQuery /* = EFalse */ )
   120     {
   123     {
       
   124 	TRACER_AUTO;
   121     // CodeScanner warning ignored because CS does not
   125     // CodeScanner warning ignored because CS does not
   122     // notice that PrepareLC puts the dialog to cleanupstack
   126     // notice that PrepareLC puts the dialog to cleanupstack
   123     CAknTextQueryDialog* dlg = CVIMPSTUtilsTextQueryDialog::NewL( aDataText, // CSI: 35 # See comment above
   127     CAknTextQueryDialog* dlg = CVIMPSTUtilsTextQueryDialog::NewL( aDataText, // CSI: 35 # See comment above
   124             CAknQueryDialog::ENoTone,
   128             CAknQueryDialog::ENoTone,
   125             aLeftSoftkeyAlwaysVisible,
   129             aLeftSoftkeyAlwaysVisible,
   171         const TDesC& aListEmptyText /*= KNullDesC*/,
   175         const TDesC& aListEmptyText /*= KNullDesC*/,
   172         const TBool aIsForwardQuery /* EFalse */,
   176         const TBool aIsForwardQuery /* EFalse */,
   173         const TBool /*aIsOnlySelect  = EFalse */ )
   177         const TBool /*aIsOnlySelect  = EFalse */ )
   174 
   178 
   175     {
   179     {
       
   180 	TRACER_AUTO;
   176     CAknListQueryDialog* dlg = new (ELeave) CAknListQueryDialog( 
   181     CAknListQueryDialog* dlg = new (ELeave) CAknListQueryDialog( 
   177                                                     aSelectedIndex );
   182                                                     aSelectedIndex );
   178     dlg->PrepareLC( aDialogResourceId );
   183     dlg->PrepareLC( aDialogResourceId );
   179     dlg->SetItemTextArray( aItemList );
   184     dlg->SetItemTextArray( aItemList );
   180     dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );
   185     dlg->SetOwnershipType( ELbmDoesNotOwnItemArray );