![]() |
Qt 6.x
The Qt SDK
|
\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 17 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 55 of file qplaceratings.cpp.
|
defaultnoexcept |
Constructs a copy of other.
|
defaultnoexcept |
|
default |
Destroys the ratings object.
qreal QPlaceRatings::average | ( | ) | const |
Definition at line 112 of file qplaceratings.cpp.
References QPlaceRatingsPrivate::average.
int QPlaceRatings::count | ( | ) | const |
Definition at line 153 of file qplaceratings.cpp.
References QPlaceRatingsPrivate::count.
bool QPlaceRatings::isEmpty | ( | ) | const |
Returns true if all fields of the place ratings are 0; otherwise returns false.
Definition at line 166 of file qplaceratings.cpp.
References QPlaceRatingsPrivate::isEmpty().
qreal QPlaceRatings::maximum | ( | ) | const |
Definition at line 132 of file qplaceratings.cpp.
References QPlaceRatingsPrivate::maximum.
|
noexcept |
Assigns other to this ratings object and returns a reference to this ratings object.
Definition at line 74 of file qplaceratings.cpp.
Definition at line 117 of file qplaceratings.cpp.
References average, and QPlaceRatingsPrivate::average.
void QPlaceRatings::setCount | ( | int | count | ) |
Definition at line 158 of file qplaceratings.cpp.
References count, and QPlaceRatingsPrivate::count.
Definition at line 137 of file qplaceratings.cpp.
References QPlaceRatingsPrivate::maximum.
|
inlinenoexcept |
|
friend |
Returns true if lhs is not equal to rhs, otherwise returns false.
Definition at line 40 of file qplaceratings.h.
|
friend |
Returns true if lhs is equal to rhs, otherwise returns false.
Definition at line 38 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 21 of file qplaceratings.h.
Referenced by RequestHandler::ratings(), and setAverage().
|
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 21 of file qplaceratings.h.
Referenced by setCount().
|
readwrite |
\qmlproperty real ratings::maximum
This property holds the maximum rating value.
the maximum possible rating value.
Definition at line 21 of file qplaceratings.h.
Referenced by RequestHandler::ratings().