summaryrefslogtreecommitdiff
path: root/examples
Commit message (Collapse)AuthorAgeFilesLines
* QtPositioning: update weatherinfo exampleIvan Solovev2021-03-236-31/+71
| | | | | | | | | | | | | | | | Update the logic of the queryCity(): - call it immediately afther GPS state change, if the GPS position is already received (not wait for the next positionUpdate, as it may come only when coordinates actually change, depending on used plugin). - check that we still use GPS, when the reply is received (as we could have already switched to another city). Also update the QML registration to Qt6 way. Task-number: QTBUG-89855 Change-Id: I0bb1aa445763a7c9b125008d71220e1e735c1b6f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: improve logfilepositionsource example documentationIvan Solovev2021-03-231-11/+18
| | | | | | | | | | | Removed the mentioning of NMEA format, because the file format has nothing to do with it. Reworded some other pieces of the description in a bit nicer way. Task-number: QTBUG-89855 Change-Id: I66450b201042786a3fe8aec4ef56f0dafca2a9c2 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* QtPositioning: improve satelliteinfo exampleIvan Solovev2021-03-237-12/+95
| | | | | | | | | | Register model for QML using QML_ELEMENT. Improve the example documentation. Task-number: QTBUG-89855 Change-Id: I88abccecbba446332501ddb787cf4bbb8d0d8058 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: enable geoflickr exampleIvan Solovev2021-03-2310-42/+42
| | | | | | | | | | Update GeoFlickr example to use XmlListModel from QtDeclarative. Update the documentation accordingly. Also do some refactoring to fix deprecation warnings. Task-number: QTBUG-89855 Change-Id: Ie80168a1f6699213a0369f03b35fc2120b0b2684 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: reset errors properlyIvan Solovev2021-01-291-0/+2
| | | | | | | | | | | | | Calling startUpdates(), startMonitoring() or requestUpdate() on QGeoPositionInfoSource/QGeoSatelliteInfoSource/QGeoAreaMonitorSource subclasses effectively means starting a new work session, which means that we should not care about the previous errors. This patch resets the errors to Error::NoError in all subclasses when calling these methods. Task-number: QTBUG-90491 Change-Id: Ia9cf0345e8c672d47814d8d0a865cd23541af61a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: remove QGeoPositionInfoSource::updateTimeout signalIvan Solovev2021-01-262-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | A new Error::UpdateTimeoutError enum value is introduced instead. An errorOccurred() signal with this value is used to notify about update timeouts. As a result, an updateTimeout() signal is also removed from QML PositionSource object (QDeclarativePositionSource C++ class). It's also replaced by the sourceErrorChanged() signal with PositionSource.UpdateTimeoutError error value. Apart from that - several more warnings in the unit tests are fixed. [ChangeLog][QtPositioning][Important Behavior Changes] Removed QGeoPositionInfoSource::updateTimeout() signal. Use QGeoPositionInfoSource::errorOccurred() with a new Error::UpdateTimeoutError value instead. Removed PositionSource::updateTimeout() signal from QML. Use PositionSource::sourceErrorChanged() with a new PositionSource.UpdateTimeoutError value instead. Task-number: QTBUG-90491 Change-Id: I7458382a5cb7fdea192b3924baf9e86ee28d1028 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: rename signal error() to errorOccurred()Ivan Solovev2021-01-252-2/+2
| | | | | | | | | | | | | Signal name was previouly clashing with the error() method. The new signal name is aligned with QtNetwork and QProcess [ChangeLog][QtPositioning][Important Behavior Changes] Rename signal error() to errorOccurred() in QGeoAreaMonitorSource, QGeoPositionInfoSource and QGeoSatelliteInfoSource Task-number: QTBUG-90491 Change-Id: I241322c6654e1c92e1a3c63a8958bcf96bf5f4f7 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: get rid of warningsIvan Solovev2021-01-222-12/+12
| | | | | | | | | | Fix warnings in QtPositioning sources. These are mostly the warnings regarding a missing "override" keyword in unit tests. Task-number: QTBUG-90491 Change-Id: I6ca676de0733767d4b85353670103ad5a8d60688 Reviewed-by: Juha Vuolle <juha.vuolle@insta.fi> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: port to cmakeIvan Solovev2021-01-206-0/+296
| | | | | | | | | | Switching QtPositioning, its tests and examples to cmake. QtLocation is not covered by this patch. Task-number: QTBUG-89854 Change-Id: Ic971f7fd4c576eac9b662641aae77d68c062712d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* QtPositioning: adapt to Qt6Ivan Solovev2021-01-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | Make QtPositioning module buildable under Qt6: - remove calls to deleted QMetaType-registration methods - replace int -> qsizetype where it prevents the code from being compiled - fix some deprecation warnings - fix library dependencies in .pro file for building tests - fix weatherinfo example For now only qmake is supported. CMake support will be done in scope of a separate patch. Geoflickr example is yet to be ported, as it requires extracting XmlListModel from xmlpatterns. QtLocation is also skipped for now, as it seems to require heavy refactoring due to changes in QSGMaterialShader interface. QtLocation build is disabled in qmake for now. Task-number: QTBUG-89853 Change-Id: I8cc4da6efabe32ce114701219d5431f8480bee3b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge 5.15 to dev and fix resulting compile issuesQt Forward Merge Bot2020-04-0211-54/+258
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/location.cpp The change fixes the bare minimum of what needs to be done to compile and run. This includes the following issues: 1. Fix build failures as a result of QMetaType changes in qtbase moc now stores the QMetaType of properties as a result of 46f407126ef3e94d59254012cdc34d6a4ad2faf2 in qtbase, which requires full type information about the property type inside the moc generated source file. Many of the property types were forward-declared, and this resulted in build errors like: "invalid application of 'sizeof' to an incomplete type 'QDeclarativeGeoMap'" 2. Adopts QtQML API changes. A private QJSValue ctor was removed. The "replacement" is QJSValuePrivate::fromReturnedValue(..). 3. The mapboxgl 3rdparty backend does not compile at this point in time and seems unmaintained. For the time being, the mapboxgl backend is disabled in the interest of keeping qtlocation closer to dev HEAD of other Qt modules. Change-Id: I756e1c2effb29eaaf96a61a28c1c17338774b77c
| * Revert "qtlocation: remove uses of the deprecated member-function"Timur Pocheptsov2020-02-251-3/+3
| | | | | | | | | | | | | | | | This reverts commit b482674e51c097fccffa1e1cc32b4843ad393894. Reason for revert: naming in QProcess is considered to be the correct one. Change-Id: I6722adfc06b351c76fb432628a678c4ce887d594 Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * Examples: request permissions storage permissions on AndroidAssam Boudjelthia2020-02-242-0/+25
| | | | | | | | | | | | | | | | | | Since QStandardPaths::writableLocation() is used, it's best to make sure we have to write permissions on Android. Task-number: QTBUG-80717 Change-Id: I992661aed25e7d40254f7c7d6373273cf84aac16 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15v5.15.0-beta1Qt Forward Merge Bot2020-02-221-3/+3
| |\ | | | | | | | | | Change-Id: Ibfd9321f80367173575afb9393307d8b7ce5f399
| | * Examples: set minimal_map fullscreen on Android devicesAssam Boudjelthia2020-02-181-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | If running minimal_map example on Android, the map view is shown on a small view on top of the screen only, with all the remaining view as blank, this is not desirable. Change-Id: I727247428c9a33e0281083abef672379f479c5be Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Remove use of bearer management from weatherinfo exampleMårten Nordheim2020-02-174-42/+14
| | | | | | | | | | | | | | | | | | Change-Id: I8740a008b43b8a5476bdb3506e763acb4bd1b454 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | Add geometry simplification to MapPolyline/MapPolylineObjectQSGPaolo Angelelli2020-02-123-1/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a metric-based implementation of the Ramer-Douglas-Peucker line simplification algorithm to generate a LOD pyramid for the polyline geometries. This comes with a related property (in MapItemBase), lodThreshold, that can be used to change the threshold after which no simplification will be used. By default the value of this property is 0, meaning that the behavior will be unchanged and no LOD will be used. This change also introduces LOD on map polyine objects QSG, for which no property is introduced, and there's a default threshold set to zoom level 12 (which appear to produce acceptable results). Finally, this patch makes use of a threadpool with 1 thread to enqueue geometry simplification tasks, which would otherwise freeze the UI when computing for the first time. Support for geometry simplification is currently added only to polylines. It might be of interest extending it to polygons as well, once a proper strategy for handling the simplification of inner holes has been identified. Finally, extending it to circles could be of interest, while potentially bringing only minor benefits, as circle geometries are currently fixed to 128 vertices. Also adds a MapObject-based delegate to the geojson viewer example. Task-number: QTBUG-46652 Task-number: QTBUG-38459 Task-number: QTBUG-49303 Change-Id: I64b5db4577962db17e5388812909285c9356ef0d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Enable mercator-to-screen projection in GLSLPaolo Angelelli2020-02-112-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this change, all the geo-to-screen conversion, and the triangulation operations for geo polylines and geo polygon are performed either at set time or in the shader. A separate bounding box geometry is processed in the old way to provide a correct QtQuick Item geometry, that can be used for nesting mouse areas, performing translations, input event delivery, etc. With this approach, performance are improved by more than one order of magnitude in average, but complex geometries will of course benefit more. It also adds correct rendering support for polygons with holes, previously only rendered correctly by the MapboxGL plugin. The polyline shader has basic miter joins. The miter is skipped if the angle is too sharp to avoid complicating the implementation. This shader introduces some glitches when the polyline is minified, for which the real fix is to have LOD for the geometry, and render simplified geometries at low zoom levels (added in a subsequent patch). Note: this approach, at least in its current implementation, does not support enabling layers on individual items, only on the Map element. Task-number: QTBUG-49303 Task-number: QTBUG-38459 Change-Id: I0c2dc0bf364d32f74ca7c4014f6d66e6219c8ae4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* | | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2020-02-012-3/+14
|\ \ \ | |/ / | | | | | | Change-Id: I453207cbd09ee4901def858193f33d8cef80a2dc
| * | Add to GeoJsonDelegate.qml support for logging clicked countryPaolo Angelelli2020-01-181-0/+11
| | | | | | | | | | | | | | | Change-Id: I15f7cae7efc58279d76e9ac7d0be3b7fd63ae1cd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * | qtlocation: remove uses of the deprecated member-functionTimur Pocheptsov2020-01-151-3/+3
| |/ | | | | | | | | | | | | | | | | Which is QNetworkReply::error(). Use QNetworkReply::networkError() instead. Task-number: QTBUG-80369 Change-Id: Id41166a72c0d14bc77d9ec853db2f665617195ee Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
* | Merge remote-tracking branch 'origin/5.15' into devQt Forward Merge Bot2019-10-261-23/+23
|\ \ | |/ | | | | Change-Id: I01b84e7523be32815e618a7f512160de467d3bea
| * Merge remote-tracking branch 'origin/5.13' into 5.14Qt Forward Merge Bot2019-10-011-23/+23
| |\ | | | | | | | | | Change-Id: Id543d32c49c8efd1d7798d41bbee0e28c1742e12
| | * Doc: Fix link errors and complete parameter specsNico Vertriest2019-09-301-23/+23
| | | | | | | | | | | | | | | Change-Id: I786ab35a0e9c8dfa2c8124692289d98e8eee4a8d Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* | | Merge remote-tracking branch 'origin/wip/qt6' into devSimon Hausmann2019-10-102-4/+4
|\ \ \ | |/ / |/| | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I206cf010f01d2acdad05357e992a2703e5392aab
| * | Fix Qt6 buildAlexandru Croitor2019-08-012-4/+4
| |/ | | | | | | | | Change-Id: Ib308cbc590d2a9203ac95a707870f7bd45b9bdea Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Fix the build with -no-widgets in examplesLiang Qi2019-08-072-3/+4
|/ | | | | | Task-number: QTBUG-76780 Change-Id: I543ec1e89c8b9e8ba66524345d230c5e4dd7c08b Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Fix documentation issuesTopi Reinio2019-05-162-1/+1
| | | | | | | | | | | Fix various documentation-related issues, including missing parameter documentation, broken links, and typos. Do some minor language editing. Change-Id: I0a8f8457e0d1ab56b4fc4670376509adf1fd26a3 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-301-0/+6
|\ | | | | | | Change-Id: I3753abe2e06c0f310abda87dc688b22a02959887
| * Check that SSL support is available at compile time before using itAndy Shaw2019-04-291-0/+6
| | | | | | | | | | Change-Id: Id0e7e14a06306a2d8c2098bcb6de6c53d28ca88f Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | GeoFlickr uses QtXmlPatternAlex Blasche2019-04-251-1/+1
| | | | | | | | | | | | | | The QML dependency ought to be reflected by the project file. Change-Id: I1dbd83bf610957850267d7027e8f41264b6f3a61 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Reduce QtXmlPattern dependencyv5.13.0-beta2Alex Blasche2019-04-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | QtLocation and QtPositioning don't depend on it and QtXmlPatterns is about to be deprecated in Qt 5.13. The only existing dependency is the geoflickr example. The most likely resolution is to remove the example once QtXmlPatterns is removed for good. This change makes QtXmlPatterns an optional build dependency. Change-Id: Ibcd9e48604cff4d5e52a63164b30616b0eb100f2 Reviewed-by: Paul Wicking <paul.wicking@qt.io>
* | Merge remote-tracking branch 'origin/5.12' into 5.13Qt Forward Merge Bot2019-04-012-0/+16
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I5700c90ee86873599b5e7c9ccb6cef7ca48153e7
| * Display a notice when requesting a SSL map type without SSL supportPaolo Angelelli2019-03-252-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some plugins request map data for some map types over HTTPS. Without SSL support (Qt built without SSL support, or missing OpenSSL libraries) this typically translates into blank maps. This is very evident on the MapViewer example. This patch makes sure that the example displays a notice when this situation happens. [ChangeLog] Added a notice to the MapViewer example to inform when a HTTPS-based map is selected without SSL support. Change-Id: I85428bb0536f33089a0e6045301c089fafe69d74 Fixes: QTBUG-74195 Fixes: QTBUG-74294 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Improve GeoJson Viewer examplePaolo Angelelli2019-01-255-52/+72
| | | | | | | | | | | | | | | | Switches to Qt.labs.platform FileDialog and sets the proper initial directory, as well as handles command line argument Change-Id: I2ae4fc3244d1e2566556d3966aedf273ac98e3d1 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* | Add QGeoJson: a GeoJSON parserJulian Sherollari2019-01-1818-1/+47072
|/ | | | | | | | | | | | | Add a Class to convert a GeoJSON document to a QVariantList ready to be used as Model in a MapItemView. It comes with autotests, example and detailed documentation. [ChangeLog][QtLocation] Added a GeoJSON parser which can be used to annotate maps with tracks, polygonal boundaries, etc. Fixes: QTBUG-64111 Change-Id: Ib06d3902a052f69f75ae40be5c9ab56023cad916 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Document source of icons in weatherinfo exampleKai Koehne2018-07-252-0/+40
| | | | | | Task-number: QTBUG-62053 Change-Id: Ia3eadc5594127a5289e37255541d641f6f1ba40a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Expose add/remove transitions in MapItemViewPaolo Angelelli2018-07-047-0/+13813
| | | | | | | | In this way these transitions can now be customized by the user. Change-Id: I949d0caab65b0e71012bf77baee9c847c8f415a0 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Doc: Add missing dots (qtlocation)Paul Wicking2018-06-212-2/+2
| | | | | | Task-number: QTBUG-68933 Change-Id: Ie7863b196363022c0bb7c1fa4f258c4700b5abb3 Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-191-1/+0
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/location/declarativemaps/qdeclarativegeomap.cpp src/location/maps/qgeomap.cpp src/location/maps/qgeomap_p_p.h src/location/maps/qgeorouteparserosrmv5.cpp src/location/maps/qgeotiledmap.cpp src/positioning/positioning.pro Change-Id: I42f8b176a8f3e824c7fe5b067a958735173f0dbb
| * Remove forcing the qtquickcompiler on the mapviewer example5.10Paolo Angelelli2018-02-021-1/+0
| | | | | | | | | | | | | | | | Or else it prevents QML debugging. Task-number: QTBUG-64827 Change-Id: I7a31b6a575ed7a4f96368b87aaa883fd3ba2b940 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* | Replace Q_DECL_OVERRIDE with overrideKevin Funk2018-02-051-1/+1
| | | | | | | | | | Change-Id: Iaa670de181255ea570fcf7bcbe465987ef7fc2fc Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Merge remote-tracking branch 'origin/5.10' into devPaolo Angelelli2018-01-071-0/+5
|\ \ | |/ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/imports/location/location.cpp src/plugins/geoservices/mapbox/qgeoroutereplymapbox.cpp Change-Id: I0c1ce33cff7bb1a65e65b8adafd2b31eb936d515
| * Merge remote-tracking branch 'origin/5.9' into 5.10Paolo Angelelli2017-12-151-0/+5
| |\ | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I8300f5fcbbe3064049e11d2b04c10e35c9945c8d
| | * Add plugin dependencies to the mapviewer examplesPaolo Angelelli2017-11-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | This is a workaround for QTBUG-38735. Task-number: QTBUG-58589 Change-Id: I8e9031657d04f192b64581ea060dfc91bce3fada Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | QtLocation mapviewer example MiniMap improvementPaolo Angelelli2017-11-291-11/+47
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | The mapviewer example currently uses the minimap to show a red MapRectangle sized 10 degrees in latitude and 10 degrees in longitude. This patch makes the minimap visualize the actual displayed area in the main map as a red rectangle in the minimap. The minimap zoom level is also now gently bound to the main map zoom level. There's one bug left, though, but not related to this qml component, which causes the border of the red MapRectangle of the minimap to often be drawn on the left of the rectangle. Change-Id: I6ba332bf72f0489f5ada765c85f6890a09ca1a98 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Merge remote-tracking branch 'origin/5.9' into 5.10v5.10.0-beta3Liang Qi2017-10-26112-356/+1377
|\ \ | |/ | | | | | | | | | | Conflicts: .qmake.conf Change-Id: I9a3d7ec0bb203ac8b5bd483af3973510ca33c4a9
| * Fix outdated BSD license headerKai Koehne2017-10-17102-305/+1325
| | | | | | | | | | | | | | Use new version with commercial exception. Change-Id: I11058c94138615f7df2f99b6c3245ab075cd8222 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Fix outdated FDL headerKai Koehne2017-10-1710-50/+50
| | | | | | | | | | Change-Id: Ie9771204ea1aa46e333d96ab0f392c795c512946 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * Fix mapviewer example build with -no-feature-libraryJake Petroules2017-09-151-1/+2
| | | | | | | | | | Change-Id: I4d2d430a1315afb1b5cbbaf254b08691579d28f2 Reviewed-by: Lars Knoll <lars.knoll@qt.io>