#include <QGCMapEngine.h>
Signals | |
| void | updateTotals (quint32 totaltiles, quint64 totalsize, quint32 defaulttiles, quint64 defaultsize) |
Public Member Functions | |
| QGCMapEngine (QObject *parent=nullptr) | |
| ~QGCMapEngine () | |
| void | init (const QString &databasePath) |
| void | ensureInitialized () |
| bool | addTask (QGCMapTask *task) |
| void | shutdown () |
| void | close () |
Static Public Member Functions | |
| static void | closeInstance () |
| close() on the application's engine, if one was created. | |
| static QGCMapEngine * | instance () |
Definition at line 9 of file QGCMapEngine.h.
|
explicit |
Definition at line 23 of file QGCMapEngine.cpp.
Referenced by instance().
| QGCMapEngine::~QGCMapEngine | ( | ) |
Definition at line 38 of file QGCMapEngine.cpp.
References shutdown().
| bool QGCMapEngine::addTask | ( | QGCMapTask * | task | ) |
Definition at line 108 of file QGCMapEngine.cpp.
References QGCCacheWorker::enqueueTask().
Referenced by init().
| void QGCMapEngine::close | ( | ) |
Final shutdown: shutdown(), then ignore later init() calls, so a map created during teardown cannot reopen the database once the application object is gone.
Definition at line 59 of file QGCMapEngine.cpp.
References shutdown().
|
static |
close() on the application's engine, if one was created.
Definition at line 65 of file QGCMapEngine.cpp.
Referenced by QGCApplication::shutdown().
| void QGCMapEngine::ensureInitialized | ( | ) |
Initializes the engine with the application's tile cache database unless that already happened. Maps other than QtLocation's (GeoMap) call this, since only a QtLocation map initializes the engine on its own.
Definition at line 98 of file QGCMapEngine.cpp.
References QGeoFileTileCacheQGC::ensureInitialized(), QGeoFileTileCacheQGC::getDatabaseFilePath(), and init().
Referenced by TerrariumTileFetcher::TerrariumTileFetcher(), and TileImageSource::TileImageSource().
| void QGCMapEngine::init | ( | const QString & | databasePath | ) |
Definition at line 79 of file QGCMapEngine.cpp.
References addTask(), QGCMapTask::taskInit, and QGCCacheWorker::updateTotals().
Referenced by ensureInitialized(), and QGeoTiledMappingManagerEngineQGC::QGeoTiledMappingManagerEngineQGC().
|
static |
Definition at line 74 of file QGCMapEngine.cpp.
References QGCMapEngine().
Referenced by getQGCMapEngine().
| void QGCMapEngine::shutdown | ( | ) |
Stops the cache worker thread and closes the database. Call before QCoreApplication teardown when the engine was initialized outside the normal QML map lifecycle (e.g. unit test runs).
Definition at line 45 of file QGCMapEngine.cpp.
Referenced by close(), and ~QGCMapEngine().
|
signal |
Referenced by QGCMapEngineManager::QGCMapEngineManager().