QPlaceRatings¶
The
QPlaceRatings
class holds rating information about a place. More…
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
average
()def
count
()def
isEmpty
()def
maximum
()def
setAverage
(average)def
setCount
(count)def
setMaximum
(max)
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 themaximum()
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:
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
- PySide2.QtLocation.QPlaceRatings.count()¶
- Return type:
int
Returns the total number of individual ratings.
See also
- 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
- PySide2.QtLocation.QPlaceRatings.__ne__(other)¶
- Parameters:
other –
PySide2.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:
other –
PySide2.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
- PySide2.QtLocation.QPlaceRatings.setCount(count)¶
- Parameters:
count – int
Sets the total number of individual ratings to
count
.See also
© 2022 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.