Skip to content
Snippets Groups Projects
Select Git revision
  • feab65f54cc5ba92b7cce7d284ec19546b8fd315
  • master default protected
  • dev1
  • merge_branch_alt
  • original
  • rc1
  • phil
7 results

QGCMapTileSet.cpp

Blame
  • QGCMapTileSet.cpp 11.84 KiB
    /****************************************************************************
     *
     * (c) 2009-2020 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
     *
     * QGroundControl is licensed according to the terms in the file
     * COPYING.md in the root of the source code directory.
     *
     ****************************************************************************/
    
    
    /**
     * @file
     *   @brief Map Tile Set
     *
     *   @author Gus Grubba <gus@auterion.com>
     *
     */
    
    #include "QGCMapEngine.h"
    #include "QGCMapTileSet.h"
    #include "QGCMapEngineManager.h"
    #include "TerrainTile.h"
    
    #include <QSettings>
    #include <math.h>
    
    QGC_LOGGING_CATEGORY(QGCCachedTileSetLog, "QGCCachedTileSetLog")
    
    #define TILE_BATCH_SIZE      256
    
    //-----------------------------------------------------------------------------
    QGCCachedTileSet::QGCCachedTileSet(const QString& name)
        : _name(name)
        , _topleftLat(0.0)
        , _topleftLon(0.0)
        , _bottomRightLat(0.0)
        , _bottomRightLon(0.0)
        , _totalTileCount(0)
        , _totalTileSize(0)
        , _uniqueTileCount(0)
        , _uniqueTileSize(0)
        , _savedTileCount(0)
        , _savedTileSize(0)
        , _minZoom(3)
        , _maxZoom(3)
        , _defaultSet(false)
        , _deleting(false)
        , _downloading(false)
        , _id(0)
        , _type("Invalid")
        , _networkManager(nullptr)
        , _errorCount(0)
        , _noMoreTiles(false)
        , _batchRequested(false)
        , _manager(nullptr)
        , _selected(false)
    {
    
    }
    
    //-----------------------------------------------------------------------------
    QGCCachedTileSet::~QGCCachedTileSet()
    {
        delete _networkManager;
        _networkManager = nullptr;
    }
    
    //-----------------------------------------------------------------------------
    QString
    QGCCachedTileSet::errorCountStr()