camerauis/cameraxui/cxengine/inc/sensor/xqdeviceorientation_p.h
changeset 19 d9aefe59d544
equal deleted inserted replaced
3:8b2d6d0384b0 19:d9aefe59d544
       
     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 #ifndef XQDEVICEORIENTATIONPRIVATE_H
       
    18 #define XQDEVICEORIENTATIONPRIVATE_H
       
    19 
       
    20 #include "xqaccsensor.h"
       
    21 #include "xqdeviceorientation.h"
       
    22 
       
    23 class XQDeviceOrientationPrivate : public XQAbstractAccelerationSensorFilter
       
    24 {
       
    25 public:
       
    26     XQDeviceOrientationPrivate(XQDeviceOrientation& qq);
       
    27     virtual ~XQDeviceOrientationPrivate();
       
    28 
       
    29     void open();
       
    30     void close();
       
    31 
       
    32     void setResolution(TInt resolution);
       
    33     TInt resolution() const;
       
    34 
       
    35     int xRotation() const;
       
    36     int yRotation() const;
       
    37     int zRotation() const;
       
    38     XQDeviceOrientation::DisplayOrientation orientation() const;
       
    39 
       
    40 protected:  //from XQAbstractAccelerationSensorFilter
       
    41     bool filter(int& xAcceleration, int& yAcceleration, int& zAcceleration);
       
    42 
       
    43 private:
       
    44     TInt RoundAngle(TReal aAngle) const;
       
    45 
       
    46 private:
       
    47     XQDeviceOrientation& q;
       
    48     XQAccelerationSensor iAccelerationSensor;
       
    49     XQAccelerationDataPostFilter iAccelerationPostFilter;
       
    50     TInt iResolution;
       
    51     TInt iXRotation;
       
    52     TInt iYRotation;
       
    53     TInt iZRotation;
       
    54     XQDeviceOrientation::DisplayOrientation iOrientation;
       
    55 };
       
    56 
       
    57 #endif /*XQDEVICEORIENTATIONPRIVATE_H*/
       
    58 
       
    59 // End of file