IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QPlaceRatings Class

The QPlaceRatings class holds rating information about a place.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QPlaceRatings Class

  • Header: QPlaceRatings

  • qmake: QT += location

  • Group: QPlaceRatings is part of QtLocation-places, QtLocation-places-data

I. Detailed Description

Rating information is used to describe how good a place is conceived to be. Typically this information is visualized as a number of stars. The average() function returns an aggregated ratings value out of a possible maximum as given by the maximum() function.

 
Sélectionnez
qDebug() << QString("This place rated ") + place.ratings().average()
            + "out of " + place.ratings().maximum() + "stars";

II. Property Documentation

 

II-1. average : qreal

This property holds the average value of individual ratings.

Access functions:

  • average() const

  • void setAverage( average)

II-2. count : int

This property holds the total number of individual ratings.

Access functions:

  • int count() const

  • void setCount(int count)

II-3. maximum : qreal

This property holds the maximum possible rating value.

Access functions:

  • maximum() const

  • void setMaximum( max)

III. Member Function Documentation

 

III-1. QPlaceRatings::QPlaceRatings()

Constructs a new ratings object.

III-2. QPlaceRatings::QPlaceRatings(const QPlaceRatings &other)

Constructs a copy of other.

III-3. QPlaceRatings::~QPlaceRatings()

Destroys the ratings object.

III-4. bool QPlaceRatings::isEmpty() const

Returns true if all fields of the place ratings are 0; otherwise returns false.

III-5. QPlaceRatings &QPlaceRatings::operator=(const QPlaceRatings &other)

Assigns other to this ratings object and returns a reference to this ratings object.

IV. Related Non-Members

 

IV-1. bool operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs)

Returns true if lhs is not equal to rhs, otherwise returns false.

IV-2. bool operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs)

Returns true if lhs is equal to rhs, otherwise returns false.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+