QPlaceRatings Class
La classe `QPlaceRatings` contient des informations sur les notes attribuées à un lieu. En savoir plus…
| Header: | #include <QPlaceRatings> |
| qmake: | QT += location |
Propriétés
Fonctions publiques
| QPlaceRatings() | |
| QPlaceRatings(const QPlaceRatings &other) | |
| QPlaceRatings(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) |
Personnes non membres concernées
| bool | operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
| bool | operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs) |
Description détaillée
Les informations de notation servent à décrire la qualité perçue d'un lieu. En général, ces informations sont représentées sous la forme d'un nombre d'étoiles. La fonction average() renvoie une valeur de notation agrégée sur un maximum possible, telle que fournie par la fonction maximum().
Documentation sur les propriétés
average : qreal
Cette propriété contient la valeur moyenne des notes individuelles.
Fonctions d'accès :
| qreal | average() const |
| void | setAverage(qreal average) |
count : int
Cette propriété contient le nombre total d'évaluations individuelles.
Fonctions d'accès :
| int | count() const |
| void | setCount(int count) |
maximum : qreal
Cette propriété prend la valeur maximale possible.
Fonctions d'accès :
| qreal | maximum() const |
| void | setMaximum(qreal max) |
Documentation des fonctions membres
QPlaceRatings::QPlaceRatings()
Crée un nouvel objet « ratings ».
[noexcept] QPlaceRatings::QPlaceRatings(const QPlaceRatings &other)
Crée une copie de other.
[constexpr noexcept default] QPlaceRatings::QPlaceRatings(QPlaceRatings &&other)
Crée par « move » une instance de ` QPlaceRatings`.
[noexcept] QPlaceRatings::~QPlaceRatings()
Supprime l'objet « ratings ».
bool QPlaceRatings::isEmpty() const
Renvoie « true » si tous les champs des notes attribuées aux lieux sont égaux à 0 ; sinon, renvoie « false ».
[noexcept] QPlaceRatings &QPlaceRatings::operator=(const QPlaceRatings &other)
Attribue la propriété « other » à cet objet « ratings » et renvoie une référence à cet objet « ratings ».
Éléments non membres associés
[noexcept] bool operator!=(const QPlaceRatings &lhs, const QPlaceRatings &rhs)
Renvoie « true » si lhs n'est pas égal à rhs; sinon, renvoie « false ».
[noexcept] bool operator==(const QPlaceRatings &lhs, const QPlaceRatings &rhs)
Renvoie « true » si lhs est égal à rhs; sinon, renvoie « false ».
© 2026 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.