equal
deleted
inserted
replaced
|
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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "glxorientationsensorfilter.h" |
|
19 |
|
20 GlxOrientationSensorFilter::GlxOrientationSensorFilter() |
|
21 { |
|
22 qDebug("GlxOrientationSensorFilter::GlxOrientationSensor() enter" ); |
|
23 m_orientation = new QOrientationSensor(); |
|
24 m_orientation->addFilter( this ); |
|
25 m_orientation->start(); |
|
26 mOrient = QOrientationReading::Undefined ; |
|
27 qDebug("GlxOrientationSensorFilter::GlxOrientationSensor() exit" ); |
|
28 } |
|
29 |
|
30 GlxOrientationSensorFilter::~GlxOrientationSensorFilter() |
|
31 { |
|
32 m_orientation->stop(); |
|
33 delete m_orientation; |
|
34 } |
|
35 |
|
36 bool GlxOrientationSensorFilter::filter( QOrientationReading *reading ) |
|
37 { |
|
38 qDebug("GlxOrientationSensorFilter::GlxOrientationSensor() filter " ); |
|
39 mOrient = reading->orientation() ; |
|
40 qDebug("GlxOrientationSensorFilter::filter() orientation = %d", mOrient ); |
|
41 return false; |
|
42 } |