QPlaceRatings Class
The QPlaceRatings class holds rating information about a place. More...
Header: | #include <QPlaceRatings> |
qmake: | QT += location |
Properties
Public Functions
QPlaceRatings() | |
QPlaceRatings(const QPlaceRatings &other) | |
~QPlaceRatings() | |
qreal | average() const |
int | count() const |
bool | isEmpty() const |
qreal | maximum() const |
void | setAverage(qreal average) |
void | setCount(int count) |
void | setMaximum(qreal max) |
QPlaceRatings & | operator=(const QPlaceRatings &other) |
Related Non-Members
bool | operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
bool | operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
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.
Property Documentation
average : qreal
This property holds the average value of individual ratings.
Access functions:
qreal | average() const |
void | setAverage(qreal average) |
count : int
This property holds the total number of individual ratings.
Access functions:
int | count() const |
void | setCount(int count) |
maximum : qreal
This property holds the maximum possible rating value.
Access functions:
qreal | maximum() const |
void | setMaximum(qreal max) |
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.
bool QPlaceRatings::isEmpty() const
Returns true if all fields of the place ratings are 0; otherwise returns false.
QPlaceRatings &QPlaceRatings::operator=(const QPlaceRatings &other)
Assigns other to this ratings object and returns a reference to this ratings object.
Related Non-Members
bool operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs)
Returns true if lhs is not equal to rhs, otherwise returns false.
bool operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs)
Returns true if lhs is equal to rhs, otherwise returns false.
© 2023 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.