Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPlaceRatings Class Reference

\inmodule QtLocation More...

#include <qplaceratings.h>

+ Collaboration diagram for QPlaceRatings:

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.
 
QPlaceRatingsoperator= (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.
 

Detailed Description

\inmodule QtLocation

Since
5.6

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.

Constructor & Destructor Documentation

◆ QPlaceRatings() [1/3]

QPlaceRatings::QPlaceRatings ( )

\qmlvaluetype ratings \inqmlmodule QtLocation

Since
QtLocation 6.5

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.

◆ QPlaceRatings() [2/3]

QPlaceRatings::QPlaceRatings ( const QPlaceRatings & other)
defaultnoexcept

Constructs a copy of other.

◆ QPlaceRatings() [3/3]

QPlaceRatings::QPlaceRatings ( QPlaceRatings && other)
defaultnoexcept

◆ ~QPlaceRatings()

QPlaceRatings::~QPlaceRatings ( )
default

Destroys the ratings object.

Member Function Documentation

◆ average()

qreal QPlaceRatings::average ( ) const

Definition at line 112 of file qplaceratings.cpp.

References QPlaceRatingsPrivate::average.

◆ count()

int QPlaceRatings::count ( ) const

Definition at line 153 of file qplaceratings.cpp.

References QPlaceRatingsPrivate::count.

◆ isEmpty()

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().

+ Here is the call graph for this function:

◆ maximum()

qreal QPlaceRatings::maximum ( ) const

Definition at line 132 of file qplaceratings.cpp.

References QPlaceRatingsPrivate::maximum.

◆ operator=()

QPlaceRatings & QPlaceRatings::operator= ( const QPlaceRatings & other)
noexcept

Assigns other to this ratings object and returns a reference to this ratings object.

Definition at line 74 of file qplaceratings.cpp.

References d, and other().

+ Here is the call graph for this function:

◆ setAverage()

void QPlaceRatings::setAverage ( qreal average)

Definition at line 117 of file qplaceratings.cpp.

References average, and QPlaceRatingsPrivate::average.

◆ setCount()

void QPlaceRatings::setCount ( int count)

Definition at line 158 of file qplaceratings.cpp.

References count, and QPlaceRatingsPrivate::count.

◆ setMaximum()

void QPlaceRatings::setMaximum ( qreal max)

Definition at line 137 of file qplaceratings.cpp.

References QPlaceRatingsPrivate::maximum.

◆ swap()

void QPlaceRatings::swap ( QPlaceRatings & other)
inlinenoexcept

Definition at line 36 of file qplaceratings.h.

References d, other(), and swap().

Referenced by swap().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QPlaceRatings::operator!= ( const QPlaceRatings & lhs,
const QPlaceRatings & rhs )
friend

Returns true if lhs is not equal to rhs, otherwise returns false.

Definition at line 40 of file qplaceratings.h.

◆ operator==

bool QPlaceRatings::operator== ( const QPlaceRatings & lhs,
const QPlaceRatings & rhs )
friend

Returns true if lhs is equal to rhs, otherwise returns false.

Definition at line 38 of file qplaceratings.h.

Property Documentation

◆ average

QPlaceRatings::average
readwrite

\qmlproperty real ratings::average

This property holds the average of the individual ratings.

See also
maximum

the average value of individual ratings.

Definition at line 23 of file qplaceratings.h.

Referenced by RequestHandler::ratings(), and setAverage().

◆ count

QPlaceRatings::count
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 25 of file qplaceratings.h.

Referenced by setCount().

◆ maximum

QPlaceRatings::maximum
readwrite

\qmlproperty real ratings::maximum

This property holds the maximum rating value.

the maximum possible rating value.

Definition at line 24 of file qplaceratings.h.

Referenced by RequestHandler::ratings().


The documentation for this class was generated from the following files: