summaryrefslogtreecommitdiff
path: root/src/location/maps/qabstractgeotilecache_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix export macro in private headersPaolo Angelelli2017-02-141-3/+3
| | | | | | | | Changing Q_LOCATION_EXPORT to Q_LOCATION_PRIVATE_EXPORT in all _p headers to avoid confusion. Change-Id: Ic42d1c59f0cd68c27bcf40296c612d005da11efd Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Refactor: move CacheAreas to QAbstractGeoTileCachePaolo Angelelli2017-01-161-3/+13
| | | | | | | | | | | | | | | This change moves QGeoTiledMappingManagerEngine::CacheAreas to the more appropriate container that is QAbstractGeoTileCache, which already uses this enum in its interface. Together with making the virtual init() method of QAbstractGeoTileCache public, instead of protected, this patch effectively disentangle QAbstractGeoTileCache/QGeoFileTileCache from the QGeoTiledMappingManagerEngine, and makes it usable potentially also by other (tile) renderers. Change-Id: Ic635b81660f81d86884cc6b00e3a2ab9420daa9f Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Improve support for unitary tile cost in QGeoFileTileCachePaolo Angelelli2016-11-231-2/+6
| | | | | | | | | | | | | | | This patch adds support for separate caching mode for each of the three caches, disk, memory and texture. It also adds separate plugin parameters to the mapbox plugin to control the functioning of each of these cache. By default it only sets the disk cache to unitary, to comply with mapbox TOS, and leaves the other two caches to bytesize behavior (old beavior). Change-Id: I665d40568f4e69a836d7489e1daa2d8dcb8987af Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Add support for unitary tile cost in QGeoFileTileCachePaolo Angelelli2016-11-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for unitary pricing of tiles in the disk, memory and texture caches. This is done through a new enum in QAbstractGeoTileCache, "CostStrategy" having two values, Unitary (new one) and ByteSize (the old way). Using Unitary instead of ByteSize gives, as advantages: - the ability to comply with the TOS of certain providers, who allow to cache a fixed number of tiles, and not of bytes. - even performance with different types of tiles, like lo vs hi res, indexed vs satellite (which usually compresses much less). This patch sets the Unitary mode to be the default for the mapbox plugin since Mapbox is one of the providers whose TOS limit the amount of cacheable tiles. Therefore, the patch also modifies the mapbox plugin ".mapping.cache" parameters to reflect the new behavior. Since these parameters have been introduced with 5.8 (which is unreleased), the change doesn't need to be backward compatible. Change-Id: I76edd43900242885f24eb9f28e8c833538647edc Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Version tile cache with qt version and evict obsolete data on init()Paolo Angelelli2016-08-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch changes the base cache directory to a new scheme containing the qt version. At the time of commit, this would be "QtLocation/5.8/tiles/" This versioning does not have to change at every release, but when there are changes in the caching scheme. The reason for this is that, otherwise, it becomes difficult to clean up old cache data. QGeoFileTileCache::init already clean up old tile cache from 5.4 or older, where the cache data wasn't organized under a directory for each plugin. In 5.8 different naming scheme are introduced for mapbox tiles (with @1x,@2x) , here maps (with ppi), and soon for OSM too (with an identifier for the actual provider, not only the mapId). With this patch it will become easier and cleaner to upgrade the cache data without leaving residues. Change-Id: I89aeac0aaf1408d119cde5792fc69a64d5d89c3a Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix for caching after mapbox improvement/highdpi-supportPaolo Angelelli2016-07-071-1/+3
| | | | | | | | | | Currently the qgeofiletilecache/qgeofiletilecachemapbox contains a bug in that it makes use of virtual functions in the constructor. This patch fixes it by moving those calls into a virtual init() method that is called by QGeoTiledMappingManagerEngine::setTileCache() Change-Id: Icf7932dfbae7d99eef22c67e034246a834212a03 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* Add clearData() call to map qml apiMichal Klocek2015-12-071-0/+1
| | | | | | | | | | | Add clearData call to clear texture, memory and disk cache. Update mapviewer example and add "prefetchData" and "clearData" to Tools menu. Task-number: QTBUG-47292 Change-Id: Ifc71a3652688d1403f5b011ef231b59381c17ee3 Reviewed-by: Harald Meyer <dev@meh.at> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Added method to set the map cacheHarald Meyer2015-10-261-1/+2
| | | | | | | | | | | | This update adds a new method "setTileCache" to the QGeoTiledMappingManagerEngine class. The method allows custom map implementations to set their own cache. The update also fixes a compiler warning (ctor variable order) and adds Q_DECL_OVERRIDE checks. Change-Id: I22cfdb218ae5c9af145d688f11aab655f4ed3e4b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Split QGeoTileCache for easier customization of the tile cache.Harald Meyer2015-10-221-0/+123
The QGeoTileCache is split into two classes: The abstract class QAbstractGeoTileCache offers interfaces for inserting and getting tiles, as well as getting cache status information such as used texture memory. The new class QGeoFileTileCache implements QAbstractGeoTileCache and offers a file based caching implementation (the implementation is the same as before splitting the class). Change-Id: I2eab7491d489ac5b251c1296b67688901f5cc7d7 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>