libosmscout  0.1
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. More...
 

Signals

void searchFinished (const QString searchPattern, bool error)
 
void searchResult (const QString searchPattern, const QList< 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 
)

◆ ~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::Log::Debug(), osmscout::DistanceSquare(), osmscout::GeoBox::GetCenter(), osmscout::OSMScoutQt::GetDBThread(), osmscout::OSMScoutQt::GetInstance(), osmscout::GeoBox::Includes(), osmscout::log, and searchFinished().

Referenced by osmscout::LocationListModel::LocationListModel().

◆ searchResult

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

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