![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtLocation More...
#include <qplaceratings.h>
Public Member Functions | |
| QPlaceRatings () | |
| \qmlvaluetype ratings \inqmlmodule QtLocation | |
| QPlaceRatings (const QPlaceRatings &other) noexcept | |
| Constructs a copy of other. | |
| QPlaceRatings (QPlaceRatings &&other) noexcept=default | |
| ~QPlaceRatings () | |
| Destroys the ratings object. | |
| QPlaceRatings & | operator= (const QPlaceRatings &other) noexcept |
| Assigns other to this ratings object and returns a reference to this ratings object. | |
| void | swap (QPlaceRatings &other) noexcept |
| qreal | average () const |
| void | setAverage (qreal average) |
| int | count () const |
| void | setCount (int count) |
| qreal | maximum () const |
| void | setMaximum (qreal max) |
| bool | isEmpty () const |
| Returns true if all fields of the place ratings are 0; otherwise returns false. | |
Properties | |
| QML_STRUCTURED_VALUEqreal | average |
| \qmlproperty real ratings::average | |
| qreal | maximum |
| \qmlproperty real ratings::maximum | |
| int | count |
| \qmlproperty int ratings::count | |
Friends | |
| bool | operator== (const QPlaceRatings &lhs, const QPlaceRatings &rhs) noexcept |
| Returns true if lhs is equal to rhs, otherwise returns false. | |
| bool | operator!= (const QPlaceRatings &lhs, const QPlaceRatings &rhs) noexcept |
| Returns true if lhs is not equal to rhs, otherwise returns false. | |
\inmodule QtLocation
The QPlaceRatings class holds rating information about a place.
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.
Definition at line 18 of file qplaceratings.h.
| QPlaceRatings::QPlaceRatings | ( | ) |
\qmlvaluetype ratings \inqmlmodule QtLocation
The ratings type holds place rating information.
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 \l {ratings::}{average} property gives an aggregated ratings value out of a possible maximum as given by the \l {ratings::maximum} property.
Constructs a new ratings object.
Definition at line 56 of file qplaceratings.cpp.
|
defaultnoexcept |
Constructs a copy of other.
|
defaultnoexcept |
|
default |
Destroys the ratings object.
| qreal QPlaceRatings::average | ( | ) | const |
Definition at line 113 of file qplaceratings.cpp.
| int QPlaceRatings::count | ( | ) | const |
Definition at line 154 of file qplaceratings.cpp.
| bool QPlaceRatings::isEmpty | ( | ) | const |
Returns true if all fields of the place ratings are 0; otherwise returns false.
Definition at line 167 of file qplaceratings.cpp.
| qreal QPlaceRatings::maximum | ( | ) | const |
Definition at line 133 of file qplaceratings.cpp.
|
noexcept |
Assigns other to this ratings object and returns a reference to this ratings object.
Definition at line 75 of file qplaceratings.cpp.
Definition at line 118 of file qplaceratings.cpp.
| void QPlaceRatings::setCount | ( | int | count | ) |
Definition at line 159 of file qplaceratings.cpp.
Definition at line 138 of file qplaceratings.cpp.
|
inlinenoexcept |
Definition at line 37 of file qplaceratings.h.
|
friend |
Returns true if lhs is not equal to rhs, otherwise returns false.
Definition at line 41 of file qplaceratings.h.
|
friend |
Returns true if lhs is equal to rhs, otherwise returns false.
Definition at line 39 of file qplaceratings.h.
|
readwrite |
\qmlproperty real ratings::average
This property holds the average of the individual ratings.
the average value of individual ratings.
Definition at line 24 of file qplaceratings.h.
|
readwrite |
\qmlproperty int ratings::count
This property holds the total number of individual user ratings used in determining the overall ratings \l average.
the total number of individual ratings.
Definition at line 26 of file qplaceratings.h.
|
readwrite |
\qmlproperty real ratings::maximum
This property holds the maximum rating value.
the maximum possible rating value.
Definition at line 25 of file qplaceratings.h.