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 PySide2.QtLocation.QPlaceRatings

PySide2.QtLocation.QPlaceRatings(other)

param other:

PySide2.QtLocation.QPlaceRatings

Constructs a new ratings object.

Constructs a copy of other .

PySide2.QtLocation.QPlaceRatings.average()
Return type:

float

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:

float

Returns the maximum possible rating value.

See also

setMaximum()

PySide2.QtLocation.QPlaceRatings.__ne__(other)
Parameters:

otherPySide2.QtLocation.QPlaceRatings

Return type:

bool

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

PySide2.QtLocation.QPlaceRatings.__eq__(other)
Parameters:

otherPySide2.QtLocation.QPlaceRatings

Return type:

bool

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

PySide2.QtLocation.QPlaceRatings.setAverage(average)
Parameters:

average – float

Sets the average value of the ratings.

See also

average()

PySide2.QtLocation.QPlaceRatings.setCount(count)
Parameters:

count – int

Sets the total number of individual ratings to count .

See also

count()

PySide2.QtLocation.QPlaceRatings.setMaximum(max)
Parameters:

max – float

Sets the maximum possible rating value to max .

See also

maximum()