summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* qtlite: Skip building examples when configured with no-feature-itemviews5.10Rainer Keller2018-01-241-0/+1
| | | | | | Task-number: QTBUG-53141 Change-Id: I98086d0c1877b8345ee76553eea19738023aebae Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Be consistent about values related to pi (radian / degree ratio)Edward Welbourne2017-07-062-5/+5
| | | | | | | | | | | | | | | Use JavaScript's Math.PI to compute 180 / pi (the number of degrees in one radian), rather than a hand-coded value for this constant. Store the result in a readonly property double to avoid repeating the computation. Tweak the pitch and roll calculations to use more apt Math methods: use hypot rather than sqrt of a sum of squares, and use atan2 instead of a tan of a ratio (whose denominator is always positive, so this doesn't change which angle we get). Task-number: QTBUG-58083 Change-Id: Ic3f865dfcbd9b02a0b93f065995d850386aef18c Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix sensor explorer build on macOSEike Ziller2017-05-291-1/+3
| | | | | | | | | The QML module is looked for next to the application binary, which on macOS is within the application bundle. Task-number: QTBUG-56669 Change-Id: I18abfcaf383fb075fec4d3158db58e7ea68ee280 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix grue sensor example building on macOSEike Ziller2017-05-295-7/+19
| | | | | | Task-number: QTBUG-33875 Change-Id: Idd72b689aaae727df77daecb616d5c47b9bb809c Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Fix licensingJani Heikkinen2017-05-1057-173/+593
| | | | | | | | | | | | | | | | | - Remove unused old license files - Update BSD and FDL license headers - Unify licensing * Examples are nowdays licensed under BSD, update correct license header to there * Tools and tests are nowdays licensed under GPL-EXCEPT, update correct license header to those * Src is nowdays licensed under LGPL, update correct license header to there Task-number: QTBUG-57147 Change-Id: I5d9d7a3bc5e360f01ec73fb6a2a873f3173b5918 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Example: use atan2 for simpler angle calculationsEdward Welbourne2017-01-161-15/+1
| | | | | | | | | This replaces calls to sqrt, acos and asin (plus some arithmetic and fix-up) with a single call to atan2; it also avoids dividing by a potentially zero length. Change-Id: I694fa9e3e2bcdbcf1a4eb4c5d428e2c53ea21732 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix loading of QML pluginsv5.8.0-alpha1Simon Hausmann2016-08-262-2/+2
| | | | | | | | | | Since commit 709f6370884b110def2e4665df8fa7bbf5fae734 the plugin loader is strict about requiring the correct interface id, to avoid loading unrelated plugins in the loader thread (which they may not be prepared to do). Change-Id: I84e4d927489f9a14615db399b560af4b352bf045 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-05-1914-26/+31
|\ | | | | | | Change-Id: Ie2002a0be7fcb6bd9b81792a1e50b4ffb6c1acc3
| * fix example installsOswald Buddenhagen2016-05-1010-2/+21
| | | | | | | | | | | | Change-Id: Id7b94644f9db10bce3ef3539f4ff275f5f6f37b0 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * make plugin .json naming better follow the project structureOswald Buddenhagen2016-05-106-4/+4
| | | | | | | | | | | | | | | | it's more intuitive that way, and easier to deal with for the example source install magic. Change-Id: I547717463756c4b0bb86e401abfb5ddf7a605020 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * make use of COPIESOswald Buddenhagen2016-04-282-20/+6
| | | | | | | | | | Change-Id: I1df10894b0d0e4adba411db2dfc818f8bd39f6df Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-0710-0/+0
|\ \ | |/ | | | | | | | | | | Conflicts: src/sensors/doc/src/compatmap.qdoc Change-Id: I7bd464cbd506f630798091fef3896050ade7b3f8
| * Purge sRGB chunks from PNGs in documentation.Edward Welbourne2016-03-013-0/+0
| | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce -force Change-Id: Ie54ce7153b23632cf2673f6f82ae8b3e4dec6e67 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
| * Purge sRGB chunks from PNGs in examples.Edward Welbourne2016-03-017-0/+0
| | | | | | | | | | | | | | | | Subjects each *.png file that matched grep -law "sRGB" to: pngcrush -ow -brute -rem allb -reduce Change-Id: I4e15dcbf74334985f4a3e366443b2be7016e76a3 Reviewed-by: Lorn Potter <lorn.potter@canonical.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7v5.7.0-alpha1Liang Qi2016-02-191-9/+9
|\ \ | |/ | | | | | | | | | | | | Conflicts: .qmake.conf src/sensors/doc/src/compatmap.qdoc Change-Id: I4049bc3c335a8a9db5c935032207d0bcfba78480
| * Fixed qmlqtsensors exampleOliver Wolff2015-12-031-9/+9
| | | | | | | | | | | | | | | | | | | | There were API changes, that broke the current version. Both the tilt sensor's value and the ambient light sensor's enum value are now part of the reading's instead of the sensor's API. Change-Id: I774ecbcacdcce537358fdb0f3a6794a89572742d Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-207-112/+231
|/ | | | | | | | | | From Qt 5.7 -> examples are lisenced under BSD license, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new BSD header instead of LGPL21 one (in those files which will be under BSD) Change-Id: Ife4aff1bffc18ca3094f6dd3c1c3d00e2898d237 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Purge spurious execute permissions from a graphic.Edward Welbourne2015-09-291-0/+0
| | | | | | Change-Id: I270fdd3681cbfedef6ccd05a7391b57821524b30 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* iOS: update Info.plist so that app runsv5.5.0-beta1Richard Moe Gustavsen2015-04-271-7/+6
| | | | | | | | | Some extra fields added, and some removed, so that the app runs on device. Also added iPhone6/6+ support. Change-Id: I7e2d0337a162a45f1ba37f16ad8ef902b61c7719 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> Reviewed-by: Caroline Chao <caroline.chao@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-1757-265/+265
| | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Change-Id: I141862df4ed2475c05ebbeb8fe447c4a6e736849 Reviewed-by: Antti Kokko <antti.kokko@theqtcompany.com>
* Remove unnecessary \inqmlmodule parameterAlejandro Exojo2014-12-081-2/+2
| | | | | Change-Id: I23232dcb9d13605f973144f64ffb93b0d9013c65 Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Remove cube exampleAlex Blasche2014-09-1814-665/+0
| | | | | | | | | | The example doesn't offer much example value. The accelerometer is presented by the accelbubble example too but doesn't have all the Qt3d dependencies. Cutting those dependencies is much cleaner. Task-number: QTBUG-31076 Change-Id: I074b24974cbd630d7b6ccc9eb21d8cabc96da86c Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix a couple of issues in the maze exampleAlex Blasche2014-09-184-10/+65
| | | | | | | | | | | | | | | | | | | 1.) Remove dependency on QtSystemInfo. The module is not officially supported at this stage and screen saver related code is not really required for the example. 2.) Add AndroidManifest.xml to lock the screen orientation in portrait mode. Since the example depends on the tilt sensor a rotating UI is messing the game up. 3.) Port app to current TiltSensor API. The game works but its biggest problem remains the UI. It uses fixed-size UI elements which makes it tiny on High DPI screens. Task-number: QTBUG-31076 Change-Id: I73df9361b5171da930df66072e8ee9eba89b71ad Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* Update license headers and add new licensesJani Heikkinen2014-08-247-133/+77
| | | | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: I99c601a398559886c2900f3e04833acfceba8263 Reviewed-by: Antti Kokko <antti.kokko@digia.com> Reviewed-by: BogDan Vatra <bogdan@kde.org> Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
* Merge remote-tracking branch 'origin/release' into stableJani Heikkinen2014-04-233-0/+45
|\ | | | | | | Change-Id: I0a9d2e3cbcbe5adcbfc1dbcef3a9d3e7f52d4b90
| * accelbubble: disable rotation on iOSFawzi Mohamed2014-04-172-0/+42
| | | | | | | | | | Change-Id: Ia3f6bdd494b3d167121bd8ee80f81c031a81f45a Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
| * accelbubble: avoid updating position if NaN.Fawzi Mohamed2014-04-171-0/+3
| | | | | | | | | | | | | | Invalid sensor data is NaN, and should be ignored. Change-Id: I6436bdd494b3d167121bd8ee80f81c031e60743e Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Change slashes depending on host in examples.Friedemann Kleint2014-04-152-2/+2
|/ | | | | | Task-number: QTBUG-38224 Change-Id: I3c7a3d0b3a47696aeb2eee799ae119419ea60713 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
* add PLUGIN_CLASS_NAME declarations to plugin projectsOswald Buddenhagen2014-04-091-0/+2
| | | | | | | | | | | needed for automatic static linking (and later deployment). the gesture plugins are excluded from the automation based on the assumption that they are usually not needed. the example and the test plugin are also excluded for obvious reasons. Change-Id: I7645aa0daf216ce430989e13d4380dbe6dd2bbd1 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Accelbubble example only really works with a locked UI to portraitAlex Blasche2014-04-082-1/+52
| | | | | | | | On Android we have to do that via a custom AndroidManifest. Change-Id: If436bdd494b3d167121bd8ee80f81c031a81f5d5 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
* Fix the examples so they can be deployed on AndroidAndy Shaw2014-03-1018-43/+25
| | | | | | Change-Id: I8d3b0c84091cf7743164c083318e0a115e948d1c Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Fix some typos in comments and documentationSergio Ahumada2014-03-042-4/+4
| | | | | Change-Id: I8541601c0bfe2b7c80e88b4617e8215b266fb0bd Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
* QML examples: Avoid using release/debug output subdirectoryv5.2.0-rc1Topi Reinio2013-11-212-0/+7
| | | | | | | | | | | | | | | Qt Sensors examples that include additional QML modules fail to run on Windows, because the application located under a debug or release subdirectory does not see the module import path. This change fixes the issue by adjusting examples' DESTDIR on Windows builds. Task-number: QTBUG-33875 Change-Id: Iab8ebc1acd80cf4fe88a7a35b44c42f767da5ccf Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Doc: Update Sensor Explorer exampleTopi Reinio2013-11-1119-698/+251
| | | | | | | | | | | | | | | | Following changes are made to the example - Use of Qt Quick Controls / TableView to present the sensor information, reducing the example to a single QML file - Updated launcher main.cpp for the QML example - Remove separate example doc for the import subproject - Various fixes to example doc, add a screenshot - Ensure import module + qmldir are built/deployed to correct location Task-number: QTBUG-32881 Task-number: QTBUG-33875 Change-Id: I0ed7c7ebc916fcad6da5e3c66d81be8f348a93e1 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
* Doc: Clean up SensorGesture QML exampleTopi Reinio2013-11-045-71/+80
| | | | | | | | | | Fix warnings, fix property names and strings shown in the UI. Also touch the documentation and correct a typo in the qdoc file name. Task-number: QTBUG-33877 Change-Id: Ie790708ac4d1f8d72af03b52ee361d0bf3994adc Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Unambiguous example nameAndreas Holzammer2013-11-041-1/+1
| | | | | | | | | | For the example a QML plugin with the same name is created, which just differs in case. Windows does not support case sensitive files/folders. So QNX compile under windows fails. Change-Id: I20283fd9ebb125475c5e7ba19a35a67569785c69 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* grue example: Set qmldir.path correctly.Dmitry Shachnev2013-10-301-1/+1
| | | | | | | | | | It should be $$DESTPATH, not $$DESTDIR, otherwise the build will install files to wrong locations like debian/tmp/build/buildd/... when building Debian packages. Change-Id: Iae1bd2d190dd1653f06d0f043f1b701b7cb46eb4 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com> Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2013-09-0612-74/+125
|\ | | | | | | Change-Id: Ie5c68600ed2b7d6145497dcbceae5f320f7eea6f
| * Remove the explicit core/gui explicit QT addition for the gestures exampleLaszlo Papp2013-09-061-1/+1
| | | | | | | | | | Change-Id: Ie3087e97815ee59df4af732ce3b663ad283966bf Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
| * Doc: Update Grue Sensor exampleTopi Reinio2013-08-1411-73/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of issues with the example: - Add \omit to generated doc sections, we don't want qdoc to process these (not part of Qt docs) - Combine the 5 separate examples into a single \example and discuss each subproject in a subsection - Add example image to doc - Fix deployment/build target directories and import paths - Define a 'reading' property for the sensor to make it work on QtSensors 5.1 - Fix the Grue QML application to avoid flicker from frequent updates. Task-number: QTBUG-32881 Change-Id: I2785faead1baaf5b1ae9d05df3398e018e945418 Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* | Merge remote-tracking branch 'origin/stable' into devFrederik Gladhorn2013-08-129-30/+58
|\ \ | |/ | | | | Change-Id: I7a9c32e8314fe1f753e40464cc5fbd16895c3665
| * Updated the example to use SVG content and Qt Quick controls.v5.1.1Venu2013-08-029-30/+58
| | | | | | | | | | | | | | | | | | | | | | Using sensors module and svg content in a Qt Quick app has been tricky so far as the C++ plug-in dependencies are not detected automatically by creator. This change is intended to make the app suitable for a tutorial explaining how to create a Qt Quick app for Android. Change-Id: I05b7413b1224e009ae739cf7a16181519cab7619 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
* | Enable the Grue sensor plugin no matter what other sensor plug-in is installedAlex Blasche2013-07-291-1/+1
|/ | | | | | | | | | If multiple plugins with the same key are installed only the first one is used and any subsequent plugin with the same key is ignored. This prevents the Grue example from working as it requires a Light sensor and the Grue sensor. All other plug-ins use the "unused" key. Change-Id: I3cb28d3ffec407fb27b4550521acf28bd9c7b073 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Fix loading of all sensorgesture plugins.v5.1.0-rc2v5.1.0Lorn Potter2013-06-222-2/+1
| | | | | | | | | | | | | | After the change in qtbase 732dcfe7, only the first sensorgesture plugin was actually being loaded. Since the FILE argument of Q_PLUGIN_METADATA is optional, removing that and the json file fixes the following bugs: QTBUG-31900 QTBUG-31901 Change-Id: I7c0b67605a8fe680c37639f08926140e137dbe66 Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Doc: Fix errors in Qt Sensors QML exampleTopi Reinio2013-05-274-187/+149
| | | | | | | | | | This change fixes the errors in example QML code by replacing the overuse of anchors with Column/Row components, and cleaning up by refactoring reusable code into a new QML type. Task-number: QTBUG-31076 Change-Id: Iade6f98d7db716848c44d4066aa23064929b32f2 Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Sensors examples: Use resource system for QML examplesTopi Reinio2013-05-2317-1/+116
| | | | | | | | | | | Adds resources (.qml, .js, images, etc.) used in QML examples as Qt resources. This enables running the examples successfully when shadow building, without copying the files around. Task-number: QTBUG-31076 Change-Id: I0f3352cffdc334f6139aac60acd3345710516d65 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* Add module check to examples .pro-file.Friedemann Kleint2013-05-211-2/+6
| | | | | | | Task-number: QTBUG-31076 Change-Id: I345cb91f82262b64c2d414bec585e5a7ca724ce3 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* remove nokia and replace with qt-project in pluginsLorn Potter2013-02-071-1/+1
| | | | | Change-Id: I63fa985991653e4b8465a7fb88acab647d8546e8 Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
* make use of qtHaveModule()Oswald Buddenhagen2013-01-082-3/+3
| | | | | | | | Change-Id: I17123244323118e9dc9faa090f94faa9b2dcb795 Reviewed-by: Tasuku Suzuki <stasuku@gmail.com> Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com> Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
* It's org.qt-project for plugin interfacesLorn Potter2012-11-291-1/+1
| | | | | Change-Id: I4b442f25f4593f2d957ff572b5ec565ff952818b Reviewed-by: Lorn Potter <lorn.potter@gmail.com>