camerauis/cameraxui/cxengine/inc/cxesensoreventhandlersymbian.h
branchRCL_3
changeset 24 bac7acad7cb3
parent 23 61bc0f252b2b
child 25 2c87b2808fd7
equal deleted inserted replaced
23:61bc0f252b2b 24:bac7acad7cb3
     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 CXESENSOREVENTHANDLERSYMBIAN_H
       
    19 #define CXESENSOREVENTHANDLERSYMBIAN_H
       
    20 
       
    21 #include "cxesensoreventhandler.h"
       
    22 #include "xqdeviceorientation.h"
       
    23 #include "cxenamespace.h"
       
    24 
       
    25 // forward delcaration
       
    26 class XQDeviceOrientation;
       
    27 
       
    28 /*!
       
    29     \class CxeSensorEventHandlerSymbian.
       
    30     Implements CxeSensorEventHandler.
       
    31 */
       
    32 class CxeSensorEventHandlerSymbian : public CxeSensorEventHandler
       
    33 {
       
    34     Q_OBJECT
       
    35 
       
    36 public:
       
    37     CxeSensorEventHandlerSymbian();
       
    38     ~CxeSensorEventHandlerSymbian();
       
    39 
       
    40     /*!
       
    41         Data read from sensor. The type of data embedded in QVariant is
       
    42         specific to sensor type.
       
    43     */
       
    44     QVariant sensorData(CxeSensorEventHandler::SensorType type);
       
    45 
       
    46 public slots:
       
    47     /*!
       
    48         init sensors
       
    49     */
       
    50     void init();
       
    51 
       
    52     /*!
       
    53         de-init sensors
       
    54     */
       
    55     void deinit();
       
    56 
       
    57 private slots:
       
    58     void handleOrientationChanged(XQDeviceOrientation::DisplayOrientation sensorData);
       
    59 
       
    60 private:
       
    61     void enableOrientationSensor();
       
    62     void disableOrientationSensor();
       
    63     Cxe::DeviceOrientation mapOrientationSensorData(
       
    64             XQDeviceOrientation::DisplayOrientation sensorData);
       
    65 
       
    66 private:
       
    67     XQDeviceOrientation *mOrientationSensor;
       
    68 };
       
    69 
       
    70 
       
    71 #endif // CXESENSOREVENTHANDLERSYMBIAN_H