QPlaceRatings

The QPlaceRatings class holds rating information about a place. More

Inheritance diagram of PySide2.QtLocation.QPlaceRatings

Synopsis

Functions

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() << QString("This place rated ") + place.ratings().average()
            + "out of " + place.ratings().maximum() + "stars";
class QPlaceRatings

QPlaceRatings(other)

param other

QPlaceRatings

Constructs a new ratings object.

Constructs a copy of other .

PySide2.QtLocation.QPlaceRatings.average()
Return type

qreal

Returns the average value of individual ratings.

See also

setAverage()

PySide2.QtLocation.QPlaceRatings.count()
Return type

int

Returns the total number of individual ratings.

See also

setCount()

PySide2.QtLocation.QPlaceRatings.isEmpty()
Return type

bool

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

PySide2.QtLocation.QPlaceRatings.maximum()
Return type

qreal

Returns the maximum possible rating value.

See also

setMaximum()

PySide2.QtLocation.QPlaceRatings.__ne__(other)
Parameters

otherQPlaceRatings

Return type

bool

Returns true if other is not equal to this ratings object, otherwise returns false.

PySide2.QtLocation.QPlaceRatings.__eq__(other)
Parameters

otherQPlaceRatings

Return type

bool

Returns true if other is equal to this ratings object, otherwise returns false.

PySide2.QtLocation.QPlaceRatings.setAverage(average)
Parameters

averageqreal

Sets the average value of the ratings.

See also

average()

PySide2.QtLocation.QPlaceRatings.setCount(count)
Parameters

countint

Sets the total number of individual ratings to count .

See also

count()

PySide2.QtLocation.QPlaceRatings.setMaximum(max)
Parameters

maxqreal

Sets the maximum possible rating value to max .

See also

maximum()