21 QML_VALUE_TYPE(ratings)
24 Q_PROPERTY(qreal average READ average WRITE setAverage)
25 Q_PROPERTY(qreal maximum READ maximum WRITE setMaximum)
26 Q_PROPERTY(
int count READ count WRITE setCount)
30 QPlaceRatings(
const QPlaceRatings &other)
noexcept;
31 QPlaceRatings(QPlaceRatings &&other)
noexcept =
default;
34 QPlaceRatings &operator=(
const QPlaceRatings &other)
noexcept;
35 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QPlaceRatings)
37 void swap(QPlaceRatings &other)
noexcept { d.swap(other.d); }
39 friend inline bool operator==(
const QPlaceRatings &lhs,
const QPlaceRatings &rhs)
noexcept
40 {
return lhs.isEqual(rhs); }
41 friend inline bool operator!=(
const QPlaceRatings &lhs,
const QPlaceRatings &rhs)
noexcept
42 {
return !lhs.isEqual(rhs); }
44 qreal average()
const;
45 void setAverage(qreal average);
48 void setCount(
int count);
50 qreal maximum()
const;
51 void setMaximum(qreal max);
56 QSharedDataPointer<QPlaceRatingsPrivate> d;
58 bool isEqual(
const QPlaceRatings &other)
const noexcept;