telutils/dialpad/inc/dialpadkeysequenceeventfilter.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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: Implements key sequence recognition filter for Dialpad.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALPADKEYSEQUENCEEVENTFILTER_H
       
    19 #define DIALPADKEYSEQUENCEEVENTFILTER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <xqappmgr.h>
       
    23 #include <xqaiwinterfacedescriptor.h>
       
    24 
       
    25 class Dialpad;
       
    26 
       
    27 /*!
       
    28     DialpadKeySequenceEventFilter
       
    29     Class provides key sequence recognition and handling.
       
    30 */
       
    31 class DialpadKeySequenceEventFilter : public QObject
       
    32 {
       
    33     Q_OBJECT
       
    34 
       
    35 public:
       
    36     explicit DialpadKeySequenceEventFilter(
       
    37         Dialpad* dialpad, 
       
    38         QObject* parent = 0);
       
    39     virtual ~DialpadKeySequenceEventFilter();
       
    40 
       
    41 public:
       
    42     bool eventFilter(QObject *watched, QEvent *event);
       
    43 
       
    44 private:
       
    45     void constructKeySequenceToHandlerMappings();
       
    46     XQAiwInterfaceDescriptor findKeySequenceHandler(
       
    47         const QString &keySequenceCandidate);
       
    48     
       
    49 private:
       
    50     /*! Dialpad. Not own. */
       
    51     Dialpad* mDialpad;
       
    52     
       
    53     /*! Application manager. */
       
    54     XQApplicationManager mAiwMgr;
       
    55     
       
    56     /*! Key sequence validators and associated sequence handlers. */
       
    57     QMap<QString, XQAiwInterfaceDescriptor> mValidators;
       
    58 };
       
    59 
       
    60 #endif // DIALPADKEYSEQUENCEEVENTFILTER_H