diff options
Diffstat (limited to 'src/location/places/qplacereviewreply.cpp')
-rw-r--r-- | src/location/places/qplacereviewreply.cpp | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/src/location/places/qplacereviewreply.cpp b/src/location/places/qplacereviewreply.cpp new file mode 100644 index 00000000..38de601f --- /dev/null +++ b/src/location/places/qplacereviewreply.cpp @@ -0,0 +1,85 @@ +#include "qplacereviewreply.h" + +#include "qplace.h" + +namespace QT_PLACES_NAMESPACE { +class QPlaceReviewReplyPrivate +{ +public: + QPlaceReviewReplyPrivate() {} + QList<QPlaceReview> reviews; + int totalCount; +}; + +} // QT_PLACES_NAMESPACE + +using namespace QT_PLACES_NAMESPACE; + +/*! + \class QPlaceReviewReply + + \brief The QPlaceReviewReply class manages a review retrieval operation started by an + instance of QPlaceManager. + + \inmodule QtLocation + + \ingroup places-main +*/ + +/*! + Constructs a review reply with a given \a parent. +*/ +QPlaceReviewReply::QPlaceReviewReply(QObject *parent) + : QPlaceReply(parent) +{ + d = new QPlaceReviewReplyPrivate; +} + +/*! + Destroys the reply. +*/ +QPlaceReviewReply::~QPlaceReviewReply() +{ + delete d; +} + +/*! + Returns the type of reply. +*/ +QPlaceReply::Type QPlaceReviewReply::type() const +{ + return QPlaceReply::ReviewReply; +} + + /*! + Returns the reviews. +*/ +QList<QPlaceReview> QPlaceReviewReply::reviews() const +{ + return d->reviews; +} + +/*! + Sets the \a reviews. +*/ +void QPlaceReviewReply::setReviews(const QList<QPlaceReview> &reviews) +{ + d->reviews = reviews; +} + +/*! + Returns the total number of reviews for a place. If the total number of + reviews cannot be counted a value of -1 is returned. +*/ +int QPlaceReviewReply::totalCount() +{ + return d->totalCount; +} + +/*! + Sets the \a total number of media objects for a place. +*/ +void QPlaceReviewReply::setTotalCount(int total) +{ + d->totalCount = total; +} |