|
libosmscout 1.1.1
|
#include <libosmscout-client-qt/include/osmscoutclientqt/OSMScoutQt.h>


Public Slots | |
| void | threadFinished () |
Public Member Functions | |
| ~OSMScoutQt () override | |
| QThread * | makeThread (QString name) |
| bool | waitForReleasingResources (unsigned long mSleep, unsigned long maxCount) const |
| DBThreadRef | GetDBThread () const |
| SettingsRef | GetSettings () const |
| MapManagerRef | GetMapManager () const |
| MapDownloaderRef | GetMapDownloader () |
| VoiceManagerRef | GetVoiceManager () |
| LookupModule * | MakeLookupModule () |
| MapRenderer * | MakeMapRenderer (RenderingType type) |
| Router * | MakeRouter () |
| NavigationModule * | MakeNavigation () |
| SearchModule * | MakeSearchModule () |
| StyleModule * | MakeStyleModule () |
| POILookupModule * | MakePOILookupModule () |
| ElevationModule * | MakeElevationModule () |
| IconLookup * | MakeIconLookup () |
| QString | GetUserAgent () const |
| QString | GetCacheLocation () const |
| size_t | GetOnlineTileCacheSize () const |
| QString | GetIconDirectory () const |
Static Public Member Functions | |
| static void | RegisterQmlTypes (const char *uri="net.sf.libosmscout.map", int versionMajor=1, int versionMinor=0) |
| static OSMScoutQtBuilder | NewInstance () |
| static OSMScoutQt & | GetInstance () |
| static void | FreeInstance () |
Friends | |
| class | OSMScoutQtBuilder |
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:
|
override |
|
static |
| QString osmscout::OSMScoutQt::GetCacheLocation | ( | ) | const |
| DBThreadRef osmscout::OSMScoutQt::GetDBThread | ( | ) | const |
| QString osmscout::OSMScoutQt::GetIconDirectory | ( | ) | const |
|
static |
| MapDownloaderRef osmscout::OSMScoutQt::GetMapDownloader | ( | ) |
| MapManagerRef osmscout::OSMScoutQt::GetMapManager | ( | ) | const |
| size_t osmscout::OSMScoutQt::GetOnlineTileCacheSize | ( | ) | const |
| SettingsRef osmscout::OSMScoutQt::GetSettings | ( | ) | const |
| QString osmscout::OSMScoutQt::GetUserAgent | ( | ) | const |
| VoiceManagerRef osmscout::OSMScoutQt::GetVoiceManager | ( | ) |
| ElevationModule * osmscout::OSMScoutQt::MakeElevationModule | ( | ) |
| IconLookup * osmscout::OSMScoutQt::MakeIconLookup | ( | ) |
| LookupModule * osmscout::OSMScoutQt::MakeLookupModule | ( | ) |
| MapRenderer * osmscout::OSMScoutQt::MakeMapRenderer | ( | RenderingType | type | ) |
| NavigationModule * osmscout::OSMScoutQt::MakeNavigation | ( | ) |
| POILookupModule * osmscout::OSMScoutQt::MakePOILookupModule | ( | ) |
| Router * osmscout::OSMScoutQt::MakeRouter | ( | ) |
| SearchModule * osmscout::OSMScoutQt::MakeSearchModule | ( | ) |
| StyleModule * osmscout::OSMScoutQt::MakeStyleModule | ( | ) |
| 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()
| name |
|
static |
|
static |
|
slot |
| 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.
| mSleep | wait period between checks (in milliseconds) |
| maxCount | maximul count |
|
friend |