libosmscout 0.1
Loading...
Searching...
No Matches
osmscout::SearchModule Class Reference

#include <SearchModule.h>

Inheritance diagram for osmscout::SearchModule:

Public Slots

void SearchForLocations (const QString searchPattern, int limit, osmscout::GeoCoord, AdminRegionInfoRef defaultRegion, osmscout::BreakerRef breaker)
 Start object search by some pattern.

Signals

void searchFinished (const QString searchPattern, bool error)
void searchResult (const QString searchPattern, const QList< osmscout::LocationEntry >)

Public Member Functions

 SearchModule (QThread *thread, DBThreadRef dbThread, LookupModule *lookupModule)
virtual ~SearchModule ()

Constructor & Destructor Documentation

◆ SearchModule()

osmscout::SearchModule::SearchModule ( QThread * thread,
DBThreadRef dbThread,
LookupModule * lookupModule )

Referenced by searchFinished().

◆ ~SearchModule()

osmscout::SearchModule::~SearchModule ( )
virtual

Member Function Documentation

◆ searchFinished

void osmscout::SearchModule::searchFinished ( const QString searchPattern,
bool error )
signal

◆ SearchForLocations

void osmscout::SearchModule::SearchForLocations ( const QString searchPattern,
int limit,
osmscout::GeoCoord searchCenter,
AdminRegionInfoRef defaultRegion,
osmscout::BreakerRef breaker )
slot

Start object search by some pattern.

DBThread then emits searchResult signals followed by searchFinished for this pattern.

User of this function should use Qt::QueuedConnection for invoking this slot, search may generate IO load and may tooks long time.

Keep in mind that entries retrieved by searchResult signal can contains duplicates, because search may use various databases and indexes.

Parameters
searchPattern
limit- suggested limit for count of retrieved entries from one db

References osmscout::DistanceSquare(), osmscout::GeoBox::GetCenter(), osmscout::OSMScoutQt::GetDBThread(), osmscout::OSMScoutQt::GetInstance(), osmscout::GeoBox::Includes(), osmscout::log, and searchFinished().

Referenced by osmscout::LocationListModel::LocationListModel(), and searchFinished().

◆ searchResult

void osmscout::SearchModule::searchResult ( const QString searchPattern,
const QList< osmscout::LocationEntry >  )
signal

The documentation for this class was generated from the following files: