phoneapp/phoneuiview/src/cphonequerydialog.cpp
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of CPhoneQueryDialog class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include "cphonequerydialog.h"
       
    21 #include "phoneui.hrh"
       
    22 
       
    23 // ================= MEMBER FUNCTIONS =======================
       
    24 // C++ default constructor can NOT contain any code, that
       
    25 // might leave.
       
    26 //
       
    27 CPhoneQueryDialog::CPhoneQueryDialog( const TTone& aTone ) :
       
    28 	CAknQueryDialog( aTone )
       
    29     {
       
    30     }
       
    31 
       
    32 // ---------------------------------------------------------
       
    33 // Destructor
       
    34 // ---------------------------------------------------------
       
    35 // 
       
    36 CPhoneQueryDialog::~CPhoneQueryDialog()
       
    37     {
       
    38     }
       
    39 
       
    40 // ---------------------------------------------------------
       
    41 // CPhoneQueryController::NewL()
       
    42 // Two-phased constructor
       
    43 // ---------------------------------------------------------
       
    44 //
       
    45 CPhoneQueryDialog* CPhoneQueryDialog::NewL( const TTone& aTone )
       
    46 	{
       
    47 	CPhoneQueryDialog* self = new( ELeave )CPhoneQueryDialog( aTone );
       
    48 	return self;	
       
    49 	}
       
    50 
       
    51 // ---------------------------------------------------------
       
    52 // CPhoneQueryDialog::OfferKeyEventL
       
    53 // ---------------------------------------------------------
       
    54 //
       
    55 TKeyResponse CPhoneQueryDialog::OfferKeyEventL( 
       
    56     const TKeyEvent& aKeyEvent,
       
    57     TEventCode aType )
       
    58     {
       
    59 	if ( aKeyEvent.iScanCode == EStdKeyNo || aKeyEvent.iCode == EKeyNo )
       
    60 		{
       
    61 		OkToExitL( EPhoneCmdDoNothing );
       
    62 		return EKeyWasNotConsumed;
       
    63 		}
       
    64 	else
       
    65 		{
       
    66 		return CAknQueryDialog::OfferKeyEventL( aKeyEvent, aType );
       
    67  		}
       
    68     }
       
    69 
       
    70 // End of File