telutils/dialpad/src/dialpadvtkeyhandler.cpp
changeset 23 427125ac6cb8
equal deleted inserted replaced
19:e44a8c097b15 23:427125ac6cb8
       
     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: Custom button
       
    15 *
       
    16 */
       
    17 
       
    18 #include <hbmainwindow.h>
       
    19 #include "dialpadvtkeyhandler.h"
       
    20 #include "dialpadkeysequenceeventfilter.h"
       
    21 #include "dialpademergencycalleventfilter.h"
       
    22 #include "qtphonesrvlog.h"
       
    23 
       
    24 DialpadVtKeyHandler::DialpadVtKeyHandler(
       
    25     Dialpad *dialPad, HbMainWindow& mainWindow, QObject *parent) 
       
    26     : 
       
    27     QObject(parent),
       
    28     mMainWindow(mainWindow),
       
    29     mEmergencyCallFilter(0),
       
    30     mKeySequenceFilter(0)
       
    31 {
       
    32     PHONE_TRACE;
       
    33     mEmergencyCallFilter = new DialpadEmergencyCallEventFilter(dialPad, this);
       
    34     mKeySequenceFilter = new DialpadKeySequenceEventFilter(dialPad, this);
       
    35     
       
    36     // Stack different event filters
       
    37     mMainWindow.installEventFilter(mKeySequenceFilter);
       
    38     mMainWindow.installEventFilter(mEmergencyCallFilter);
       
    39 }
       
    40 
       
    41 DialpadVtKeyHandler::~DialpadVtKeyHandler()
       
    42 {
       
    43 }