Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QPlaceSearchResult Class

The QPlaceSearchResult class represents a search result. More...

 #include <QPlaceSearchResult>

This class was introduced in Qt Location 5.0.

Public Types

enum SearchResultType { PlaceResult, CorrectionResult, UnknownSearchResult }

Public Functions

QPlaceSearchResult()
QPlaceSearchResult(const QPlaceSearchResult & other)
virtual ~QPlaceSearchResult()
QString correction() const
qreal distance() const
bool isSponsored() const
QPlace place() const
void setCorrection(const QString & correction)
void setDistance(qreal distance)
void setPlace(const QPlace & place)
void setSponsored(bool sponsored)
void setType(SearchResultType type)
SearchResultType type() const
bool operator!=(const QPlaceSearchResult & other) const
QPlaceSearchResult & operator=(const QPlaceSearchResult & other)
bool operator==(const QPlaceSearchResult & other) const

Detailed Description

The QPlaceSearchResult class represents a search result.

There are two types of search results. The first is a place result, which contains a place that matched the search request, but also metadata about the place such as the distance from the search center of a search request and whether the result is a sponsored or organic search result.

The other type is a correction, which contains an alternative search term that may better reflect the user's intended query.

Member Type Documentation

enum QPlaceSearchResult::SearchResultType

Defines the type of search result

ConstantValueDescription
QPlaceSearchResult::PlaceResult0The search result contains a place.
QPlaceSearchResult::CorrectionResult1The search result contains a search term correction.
QPlaceSearchResult::UnknownSearchResult2The contents of the search result are unknown.

Member Function Documentation

QPlaceSearchResult::QPlaceSearchResult()

Constructs a new search result.

QPlaceSearchResult::QPlaceSearchResult(const QPlaceSearchResult & other)

Constructs a copy of other

QPlaceSearchResult::~QPlaceSearchResult() [virtual]

Destroys the search result.

QString QPlaceSearchResult::correction() const

Returns the correction term that this particular search result represents. This field is only valid when the search result type is QPlaceSearchResult::CorrectionResult.

See also setCorrection().

qreal QPlaceSearchResult::distance() const

Returns the distance of the place to the search center. This field is only valid when the search result type is QPlaceSearchResult::PlaceResult, and where the search request contained a search center. Otherwise, the distance is NaN indicating an undefined distance. The default value for distance is NaN.

See also setDistance().

bool QPlaceSearchResult::isSponsored() const

Returns true if the search result represents a sponsored result.

See also setSponsored().

QPlace QPlaceSearchResult::place() const

Returns the place of the search result. This field is only valid when the search result type is QPlaceSearchResult::PlaceResult.

See also setPlace().

void QPlaceSearchResult::setCorrection(const QString & correction)

Sets the correction term of the search result.

See also correction().

void QPlaceSearchResult::setDistance(qreal distance)

Set the distance of the search result's place from a search center.

See also distance().

void QPlaceSearchResult::setPlace(const QPlace & place)

Sets the place that this search result refers to.

See also place().

void QPlaceSearchResult::setSponsored(bool sponsored)

Sets whether the search result represents a sponsored result or not.

See also isSponsored().

void QPlaceSearchResult::setType(SearchResultType type)

Sets the type of the search result.

See also type().

SearchResultType QPlaceSearchResult::type() const

Returns the type of the search result.

See also setType().

bool QPlaceSearchResult::operator!=(const QPlaceSearchResult & other) const

Returns true if other not equal to this search result, otherwise returns false.

QPlaceSearchResult & QPlaceSearchResult::operator=(const QPlaceSearchResult & other)

Assigns other to this search result and returns a reference to this search result.

bool QPlaceSearchResult::operator==(const QPlaceSearchResult & other) const

Returns true if other is equal to this search result, otherwise returns false.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web