telutils/dialpad/inc/dialpadmultitaphandler.h
branchRCL_3
changeset 19 7d48bed6ce0c
equal deleted inserted replaced
18:594d59766373 19:7d48bed6ce0c
       
     1 /*!
       
     2 * Copyright (c) 2009 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: Multitap handler
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALPADMULTITAPHANDLER_H_
       
    19 #define DIALPADMULTITAPHANDLER_H_
       
    20 
       
    21 #include <qobject.h>
       
    22 #include <QTime>
       
    23 #include <QMap>
       
    24 
       
    25 class HbLineEdit;
       
    26 
       
    27 class DialpadMultitapHandler : public QObject
       
    28     {
       
    29 public:
       
    30     explicit DialpadMultitapHandler(HbLineEdit& editor, QObject* parent=0);
       
    31     virtual ~DialpadMultitapHandler();
       
    32 
       
    33 protected:
       
    34     bool eventFilter(QObject *watched, QEvent *event);
       
    35 
       
    36 private:
       
    37     inline bool isNumericKey(int key);
       
    38 
       
    39 private:
       
    40     HbLineEdit& mEditor;
       
    41     QTime mMultitapTimer;
       
    42     int mAsteriskMultitapIndex;
       
    43     bool mGeneratedAsterisk;
       
    44     QMap<int,QChar> mExtraChar;
       
    45     };
       
    46 
       
    47 #endif /* DIALPADMULTITAPHANDLER_H_ */