telutils/dialpad/tsrc/dialpadtest/dialpadtestview.h
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
child 21 0a6dd2dc9970
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DIALPADTESTVIEW_H
       
    19 #define DIALPADTESTVIEW_H
       
    20 
       
    21 #include <hbview.h>
       
    22 
       
    23 class HbMainWindow;
       
    24 class HbListWidget;
       
    25 class Dialpad;
       
    26 class DialpadKeyHandler;
       
    27 
       
    28 class DialpadTestView : public HbView
       
    29 {
       
    30     Q_OBJECT
       
    31 
       
    32 public:
       
    33     DialpadTestView( HbMainWindow& mainWindow );
       
    34     ~DialpadTestView();
       
    35 
       
    36 protected:
       
    37     bool eventFilter(QObject * watched, QEvent * event);
       
    38     bool event(QEvent * event);
       
    39 
       
    40 private:
       
    41     void createListWidget();
       
    42     void setDialpadPosition();
       
    43     void handleDial();
       
    44 
       
    45 private slots:
       
    46     void openDialpad();
       
    47     void onDialpadClosed();
       
    48     void switchOrientation();
       
    49     void onOrientationChange(Qt::Orientation orientation);
       
    50     void onEditorContentChanged();
       
    51     void handleLongKeyPress();
       
    52     void setTapOutsideDismiss();
       
    53 
       
    54 private:
       
    55     HbMainWindow& mMainWindow;
       
    56     HbListWidget* mListWidget;
       
    57     Dialpad* mDialpad;
       
    58     DialpadKeyHandler *mKeyhandler;
       
    59     QTimer* mLongPressTimer;
       
    60     QString mPressedKey;
       
    61     bool mTapOutsideDismiss;
       
    62 };
       
    63 
       
    64 #endif // DIALPADTESTVIEW_H