akntouchgesturefw/inc/akntouchgesturefwsettings.h
changeset 0 2f259fa3e83a
equal deleted inserted replaced
-1:000000000000 0:2f259fa3e83a
       
     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:  Touch gesture framework settings provider.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef C_AKNTOUCHGESTUREFWSETTINGS_H
       
    19 #define C_AKNTOUCHGESTUREFWSETTINGS_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 #include "akntouchgesturefwcenreplistener.h"
       
    24 
       
    25 class CRepository;
       
    26 
       
    27 namespace AknTouchGestureFw {
       
    28 
       
    29 /**
       
    30  * Touch gesture framework parameter provider.
       
    31  *
       
    32  */
       
    33 NONSHARABLE_CLASS( CAknTouchGestureFwSettings )
       
    34     : public CBase,
       
    35       public MAknTouchGestureFwCenRepObserver
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Two-phased constructor.
       
    42      */
       
    43     static CAknTouchGestureFwSettings* NewL();
       
    44 
       
    45     /**
       
    46      * Two-phased constructor.
       
    47      */
       
    48     static CAknTouchGestureFwSettings* NewLC();
       
    49 
       
    50     /**
       
    51      * Destructor.
       
    52      */
       
    53     virtual ~CAknTouchGestureFwSettings();
       
    54 
       
    55     /**
       
    56      * Returns flick point buffer value.
       
    57      *
       
    58      * @return Flick point buffer.
       
    59      */
       
    60     TInt FlickBuffer() const;
       
    61 
       
    62     /**
       
    63      * Returns long tap threshold value.
       
    64      *
       
    65      * @return Long tap threshold.
       
    66      */
       
    67     TInt LongTapThreshold() const;
       
    68 
       
    69     /**
       
    70      * Returns tap threshold value.
       
    71      *
       
    72      * @return Tap threshold.
       
    73      */
       
    74     TInt TapThreshold() const;
       
    75 
       
    76     /**
       
    77      * Returns double tap maximum duration value.
       
    78      *
       
    79      * @return Double tap maximum duration.
       
    80      */
       
    81     TInt DoubleTapMaximumDuration() const;
       
    82 
       
    83     /**
       
    84      * Returns drag threshold.
       
    85      *
       
    86      * @return Drag threshold.
       
    87      */
       
    88     TInt DragThreshold() const;
       
    89 
       
    90     /**
       
    91      * Returns flick speed threshold.
       
    92      *
       
    93      * @return Flick speed threshold.
       
    94      */
       
    95     TInt FlickSpeedThreshold() const;
       
    96 
       
    97     /**
       
    98      * Returns flick detection time.
       
    99      *
       
   100      * @return Flick detection time.
       
   101      */
       
   102     TInt FlickDetectionTime() const;
       
   103 
       
   104     /**
       
   105      * Returns flick direction change sensitivity.
       
   106      *
       
   107      * @return Flick direction change sensitivity.
       
   108      */
       
   109     TInt FlickChangeSensitivity() const;
       
   110 
       
   111     /**
       
   112      * Returns pinch initial threshold.
       
   113      *
       
   114      * @return Pinch initial threshold.
       
   115      */
       
   116     TInt PinchInitialThreshold() const;
       
   117 
       
   118     /**
       
   119      * Returns pinch movement threshold.
       
   120      *
       
   121      * @return Pinch movement threshold.
       
   122      */
       
   123     TInt PinchMovementThreshold() const;
       
   124 
       
   125     /**
       
   126      * Returns pinch direction change sensitivity.
       
   127      *
       
   128      * @return Pinch direction change sensitivity.
       
   129      */
       
   130     TInt PinchDirectionChangeSensitivity() const;
       
   131 
       
   132     /**
       
   133      * Returns pinch direction reset sensitivity.
       
   134      *
       
   135      * @return Pinch direction reset sensitivity.
       
   136      */
       
   137     TInt PinchDirectionResetSensitivity() const;
       
   138 
       
   139     /**
       
   140      * Returns pinch dimension threshold.
       
   141      * 
       
   142      * @return Pinch dimension threshold.
       
   143      */
       
   144     TInt PinchDimensionThreshold() const;
       
   145     
       
   146     /**
       
   147      * Returns maximum confirmation duration for pinch.
       
   148      * 
       
   149      * @return Pinch maximum confirmation duration.
       
   150      */
       
   151     TInt PinchMaximumConfirmationDuration() const;
       
   152     
       
   153 public: // From base class MAknTouchGestureFwCenRepObserver.
       
   154 
       
   155     /**
       
   156      * Informs the observer that the Central Repository
       
   157      * value has been changed.
       
   158      *
       
   159      * @param  aKey  CenRep value key.
       
   160      */
       
   161     void CenRepValueChanged( const TInt& aKey );
       
   162 
       
   163 private:
       
   164 
       
   165     /**
       
   166      * C++ constructor.
       
   167      */
       
   168     CAknTouchGestureFwSettings();
       
   169 
       
   170     /**
       
   171      * Symbian second-phase constructor.
       
   172      */
       
   173     void ConstructL();
       
   174 
       
   175     /**
       
   176      * Reads the touch gesture framework parameters from the central
       
   177      * repository.
       
   178      */
       
   179     void ReadValuesFromCenRep();
       
   180 
       
   181     /**
       
   182      * Sets the touch gesture framework parameters to default values.
       
   183      *
       
   184      * @param  aWriteToCenRep  @c ETrue if values should be written to CenRep.
       
   185      */
       
   186     void SetDefaultValues( TBool aWriteToCenRep );
       
   187 
       
   188     /**
       
   189      * Checks if the values are set.
       
   190      *
       
   191      * @return @c ETrue if values are set, @c EFalse otherwise.
       
   192      */
       
   193     TBool ValuesAreSet() const;
       
   194 
       
   195 private: // data
       
   196 
       
   197     /**
       
   198      * Central repository.
       
   199      * Own.
       
   200      */
       
   201     CRepository* iCenRep;
       
   202 
       
   203     /**
       
   204      * CenRep listener.
       
   205      * Own.
       
   206      */
       
   207     CAknTouchGestureFwCenRepListener* iListener;
       
   208 
       
   209     /**
       
   210      * Flick buffer value.
       
   211      */
       
   212     TInt iFlickBuffer;
       
   213 
       
   214     /**
       
   215      * Long tap threshold.
       
   216      */
       
   217     TInt iLongTapThreshold;
       
   218 
       
   219     /**
       
   220      * Tap threshold.
       
   221      */
       
   222     TInt iTapThreshold;
       
   223 
       
   224     /**
       
   225      * Double tap maximum duration.
       
   226      */
       
   227     TInt iDoubleTapMaximumDuration;
       
   228 
       
   229     /**
       
   230      * Drag threshold.
       
   231      */
       
   232     TInt iDragThreshold;
       
   233 
       
   234     /**
       
   235      * Flick speed threshold.
       
   236      */
       
   237     TInt iFlickSpeedThreshold;
       
   238 
       
   239     /**
       
   240      * Flick detection time.
       
   241      */
       
   242     TInt iFlickDetectionTime;
       
   243 
       
   244     /**
       
   245      * Flick direction change sensitivity.
       
   246      */
       
   247     TInt iFlickChangeSensitivity;
       
   248 
       
   249     /**
       
   250      * Pinch threshold.
       
   251      */
       
   252     TInt iPinchInitialThreshold;
       
   253 
       
   254     /**
       
   255      * Pinch movement threshold.
       
   256      */
       
   257     TInt iPinchMovementThreshold;
       
   258 
       
   259     /**
       
   260      * Pinch direction change sensitivity.
       
   261      */
       
   262     TInt iPinchDirectionChangeSensitivity;
       
   263 
       
   264     /**
       
   265      * Pinch direction reset sensitivity.
       
   266      */
       
   267     TInt iPinchDirectionResetSensitivity;
       
   268 
       
   269     /**
       
   270      * Pinch dimension threshold.
       
   271      */
       
   272     TInt iPinchDimensionThreshold;
       
   273     
       
   274     /**
       
   275      * Pinch maximum confirmation duration. 
       
   276      */
       
   277     TInt iPinchMaximumConfirmationDuration;
       
   278     
       
   279     };
       
   280 
       
   281 } // AknTouchGestureFw
       
   282 
       
   283 #endif // C_AKNTOUCHGESTUREFWSETTINGS_H