QPlaceRatings Class
QPlaceRatings 类保存一个地方的评级信息。更多
Header: | #include <QPlaceRatings> |
qmake: | QT += location |
属性
公共职能
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) |
相关非成员
bool | operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
bool | operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
属性文档
average : qreal
该属性保存单个评分的平均值。
访问功能:
qreal | average() const |
void | setAverage(qreal average) |
count : int
该属性保存单个评级的总数。
访问功能:
int | count() const |
void | setCount(int count) |
maximum : qreal
该属性保存可能的最大评级值。
访问函数:
qreal | maximum() const |
void | setMaximum(qreal max) |
成员函数文档
QPlaceRatings::QPlaceRatings()
构造一个新的评级对象。
[noexcept]
QPlaceRatings::QPlaceRatings(const QPlaceRatings &other)
构造other 的副本。
[noexcept]
QPlaceRatings::~QPlaceRatings()
销毁评级对象。
bool QPlaceRatings::isEmpty() const
如果地点评级的所有字段都为 0,则返回 true;否则返回 false。
[noexcept]
QPlaceRatings &QPlaceRatings::operator=(const QPlaceRatings &other)
将other 赋值给此评级对象,并返回此评级对象的引用。
相关非成员
[noexcept]
bool operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs)
如果lhs 不等于rhs ,则返回 true,否则返回 false。
[noexcept]
bool operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs)
如果lhs 等于rhs ,则返回 true,否则返回 false。
© 2025 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.