The QPlaceRatings class holds rating information about a place. More...
Header: | #include <QPlaceRatings> |
qmake: | QT += location |
Since: | Qt 5.6 |
QPlaceRatings() | |
QPlaceRatings(const QPlaceRatings &other) | |
~QPlaceRatings() | |
qreal | average() const |
int | count() const |
bool | isEmpty() const |
qreal | maximum() const |
void | setAverage(qreal average) |
void | setCount(int count) |
void | setMaximum(qreal max) |
bool | operator!=(const QPlaceRatings &other) const |
QPlaceRatings & | operator=(const QPlaceRatings &other) |
bool | operator==(const QPlaceRatings &other) const |
The QPlaceRatings class holds rating information about a place.
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.
qDebug() << QString("This place rated ") + place.ratings().average() + "out of " + place.ratings().maximum() + "stars";
Constructs a new ratings object.
Constructs a copy of other.
Destroys the ratings object.
Returns the average value of individual ratings.
See also setAverage().
Returns the total number of individual ratings.
See also setCount().
Returns true if all fields of the place ratings are 0; otherwise returns false.
Returns the maximum possible rating value.
See also setMaximum().
Sets the average value of the ratings.
See also average().
Sets the total number of individual ratings to count.
See also count().
Sets the maximum possible rating value to max.
See also maximum().
Returns true if other is not equal to this ratings object, otherwise returns false.
Assigns other to this ratings object and returns a reference to this ratings object.
Returns true if other is equal to this ratings object, otherwise returns false.
As part of the free Business evaluation, we offer a free welcome call for companies, to talk about your requirements, and how the Felgo SDK & Services can help you. Just sign up and schedule your call.
Sign up now to start your free Business evaluation: