qstmgesturelib/recognisers/qstmhoveringgesturerecogniser.h
changeset 0 1450b09d0cfd
child 3 0954f5dd2cd0
equal deleted inserted replaced
-1:000000000000 0:1450b09d0cfd
       
     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 QSTMHOVERINGGESTURERECOGNISER_H_
       
    19 #define QSTMHOVERINGGESTURERECOGNISER_H_
       
    20 
       
    21 #include <qstmgestureengine_if.h>
       
    22 #include <qstmgesture_if.h>
       
    23 #include <qstmgesturelistener_if.h>
       
    24 
       
    25 namespace qstmGesture
       
    26 {
       
    27 /*!
       
    28  * Recognise hovering gesture.
       
    29  * If the EMove distance from previous is short enough, then
       
    30  * we assume hovering gesture.  If the previous UI event is ETouch, EHold or EMove
       
    31  * and the distance is short enough the gesture takes control.
       
    32  */
       
    33 class QStm_HoveringGestureRecogniser : public QStm_GestureRecogniser
       
    34 {
       
    35 public:
       
    36     static const QStm_GestureUid KUid = EGestureUidHover;
       
    37 
       
    38     virtual ~QStm_HoveringGestureRecogniser();
       
    39     virtual QStm_GestureRecognitionState recognise(int numOfActiveStreams, QStm_GestureEngineIf* ge) ;
       
    40     virtual void release(QStm_GestureEngineIf* ge) ;
       
    41 
       
    42     virtual QStm_GestureUid gestureUid() const { return KUid; }
       
    43 
       
    44     void setHoveringSpeed(float aSpeed) /*__SOFTFP */;
       
    45 
       
    46     QStm_HoveringGestureRecogniser(QStm_GestureListenerIf* listener) ;
       
    47 private:
       
    48     bool m_hovering ;
       
    49     float m_hoveringspeed ;
       
    50 };
       
    51 
       
    52 }
       
    53 
       
    54 #endif /* QSTMHOVERINGGESTURERECOGNISER_H_ */