telutils/dialpad/inc/dialpadkeysequenceeventfilter.h
changeset 19 e44a8c097b15
child 31 a2467631ae02
equal deleted inserted replaced
15:d7fc66ccd6fb 19:e44a8c097b15
       
     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 
       
    23 class Dialpad;
       
    24 
       
    25 /*!
       
    26     DialpadKeySequenceEventFilter
       
    27     Class provides key sequence recognition and handling.
       
    28 */
       
    29 class DialpadKeySequenceEventFilter : public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32 
       
    33 public:
       
    34     explicit DialpadKeySequenceEventFilter(
       
    35         Dialpad* dialpad, 
       
    36         QObject* parent = 0);
       
    37     virtual ~DialpadKeySequenceEventFilter();
       
    38 
       
    39 public:
       
    40     bool eventFilter(QObject *watched, QEvent *event);
       
    41 
       
    42 private:
       
    43     /*!
       
    44        \fn bool preValidateKeySequence()
       
    45 
       
    46        Checks if the given sequence conforms key sequence command syntax.
       
    47        
       
    48        \return true if sequence conforms key sequence command syntax, 
       
    49        false otherwise.  
       
    50     */
       
    51     bool preValidateKeySequence(const QString &sequence);
       
    52     
       
    53 private:
       
    54     /*! Dialpad. Not own. */
       
    55     Dialpad* mDialpad;
       
    56 };
       
    57 
       
    58 #endif // DIALPADKEYSEQUENCEEVENTFILTER_H