×
Namespaces

Variants
Actions
(Difference between revisions)

QtOrientationTest

From Nokia Developer Wiki
Jump to: navigation, search
axeljaeger (Talk | contribs)
(Initial version)
 
kiran10182 (Talk | contribs)
m (Using embedvideo)
Line 18: Line 18:
  
 
==In action==
 
==In action==
See the application in action on youtube: http://www.youtube.com/watch?v=7S0Df59_sKY
+
See the application in action on youtube:  
 +
 
 +
{{#ev:youtube|7S0Df59_sKY}}
  
 
==Testing the application==
 
==Testing the application==

Revision as of 17:40, 29 March 2010

Article Metadata
Tested with
Devices(s): Nokia 5800 XpressMusic, Nokia N97 mini
Compatibility
Platform(s): S60 5th Edition
Symbian
S60 5th Edition
Article
Keywords: Orientation, Sensor, Accelerometer
Created: (29 Mar 2010)
Last edited: kiran10182 (29 Mar 2010)

Underconstruction.pngUnder Construction: This article is under construction and it may have outstanding issues. If you have any comments please use the comments tab.

Contents

Overview

The QtOrientationTest shows shows how to obtain the device orientation and adopt the user interface accordingly. An arrow is shown on the display that is pointing "upwards". If the device is flat on the table or face down, either a circle with a dot or a cross is shown, meaning you look to the pointy end of the arrow or from the back to the fletchings.

The example currently uses the deprecated so called "Qt Mobile Extensions" and will be ported to the new sensor-API of the "QtMobility-APIs".


In action

See the application in action on youtube:


Testing the application

The example is either be meant to be compiled directly for the device or as a desktop application. When compiled for the device, the real sensor API is used. When compiled as a desktop application, a stub implementation of the sensor API is used that shows a window with 6 buttons to set the orientation.

Download Code Example

File:Orientationtest.zip

86 page views in the last 30 days.