The QPlaceRatings class holds rating information about a place. More...
| Header: | #include <QPlaceRatings> |
| qmake: | QT += location |
| 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) |
| QPlaceRatings & | operator=(const QPlaceRatings &other) |
| bool | operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
| bool | operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
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";
This property holds the average value of individual ratings.
Access functions:
| qreal | average() const |
| void | setAverage(qreal average) |
This property holds the total number of individual ratings.
Access functions:
| int | count() const |
| void | setCount(int count) |
This property holds the maximum possible rating value.
Access functions:
| qreal | maximum() const |
| void | setMaximum(qreal max) |
Constructs a new ratings object.
[noexcept] QPlaceRatings::QPlaceRatings(const QPlaceRatings &other)Constructs a copy of other.
[noexcept] QPlaceRatings::~QPlaceRatings()Destroys the ratings object.
Returns true if all fields of the place ratings are 0; otherwise returns false.
[noexcept] QPlaceRatings
&QPlaceRatings::operator=(const QPlaceRatings &other)Assigns other to this ratings object and returns a reference to this ratings object.
[noexcept] bool operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs)Returns true if lhs is not equal to rhs, otherwise returns false.
[noexcept] bool operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs)Returns true if lhs is equal to rhs, 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: