#include <libosmscout-client-qt/include/osmscout/OSMScoutQt.h>
Singleton that provides access to high level modules of OSMScout library. On application start should be registered Qt types by static method RegisterQmlTypes(). OSMScoutQt instance may be created by NewInstance() and accessed by GetInstance() then. To free resources should be called FreeInstance() before program exits.
Example:
◆ ~OSMScoutQt()
| osmscout::OSMScoutQt::~OSMScoutQt |
( |
| ) |
|
|
override |
◆ FreeInstance()
| static void osmscout::OSMScoutQt::FreeInstance |
( |
| ) |
|
|
static |
◆ GetCacheLocation()
| QString osmscout::OSMScoutQt::GetCacheLocation |
( |
| ) |
const |
◆ GetDBThread()
| DBThreadRef osmscout::OSMScoutQt::GetDBThread |
( |
| ) |
const |
◆ GetIconDirectory()
| QString osmscout::OSMScoutQt::GetIconDirectory |
( |
| ) |
const |
◆ GetInstance()
| static OSMScoutQt& osmscout::OSMScoutQt::GetInstance |
( |
| ) |
|
|
static |
◆ GetMapManager()
◆ GetOnlineTileCacheSize()
| size_t osmscout::OSMScoutQt::GetOnlineTileCacheSize |
( |
| ) |
const |
◆ GetSettings()
| SettingsRef osmscout::OSMScoutQt::GetSettings |
( |
| ) |
const |
◆ GetUserAgent()
| QString osmscout::OSMScoutQt::GetUserAgent |
( |
| ) |
const |
◆ GetVoiceManager()
◆ MakeElevationModule()
◆ MakeLookupModule()
◆ MakeMapRenderer()
◆ MakeNavigation()
◆ MakePOILookupModule()
◆ MakeRouter()
| Router* osmscout::OSMScoutQt::MakeRouter |
( |
| ) |
|
◆ MakeSearchModule()
◆ MakeStyleModule()
◆ makeThread()
| QThread* osmscout::OSMScoutQt::makeThread |
( |
QString |
name | ) |
|
Create new background thread with given name.
Usage:
QThread *t=OSMScoutQt::GetInstance().makeThread("OverlayTileLoader"); Service *service=new Service(t); service->moveToThread(thread); connect(thread, SIGNAL(started()), service, SLOT(init())); thread->start();
Service should stop thread in own destructor: QThread::stop()
- Parameters
-
- Returns
- thread
◆ NewInstance()
◆ RegisterQmlTypes()
| static void osmscout::OSMScoutQt::RegisterQmlTypes |
( |
const char * |
uri = "net.sf.libosmscout.map", |
|
|
int |
versionMajor = 1, |
|
|
int |
versionMinor = 0 |
|
) |
| |
|
static |
◆ threadFinished
| void osmscout::OSMScoutQt::threadFinished |
( |
| ) |
|
|
slot |
◆ waitForReleasingResources()
| bool osmscout::OSMScoutQt::waitForReleasingResources |
( |
unsigned long |
mSleep, |
|
|
unsigned long |
maxCount |
|
) |
| const |
Wait for releasing of dbThread shared pointer from other threads and terminating all created service threads. This waiting has configurable timeout, up to [mSleep * maxCount] milliseconds.
Note that on success, this method don't guarantee that dbThread is not used from another thread, see std::shared_ptr::use_count() documentation.
- Parameters
-
| mSleep | wait period between checks (in milliseconds) |
| maxCount | maximul count |
- Returns
- true if dbThread is holding just from current thread (dbThread.use_count() == 1) and all previously created service threads are terminated.
◆ OSMScoutQtBuilder
The documentation for this class was generated from the following file: