QPlaceRatings Class▲
-
Header: QPlaceRatings
-
Since: Qt 5.6
-
qmake: QT += location
-
Group: QPlaceRatings is part of QtLocation-places, QtLocation-places-data
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.
qDebug() &
lt;&
lt; QString("This place rated "
) +
place.ratings().average()
+
"out of "
+
place.ratings().maximum() +
"stars"
;
Member Function Documentation▲
QPlaceRatings::QPlaceRatings()▲
Constructs a new ratings object.
QPlaceRatings::QPlaceRatings(const QPlaceRatings &other)▲
Constructs a copy of other.
QPlaceRatings::~QPlaceRatings()▲
Destroys the ratings object.
qreal QPlaceRatings::average() const▲
int QPlaceRatings::count() const▲
bool QPlaceRatings::isEmpty() const▲
Returns true if all fields of the place ratings are 0; otherwise returns false.
qreal QPlaceRatings::maximum() const▲
void QPlaceRatings::setAverage(qreal average)▲
void QPlaceRatings::setCount(int count)▲
void QPlaceRatings::setMaximum(qreal max)▲
bool QPlaceRatings::operator!=(const QPlaceRatings &other) const▲
Returns true if other is not equal to this ratings object, otherwise returns false.
QPlaceRatings &QPlaceRatings::operator=(const QPlaceRatings &other)▲
Assigns other to this ratings object and returns a reference to this ratings object.
bool QPlaceRatings::operator==(const QPlaceRatings &other) const▲
Returns true if other is equal to this ratings object, otherwise returns false.