QPlaceReview Class

The QPlaceReview class represents a review of a place. 更多...

头文件: #include <QPlaceReview>
qmake: QT += location
开始支持版本: Qt 5.6
基类: QPlaceContent

公有函数

QPlaceReview()
QPlaceReview(const QPlaceContent &other)
virtual ~QPlaceReview()
QDateTime dateTime() const
QString language() const
qreal rating() const
QString reviewId() const
void setDateTime(const QDateTime &dateTime)
void setLanguage(const QString &language)
void setRating(qreal rating)
void setReviewId(const QString &identifier)
void setText(const QString &text)
void setTitle(const QString &title)
QString text() const
QString title() const

详细描述

The QPlaceReview class represents a review of a place.

Each QPlaceReview has a number of properties such as a title, text, date of submission and rating; in addition to those 个属性继承自 QPlaceContent.

Note: The Places API only supports reviews as 'retrieve-only' objects. Submitting reviews to a provider is not a supported use case.

参见 QPlaceContent and QPlaceEditorial.

成员函数

QPlaceReview::QPlaceReview()

Constructs a new review object.

QPlaceReview::QPlaceReview(const QPlaceContent &other)

Constructs a copy of other, otherwise constructs a default review object.

[virtual] QPlaceReview::~QPlaceReview()

Destroys the review.

QDateTime QPlaceReview::dateTime() const

Returns the date and time that the review was submitted.

参见 setDateTime().

QString QPlaceReview::language() const

Returns the language of the review. Typically this would be a language code in the 2 letter ISO 639-1 format.

参见 setLanguage().

qreal QPlaceReview::rating() const

Returns this review's rating of the place.

参见 setRating().

QString QPlaceReview::reviewId() const

Returns the review's identifier.

参见 setReviewId().

void QPlaceReview::setDateTime(const QDateTime &dateTime)

Sets the date and time that the review was submitted to dateTime.

参见 dateTime().

void QPlaceReview::setLanguage(const QString &language)

Sets the language of the review. Typically this would be a language code in the 2 letter ISO 639-1 format.

参见 language().

void QPlaceReview::setRating(qreal rating)

Sets the review's rating of the place.

参见 rating().

void QPlaceReview::setReviewId(const QString &identifier)

Sets the identifier of the review.

参见 reviewId().

void QPlaceReview::setText(const QString &text)

Sets text of the review.

参见 text().

void QPlaceReview::setTitle(const QString &title)

Sets the title of the review.

参见 title().

QString QPlaceReview::text() const

Returns a textual description of the place.

Depending on the provider the text could be rich (HTML based) or plain text.

参见 setText().

QString QPlaceReview::title() const

Returns the title of the review.

参见 setTitle().