camerauis/cameraxui/cxengine/inc/cxesensoreventhandlerdesktop.h
changeset 46 c826656d6714
equal deleted inserted replaced
42:feebad15db8c 46:c826656d6714
       
     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 #ifndef CXESENSOREVENTHANDLERDESKTOP_H_
       
    18 #define CXESENSOREVENTHANDLERDESKTOP_H_
       
    19 
       
    20 #include <QObject>
       
    21 #include <QMetaType>
       
    22 
       
    23 #include "cxesensoreventhandler.h"
       
    24 
       
    25 class CxeSensorEventHandlerDesktop : public CxeSensorEventHandler
       
    26 {
       
    27     Q_OBJECT
       
    28 
       
    29 public:
       
    30 
       
    31      // ! Sensor types handled and supported in cxengine.
       
    32     enum SensorType
       
    33         {
       
    34         //! Listening to orientation sensor events
       
    35         OrientationSensor
       
    36         };
       
    37 
       
    38     CxeSensorEventHandlerDesktop();
       
    39     virtual ~CxeSensorEventHandlerDesktop();
       
    40 
       
    41     /**
       
    42     * Data read from sensor. The "type" of data embedded in QVariant is specific to sensor type.
       
    43     */
       
    44     virtual QVariant sensorData(CxeSensorEventHandler::SensorType type);
       
    45 
       
    46 public slots:
       
    47     virtual void init();
       
    48     virtual void deinit();
       
    49 
       
    50 signals:
       
    51     /*
       
    52     * A signal indicating that there is new sensor event data available.
       
    53     */
       
    54     void sensorEvent(CxeSensorEventHandler::SensorType type, QVariant data);
       
    55 
       
    56 };
       
    57 #endif /* CXESENSOREVENTHANDLERDESKTOP_H_ */