telutils/dialpad/inc/dialpadinternaleventfilter.h
changeset 48 78df25012fda
equal deleted inserted replaced
46:2fa1fa551b0b 48:78df25012fda
       
     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: Dialpad keypad
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALPADINTERNALEVENTFILTER_H
       
    19 #define DIALPADINTERNALEVENTFILTER_H
       
    20 
       
    21 #include <QObject>
       
    22 #include <QTimer>
       
    23 
       
    24 /**
       
    25 * Event filter for internal development purposes.
       
    26 * PhoneUi.exe can be shut down with long press 9 and
       
    27 * restarted with long press 8 in Dialpad
       
    28 */
       
    29 class DialpadInternalEventFilter : public QObject
       
    30 {
       
    31     Q_OBJECT
       
    32     
       
    33 public:
       
    34     DialpadInternalEventFilter();
       
    35     ~DialpadInternalEventFilter(); 
       
    36 protected:
       
    37     bool eventFilter(QObject *watched, QEvent *event);
       
    38 private slots:
       
    39     void togglePhoneUi();
       
    40 private:    
       
    41     void shutdown();
       
    42     void start();
       
    43 
       
    44 private:
       
    45     QTimer *mLongPressTimer;
       
    46     int mKey;
       
    47 };
       
    48 
       
    49 #endif // DIALPADINTERNALEVENTFILTER_H