diff options
author | Jani Heikkinen <jani.heikkinen@digia.com> | 2014-04-23 12:45:40 +0300 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@digia.com> | 2014-04-23 12:45:40 +0300 |
commit | 606e40570be5af8d9f05c55affedd6b106889bf7 (patch) | |
tree | c3b9e94d08645081053cc571dba9aed629fceebb /examples | |
parent | 267a9f4c4ea5ecfd3e0bf1f0149401e7ba8d0c60 (diff) | |
parent | 8a0da79f058b7ee7cdf4a198fdf088e8a43565fb (diff) | |
download | qtsensors-606e40570be5af8d9f05c55affedd6b106889bf7.tar.gz |
Merge remote-tracking branch 'origin/release' into stable
Change-Id: I0a9d2e3cbcbe5adcbfc1dbcef3a9d3e7f52d4b90
Diffstat (limited to 'examples')
-rw-r--r-- | examples/sensors/accelbubble/Info.plist | 35 | ||||
-rw-r--r-- | examples/sensors/accelbubble/accelbubble.pro | 7 | ||||
-rw-r--r-- | examples/sensors/accelbubble/accelbubble.qml | 3 |
3 files changed, 45 insertions, 0 deletions
diff --git a/examples/sensors/accelbubble/Info.plist b/examples/sensors/accelbubble/Info.plist new file mode 100644 index 0000000..82e9bff --- /dev/null +++ b/examples/sensors/accelbubble/Info.plist @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>CFBundleDisplayName</key> + <string>accelbubble</string> + <key>CFBundleExecutable</key> + <string>accelbubble</string> + <key>CFBundleGetInfoString</key> + <string>Created by Qt/QMake</string> + <key>CFBundleIdentifier</key> + <string>com.digia.accelbubble</string> + <key>CFBundleName</key> + <string>accelbubble</string> + <key>CFBundlePackageType</key> + <string>APPL</string> + <key>CFBundleResourceSpecification</key> + <string>ResourceRules.plist</string> + <key>CFBundleShortVersionString</key> + <string>1.0</string> + <key>CFBundleSignature</key> + <string>????</string> + <key>CFBundleVersion</key> + <string>1.0</string> + <key>UIDeviceFamily</key> + <array> + <integer>1</integer> + <integer>2</integer> + </array> + <key>UISupportedInterfaceOrientations</key> + <array> + <string>UIInterfaceOrientationPortrait</string> + </array> +</dict> +</plist> diff --git a/examples/sensors/accelbubble/accelbubble.pro b/examples/sensors/accelbubble/accelbubble.pro index cdb6ab7..4204f15 100644 --- a/examples/sensors/accelbubble/accelbubble.pro +++ b/examples/sensors/accelbubble/accelbubble.pro @@ -15,4 +15,11 @@ OTHER_FILES = \ target.path = $$[QT_INSTALL_EXAMPLES]/sensors/accelbubble INSTALLS += target +ios { +QMAKE_INFO_PLIST = Info.plist + +# manual plugin loading needed with older Qt +# QTPLUGIN += qsvg qtsensors_ios qtsensors_generic +} + ANDROID_PACKAGE_SOURCE_DIR = $$PWD/android diff --git a/examples/sensors/accelbubble/accelbubble.qml b/examples/sensors/accelbubble/accelbubble.qml index 8f676dc..033e66a 100644 --- a/examples/sensors/accelbubble/accelbubble.qml +++ b/examples/sensors/accelbubble/accelbubble.qml @@ -69,6 +69,9 @@ ApplicationWindow { var newX = (bubble.x + calcRoll(accel.reading.x, accel.reading.y, accel.reading.z) * .1) var newY = (bubble.y - calcPitch(accel.reading.x, accel.reading.y, accel.reading.z) * .1) + if (isNaN(newX) || isNaN(newY)) + return; + if (newX < 0) newX = 0 |