mmsharing/livecommsui/lcui/tsrc/ut_lcui/hbstubs/dialpadvtkeyhandler_stub.cpp
branchRCL_3
changeset 23 bc78a40cd63c
parent 22 73a1feb507fb
child 24 6c57ef9392d2
equal deleted inserted replaced
22:73a1feb507fb 23:bc78a40cd63c
     1 /*!
       
     2 * Copyright (c) 2010 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: Dialpad key handler.
       
    15 *
       
    16 */
       
    17 
       
    18 #include <dialpadvtkeyhandler.h>
       
    19 #include <hbmainwindow.h>
       
    20 #include <dialpad.h>
       
    21 
       
    22 #define EMERGENCY_NUMBER "112"
       
    23 
       
    24 DialpadVtKeyHandler::DialpadVtKeyHandler(Dialpad *dialPad, HbMainWindow& mainWindow, QObject * parent)
       
    25 	: mMainWindow( mainWindow ),
       
    26       mDialPad( dialPad )
       
    27 {
       
    28 	 Q_UNUSED(parent);
       
    29 }
       
    30 
       
    31 DialpadVtKeyHandler::~DialpadVtKeyHandler()
       
    32 {
       
    33 	
       
    34 }
       
    35 
       
    36 void DialpadVtKeyHandler::contentChanged( QString chrs )
       
    37 {
       
    38 	if( mDialPad ){
       
    39 		if( chrs == EMERGENCY_NUMBER ){
       
    40 			mDialPad->setCallButtonEnabled(true);
       
    41 		}else{
       
    42 			mDialPad->setCallButtonEnabled(false);
       
    43 		}
       
    44 	}		
       
    45 }