calendarui/views/dayview/tsrc/unittests/unittest_calendaycontentscrollarea/hbswipegesture.h
changeset 70 a5ed90760192
equal deleted inserted replaced
64:1881ad52dc45 70:a5ed90760192
       
     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: Mocked classes for testing CalenDayContentScrollArea class
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef HBSWIPEGESTURE_H_
       
    19 #define HBSWIPEGESTURE_H_
       
    20 
       
    21 #include <QSwipeGesture>
       
    22 
       
    23 // Test variables
       
    24 extern Qt::GestureState gTestGestureState;
       
    25 extern qreal gTestSceneSwipeAngle;
       
    26 extern QSwipeGesture::SwipeDirection gTestSceneHorizontalDirection;
       
    27 
       
    28 /*!
       
    29  Mocked class HbSwipeGesture
       
    30  */
       
    31 class HbSwipeGesture : public QSwipeGesture
       
    32 {
       
    33     Q_OBJECT
       
    34     
       
    35 public:
       
    36     explicit HbSwipeGesture(QObject *parent = 0) {
       
    37         Q_UNUSED(parent)
       
    38     }
       
    39     ~HbSwipeGesture() {}
       
    40     
       
    41     qreal sceneSwipeAngle() const {
       
    42         return gTestSceneSwipeAngle;
       
    43     }
       
    44     
       
    45     SwipeDirection sceneHorizontalDirection() const {
       
    46         return gTestSceneHorizontalDirection;
       
    47     }
       
    48     
       
    49     Qt::GestureState state() const {
       
    50         return gTestGestureState;
       
    51     }
       
    52 };
       
    53 
       
    54 #endif /* HBSWIPEGESTURE_H_ */