The QPlaceRatings class holds rating information about a place. More...
|qmake:||QT += location|
This class was introduced in Qt 5.6.
|QPlaceRatings(const QPlaceRatings &other)|
|QPlaceRatings &||operator=(const QPlaceRatings &other)|
|bool||operator!=(const QPlaceRatings &other) const|
|bool||operator==(const QPlaceRatings &other) const|
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.
Member Function Documentation
QPlaceRatings::QPlaceRatings(const QPlaceRatings &other)
Constructs a copy of other.
Constructs a new ratings object.
QPlaceRatings &QPlaceRatings::operator=(const QPlaceRatings &other)
Assigns other to this ratings object and returns a reference to this ratings object.
Destroys the ratings object.
qreal QPlaceRatings::average() const
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.
qreal QPlaceRatings::maximum() const
Returns the maximum possible rating value.
See also setMaximum().
void QPlaceRatings::setAverage(qreal average)
Sets the average value of the ratings.
See also average().
Sets the total number of individual ratings to count.
See also count().
void QPlaceRatings::setMaximum(qreal max)
Sets the maximum possible rating value to max.
See also maximum().
bool QPlaceRatings::operator!=(const QPlaceRatings &other) const
Returns true if other is not equal to this ratings object, otherwise returns false.
bool QPlaceRatings::operator==(const QPlaceRatings &other) const
Returns true if other is equal to this ratings object, otherwise returns false.
© 2020 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.