telutils/dialpad/inc/dialpademergencycalleventfilter.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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALPADEMERGENCYCALLEVENTFILTER_H
       
    19 #define DIALPADEMERGENCYCALLEVENTFILTER_H
       
    20 
       
    21 #include <QObject>
       
    22 
       
    23 class Dialpad;
       
    24 class CPhCltEmergencyCall;
       
    25 
       
    26 /*!
       
    27     DialpadEmergencyCallEventFilter
       
    28     Class provides emergency call key handling.
       
    29 */
       
    30 class DialpadEmergencyCallEventFilter : public QObject
       
    31 {
       
    32     Q_OBJECT
       
    33 
       
    34 public:
       
    35     explicit DialpadEmergencyCallEventFilter(Dialpad* dialpad, QObject* parent = 0);
       
    36     virtual ~DialpadEmergencyCallEventFilter();
       
    37 
       
    38 protected:
       
    39     bool eventFilter(QObject *watched, QEvent *event);
       
    40 
       
    41 private:
       
    42 
       
    43     /*!
       
    44        \fn void isEmergencyNumber()
       
    45 
       
    46        Checks is string emergency number.
       
    47     */
       
    48     bool isEmergencyNumber(QString string);
       
    49     
       
    50     /*!
       
    51        \fn void editorText()
       
    52 
       
    53        Returns text from editor (in western digits).
       
    54     */
       
    55     QString editorText();
       
    56     
       
    57     /*!
       
    58        \fn createCall(const QString phoneNumber)
       
    59 
       
    60        Creates call request to QT Highway.
       
    61     */
       
    62     void createCall(const QString &phoneNumber);
       
    63 
       
    64 protected slots:
       
    65 
       
    66     /*!
       
    67         \fn void editorTextChanged()
       
    68         
       
    69         This slot is called when dialpad editor text is changed.
       
    70     */
       
    71     void editorTextChanged();
       
    72     
       
    73 private:
       
    74     Dialpad* mDialpad;
       
    75     CPhCltEmergencyCall* mEmergency;
       
    76 };
       
    77 
       
    78 #endif // DIALPADEMERGENCYCALLEVENTFILTER_H