KPublicTransport::LocationRequest

Search for usage in LXR

KPublicTransport::LocationRequest Class Reference

#include <locationrequest.h>

Properties

QStringList backends
 
float latitude
 
KPublicTransport::Location location
 
float longitude
 
int maximumDistance
 
int maximumResults
 
QString name
 
KPublicTransport::Location::Types types
 

Public Member Functions

 LocationRequest (const Location &locaction)
 
QStringList backendIds () const
 
QString cacheKey () const
 
bool hasCoordinate () const
 
bool isValid () const
 
float latitude () const
 
Location location () const
 
float longitude () const
 
QString name () const
 
void setBackendIds (const QStringList &backendIds)
 
void setCoordinate (float lat, float lon)
 
void setLatitude (float lat)
 
void setLocation (const Location &location)
 
void setLongitude (float lon)
 
void setName (const QString &name)
 

Detailed Description

Describes a location search.

Either a geo coordinate, a name or an address must be specified as search criteria.

Definition at line 27 of file locationrequest.h.

Property Documentation

◆ backends

QStringList KPublicTransport::LocationRequest::backends
readwrite

Definition at line 36 of file locationrequest.h.

◆ latitude

float KPublicTransport::LocationRequest::latitude
readwrite

Definition at line 33 of file locationrequest.h.

◆ location

KPublicTransport::Location KPublicTransport::LocationRequest::location
readwrite

Location object containing the search parameters.

Definition at line 31 of file locationrequest.h.

◆ longitude

float KPublicTransport::LocationRequest::longitude
readwrite

Definition at line 34 of file locationrequest.h.

◆ maximumDistance

int KPublicTransport::LocationRequest::maximumDistance
readwrite

When searching by coordinate, the expected maximum distance of the results in meters.

Note
This is only an optimization hint for backends, not a guarantee that all results comply with this constraint.

Definition at line 42 of file locationrequest.h.

◆ maximumResults

int KPublicTransport::LocationRequest::maximumResults
readwrite

The maximum amount of expected results.

Note
This is only an optimization hint for backends, not a guarantee that all results comply with this constraint.

Definition at line 47 of file locationrequest.h.

◆ name

QString KPublicTransport::LocationRequest::name
readwrite

Definition at line 35 of file locationrequest.h.

◆ types

KPublicTransport::Location::Types KPublicTransport::LocationRequest::types
readwrite

The type of locations you are interested in.

Note
This is only an optimization hint for backends, not a guarantee that all results comply with this constraint.

Definition at line 52 of file locationrequest.h.

Constructor & Destructor Documentation

◆ LocationRequest()

LocationRequest::LocationRequest ( const Location & locaction)

Create a LocationRequest from locaction.

Whatever fields set in location will be used for the search request.

Definition at line 38 of file locationrequest.cpp.

Member Function Documentation

◆ backendIds()

QStringList LocationRequest::backendIds ( ) const

Identifiers of the backends that should be queried.

See also
setBackendIds()

Definition at line 125 of file locationrequest.cpp.

◆ cacheKey()

QString LocationRequest::cacheKey ( ) const

Unique string representation used for caching results.

Definition at line 107 of file locationrequest.cpp.

◆ hasCoordinate()

bool LocationRequest::hasCoordinate ( ) const

Returns true if a valid geo coordinate has been set.

Definition at line 88 of file locationrequest.cpp.

◆ isValid()

bool LocationRequest::isValid ( ) const

Returns true if this is a valid request, that is it has enough parameters set to perform a query.

Definition at line 44 of file locationrequest.cpp.

◆ latitude()

float LocationRequest::latitude ( ) const

Latitude of the location to search.

Definition at line 60 of file locationrequest.cpp.

◆ location()

Location LocationRequest::location ( ) const

Definition at line 49 of file locationrequest.cpp.

◆ longitude()

float LocationRequest::longitude ( ) const

Longitude of the location to search.

Definition at line 71 of file locationrequest.cpp.

◆ name()

QString LocationRequest::name ( ) const

The name of the location to search.

Definition at line 93 of file locationrequest.cpp.

◆ setBackendIds()

void LocationRequest::setBackendIds ( const QStringList & backendIds)

Set identifiers of backends that should be queried.

Settings this is only needed when you want explicit control over this, leaving this empty picks suitable backends automatically.

Definition at line 130 of file locationrequest.cpp.

◆ setCoordinate()

void LocationRequest::setCoordinate ( float lat,
float lon )

Search by geo coordinate.

Definition at line 82 of file locationrequest.cpp.

◆ setLatitude()

void LocationRequest::setLatitude ( float lat)

Sets the latitude of the location to search.

Definition at line 65 of file locationrequest.cpp.

◆ setLocation()

void LocationRequest::setLocation ( const Location & location)

Definition at line 54 of file locationrequest.cpp.

◆ setLongitude()

void LocationRequest::setLongitude ( float lon)

Sets the longitude of the location to search.

Definition at line 76 of file locationrequest.cpp.

◆ setName()

void LocationRequest::setName ( const QString & name)

Search by name or name fragment.

Definition at line 101 of file locationrequest.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:13:06 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.