summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabcd <qt-info@nokia.com>2011-06-22 16:22:44 +1000
committerabcd <qt-info@nokia.com>2011-06-22 16:22:44 +1000
commit47a2918ed8e48a4cf923464fbe91de2aa5c8f231 (patch)
tree98ce64ccfe9c6e8ec212165f5008137d38420a58
parent8e562196d8c7d873b38af2041cf1674a106e52a3 (diff)
downloadqtlocation-47a2918ed8e48a4cf923464fbe91de2aa5c8f231.tar.gz
Use QGeoPlace instead of QPlace
QGeoPlace was an already existing class in mobility.
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace.cpp8
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativeplace_p.h10
-rw-r--r--src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp2
-rw-r--r--src/location/places/places.pri3
-rw-r--r--src/location/places/qplace.cpp479
-rw-r--r--src/location/places/qplace.h127
-rw-r--r--src/location/places/qplace_p.h85
-rw-r--r--src/location/places/qplacedetailsreply.cpp6
-rw-r--r--src/location/places/qplacedetailsreply.h6
-rw-r--r--src/location/places/qplacemanager.cpp10
-rw-r--r--src/location/places/qplacemanager.h12
-rw-r--r--src/location/places/qplacemanagerengine.h12
-rw-r--r--src/location/places/qplacemediareply.cpp2
-rw-r--r--src/location/places/qplacereply.cpp3
-rw-r--r--src/location/places/qplacereviewreply.cpp2
-rw-r--r--src/location/places/qplacesearchresult.cpp4
-rw-r--r--src/location/places/qplacesearchresult.h6
-rw-r--r--src/location/places/qplacesearchresult_p.h2
-rw-r--r--src/location/qgeoplace.cpp412
-rw-r--r--src/location/qgeoplace.h53
-rw-r--r--src/location/qgeoplace_p.h21
-rw-r--r--src/plugins/places/nokia/qplacejsondetailsparser.cpp54
-rw-r--r--src/plugins/places/nokia/qplacejsondetailsparser.h52
-rw-r--r--src/plugins/places/nokia/qplacejsonrecommendationparser.cpp4
-rw-r--r--src/plugins/places/nokia/qplacejsonsearchparser.cpp12
-rw-r--r--src/plugins/places/nokia/qplacejsonsearchparser.h8
-rw-r--r--src/plugins/places/nokia/qplacemanagerengineimpl.cpp12
-rw-r--r--src/plugins/places/nokia/qplacemanagerengineimpl.h12
28 files changed, 597 insertions, 822 deletions
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
index 1f55dc22..95e0fec4 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace.cpp
@@ -19,7 +19,7 @@ QDeclarativePlace::QDeclarativePlace(QObject* parent)
{
}
-QDeclarativePlace::QDeclarativePlace(const QPlace &src,
+QDeclarativePlace::QDeclarativePlace(const QGeoPlace &src,
QObject *parent)
: QObject(parent),
m_src(src)
@@ -39,9 +39,9 @@ QDeclarativePlace::~QDeclarativePlace()
{
}
-void QDeclarativePlace::setPlace(const QPlace &src)
+void QDeclarativePlace::setPlace(const QGeoPlace &src)
{
- QPlace previous = m_src;
+ QGeoPlace previous = m_src;
m_src = src;
if (previous.additionalData() != m_src.additionalData()) {
@@ -117,7 +117,7 @@ void QDeclarativePlace::setPlace(const QPlace &src)
}
}
-QPlace QDeclarativePlace::place() const
+QGeoPlace QDeclarativePlace::place() const
{
return m_src;
}
diff --git a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
index 7a718fb9..98ad1219 100644
--- a/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
+++ b/src/imports/location/declarativeplaces/qdeclarativeplace_p.h
@@ -3,7 +3,7 @@
#include <QObject>
#include <QDeclarativeListProperty>
-#include <qplace.h>
+#include <qgeoplace.h>
#include "qdeclarativelocation_p.h"
#include "qdeclarativebusinessinformation_p.h"
#include "qdeclarativecategory_p.h"
@@ -44,11 +44,11 @@ class QDeclarativePlace : public QObject
public:
explicit QDeclarativePlace(QObject* parent = 0);
- explicit QDeclarativePlace(const QPlace &src, QObject* parent = 0);
+ explicit QDeclarativePlace(const QGeoPlace &src, QObject* parent = 0);
~QDeclarativePlace();
- QPlace place() const;
- void setPlace(const QPlace &src);
+ QGeoPlace place() const;
+ void setPlace(const QGeoPlace &src);
QVariantHash additionalData() const;
void setAdditionalData(const QVariantHash &data);
@@ -158,7 +158,7 @@ private:
QDeclarativeReviewPaginationList m_reviewList;
QDeclarativeBusinessInformation m_businessInformation;
- QPlace m_src;
+ QGeoPlace m_src;
};
QTM_END_NAMESPACE
diff --git a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
index 9289bbbe..88a73dfb 100644
--- a/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
+++ b/src/imports/location/declarativeplaces/qdeclarativerecommendationmodel.cpp
@@ -293,7 +293,7 @@ void QDeclarativeRecommendationModel::executeQuery()
m_results.clear();
endResetModel();
emit resultsChanged();
- QPlace target;
+ QGeoPlace target;
target.setPlaceId(m_queryParameters.searchTerm());
connectNewResponse(m_manager->recommendations(target, m_queryParameters));
}
diff --git a/src/location/places/places.pri b/src/location/places/places.pri
index 052b54a9..e6269add 100644
--- a/src/location/places/places.pri
+++ b/src/location/places/places.pri
@@ -3,7 +3,6 @@ INCLUDEPATH += places
PUBLIC_HEADERS += \
#data classes
- places/qplace.h \
places/qplacealternativevalue.h \
places/qplacebusinessfeature.h \
places/qplacebusinessinformation.h \
@@ -36,7 +35,6 @@ PUBLIC_HEADERS += \
places/qplacemanagerenginefactory.h
PRIVATE_HEADERS += \
- places/qplace_p.h \
places/qplacealternativevalue_p.h \
places/qplacebusinessfeature_p.h \
places/qplacebusinessinformation_p.h \
@@ -56,7 +54,6 @@ PRIVATE_HEADERS += \
SOURCES += \
#data classes
- places/qplace.cpp \
places/qplacealternativevalue.cpp \
places/qplacebusinessfeature.cpp \
places/qplacebusinessinformation.cpp \
diff --git a/src/location/places/qplace.cpp b/src/location/places/qplace.cpp
deleted file mode 100644
index b681fad1..00000000
--- a/src/location/places/qplace.cpp
+++ /dev/null
@@ -1,479 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include "qplace.h"
-#include "qplace_p.h"
-
-QTM_USE_NAMESPACE
-
-QPlacePrivate::QPlacePrivate() : QSharedData()
-{
-}
-
-QPlacePrivate::QPlacePrivate(const QPlacePrivate &other)
- : QSharedData(),
- placeScore(0),
- mediaCount(0),
- reviewCount(0)
-{
- this->additionalData = other.additionalData;
- this->alternativeNames = other.alternativeNames;
- this->placeScore = other.placeScore;
- this->businessInfo = other.businessInfo;
- this->categories = other.categories;
- this->contacts = other.contacts;
- this->descriptions = other.descriptions;
- this->location = other.location;
- this->alternativeLocations = other.alternativeLocations;
- this->rating = other.rating;
- this->suppliers = other.suppliers;
- this->feeds = other.feeds;
- this->media = other.media;
- this->mediaCount = other.mediaCount;
- this->name = other.name;
- this->placeId = other.placeId;
- this->reviews = other.reviews;
- this->reviewCount = other.reviewCount;
- this->shortDescription = other.shortDescription;
- this->tags = other.tags;
-}
-
-QPlacePrivate::~QPlacePrivate()
-{
-}
-
-bool QPlacePrivate::operator==(const QPlacePrivate &other) const
-{
- return (
- this->additionalData == other.additionalData
- && this->alternativeNames == other.alternativeNames
- && this->placeScore == other.placeScore
- && this->businessInfo == other.businessInfo
- && this->categories == other.categories
- && this->contacts == other.contacts
- && this->descriptions == other.descriptions
- && this->location == other.location
- && this->alternativeLocations == other.alternativeLocations
- && this->rating == other.rating
- && this->suppliers == other.suppliers
- && this->feeds == other.feeds
- && this->media == other.media
- && this->mediaCount == other.mediaCount
- && this->name == other.name
- && this->placeId == other.placeId
- && this->reviews == other.reviews
- && this->reviewCount == other.reviewCount
- && this->shortDescription == other.shortDescription
- && this->tags == other.tags
- );
-}
-
-/*!
- \class QPlaces::QPlace
-
- \inmodule QPlaces
-
- \brief The QPlace class represents a place object.
-
- Each QPlace represents a place object with a number of attributes
- such as location, media, categories etc.
-
- Place objects are read-only, e.g. user of API might get list of media objects
- associated to specific place but can not edit its content. Not all data might be
- avaliable in the begining. Search response is not providing all data, they need
- to be loaded later from place request.
-
- QPlace is an in memory representation of a place object.
-*/
-
-
-/*!
- Default constructor. Constructs an new place object.
-*/
-QPlace::QPlace()
- : d(new QPlacePrivate)
-{
-}
-
-/*!
- Constructs a copy of \a other
-*/
-QPlace::QPlace(const QPlace &other)
- :d(other.d)
-{
-}
-
-/*!
- Destructor.
-*/
-QPlace::~QPlace()
-{
-}
-
-QPlace &QPlace::operator =(const QPlace &other) {
- d = other.d;
- return *this;
-}
-
-bool QPlace::operator==(const QPlace &other) const
-{
- return (*(d.constData()) == *(other.d.constData()));
-}
-
-/*!
- Returns additional data.
-*/
-QVariantHash QPlace::additionalData() const
-{
- return d->additionalData;
-}
-
-/*!
- Sets additional data.
-*/
-void QPlace::setAdditionalData(const QVariantHash &data)
-{
- d->additionalData = data;
-}
-
-/*!
- Returns alternative names.
-*/
-QList<QPlaceAlternativeValue> QPlace::alternativeNames() const
-{
- return d->alternativeNames;
-}
-
-/*!
- Sets alternative names.
-*/
-void QPlace::setAlternativeNames(const QList<QPlaceAlternativeValue> &alternativeNames)
-{
- d->alternativeNames = alternativeNames;
-}
-
-/*!
- Returns place score.
-*/
-double QPlace::placeScore() const
-{
- return d->placeScore;
-}
-
-/*!
- Sets place score.
-*/
-void QPlace::setPlaceScore(const double &data)
-{
- d->placeScore = data;
-}
-
-/*!
- Returns business info.
-*/
-QPlaceBusinessInformation QPlace::businessInformation() const
-{
- return d->businessInfo;
-}
-
-/*!
- Sets business info.
-*/
-void QPlace::setBusinessInformation(const QPlaceBusinessInformation &business)
-{
- d->businessInfo = business;
-}
-
-/*!
- Returns categories.
-*/
-QList<QPlaceCategory> QPlace::categories() const
-{
- return d->categories;
-}
-
-/*!
- Sets categories.
-*/
-void QPlace::setCategories(const QList<QPlaceCategory> &categories)
-{
- d->categories = categories;
-}
-
-/*!
- Returns contacts.
-*/
-QList<QPlaceContact> QPlace::contacts() const
-{
- return d->contacts;
-}
-
-/*!
- Sets contacts.
-*/
-void QPlace::setContacts(const QList<QPlaceContact> &contacts)
-{
- d->contacts = contacts;
-}
-
-/*!
- Returns descriptions.
-*/
-QList<QPlaceDescription> QPlace::descriptions() const
-{
- return d->descriptions;
-}
-
-/*!
- Sets descriptions.
-*/
-void QPlace::setDescriptions(const QList<QPlaceDescription> &descriptions)
-{
- d->descriptions = descriptions;
-}
-
-/*!
- Returns location.
-*/
-QPlaceLocation QPlace::location() const
-{
- return d->location;
-}
-
-/*!
- Sets location.
-*/
-void QPlace::setLocation(const QPlaceLocation &location)
-{
- d->location = location;
-}
-
-/*!
- Returns alternative locations.
-*/
-QList<QPlaceLocation> QPlace::alternativeLocations() const
-{
- return d->alternativeLocations;
-}
-
-/*!
- Sets alternative locations.
-*/
-void QPlace::setAlternativeLocations(const QList<QPlaceLocation> &locations)
-{
- d->alternativeLocations = locations;
-}
-
-/*!
- Returns rating.
-*/
-QPlaceRating QPlace::rating() const
-{
- return d->rating;
-}
-
-/*!
- Sets rating.
-*/
-void QPlace::setRating(const QPlaceRating &rating)
-{
- d->rating = rating;
-}
-
-/*!
- Returns suppliers.
-*/
-QList<QPlaceSupplier> QPlace::suppliers() const
-{
- return d->suppliers;
-}
-
-/*!
- Sets suppliers.
-*/
-void QPlace::setSuppliers(const QList<QPlaceSupplier> &data)
-{
- d->suppliers = data;
-}
-
-/*!
- Returns feeds list.
-*/
-QStringList QPlace::feeds() const
-{
- return d->feeds;
-}
-
-/*!
- Sets feeds list.
-*/
-void QPlace::setFeeds(const QStringList &feeds)
-{
- d->feeds = feeds;
-}
-
-/*!
- Returns list with media objects connected to this place.
-*/
-QPlacePaginationList<QPlaceMediaObject> QPlace::media() const
-{
- return d->media;
-}
-
-/*!
- Sets list with media objects connected to this place.
-*/
-void QPlace::setMedia(const QPlacePaginationList<QPlaceMediaObject> &media)
-{
- d->media = media;
-}
-
-/*!
- Returns media count.
-*/
-int QPlace::mediaCount() const
-{
- return d->mediaCount;
-}
-
-/*!
- Sets media count.
-*/
-void QPlace::setMediaCount(const int &count)
-{
- d->mediaCount = count;
-}
-
-/*!
- Returns name.
-*/
-QString QPlace::name() const
-{
- return d->name;
-}
-
-/*!
- Sets name.
-*/
-void QPlace::setName(const QString &name)
-{
- d->name = name;
-}
-
-/*!
- Returns placeId.
-*/
-QString QPlace::placeId() const
-{
- return d->placeId;
-}
-
-/*!
- Sets placeId.
-*/
-void QPlace::setPlaceId(const QString &placeId)
-{
- d->placeId = placeId;
-}
-
-/*!
- Returns reviews.
-*/
-QPlacePaginationList<QPlaceReview> QPlace::reviews() const
-{
- return d->reviews;
-}
-
-/*!
- Sets reviews.
-*/
-void QPlace::setReviews(const QPlacePaginationList<QPlaceReview> &reviews)
-{
- d->reviews = reviews;
-}
-
-/*!
- Returns review count.
-*/
-int QPlace::reviewCount() const
-{
- return d->reviewCount;
-}
-
-/*!
- Sets review count.
-*/
-void QPlace::setReviewCount(const int &count)
-{
- d->reviewCount = count;
-}
-
-/*!
- Returns short description.
-*/
-QString QPlace::shortDescription() const
-{
- return d->shortDescription;
-}
-
-/*!
- Sets short description.
-*/
-void QPlace::setShortDescription(const QString &description)
-{
- d->shortDescription = description;
-}
-
-/*!
- Returns list of tags.
-*/
-QStringList QPlace::tags() const
-{
- return d->tags;
-}
-
-/*!
- Sets tags.
-*/
-void QPlace::setTags(const QStringList &tags)
-{
- d->tags = tags;
-}
diff --git a/src/location/places/qplace.h b/src/location/places/qplace.h
deleted file mode 100644
index e0588321..00000000
--- a/src/location/places/qplace.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLACE_H
-#define QPLACE_H
-
-#include <QSharedDataPointer>
-#include <QString>
-#include <QVariant>
-#include <QList>
-#include "qmobilityglobal.h"
-#include "qplacealternativevalue.h"
-#include "qplacebusinessinformation.h"
-#include "qplacecategory.h"
-#include "qplacecontact.h"
-#include "qplacedescription.h"
-#include "qplacelocation.h"
-#include "qplacerating.h"
-#include "qplacepaginationlist.h"
-#include "qplacemediaobject.h"
-#include "qplacereview.h"
-
-QTM_BEGIN_NAMESPACE
-
-class QPlacePrivate;
-
-class Q_LOCATION_EXPORT QPlace
-{
-public:
- QPlace();
- QPlace(const QPlace &other);
-
- virtual ~QPlace();
-
- QPlace &operator=(const QPlace &other);
-
- bool operator==(const QPlace &other) const;
- bool operator!=(const QPlace &other) const {
- return !(other == *this);
- }
-
- QVariantHash additionalData() const;
- void setAdditionalData(const QVariantHash &data);
- QList<QPlaceAlternativeValue> alternativeNames() const;
- void setAlternativeNames(const QList<QPlaceAlternativeValue> &alternativeNames);
- double placeScore() const;
- void setPlaceScore(const double &data);
- QPlaceBusinessInformation businessInformation() const;
- void setBusinessInformation(const QPlaceBusinessInformation &business);
- QList<QPlaceCategory> categories() const;
- void setCategories(const QList<QPlaceCategory> &categories);
- QList<QPlaceContact> contacts() const;
- void setContacts(const QList<QPlaceContact> &contacts);
- QList<QPlaceDescription> descriptions() const;
- void setDescriptions(const QList<QPlaceDescription> &descriptions);
- QPlaceLocation location() const;
- void setLocation(const QPlaceLocation &location);
- QList<QPlaceLocation> alternativeLocations() const;
- void setAlternativeLocations(const QList<QPlaceLocation> &locations);
- QPlaceRating rating() const;
- void setRating(const QPlaceRating &rating);
- QList<QPlaceSupplier> suppliers() const;
- void setSuppliers(const QList<QPlaceSupplier> &data);
- QStringList feeds() const;
- void setFeeds(const QStringList &feeds);
- QPlacePaginationList<QPlaceMediaObject> media() const;
- void setMedia(const QPlacePaginationList<QPlaceMediaObject> &media);
- int mediaCount() const;
- void setMediaCount(const int &count);
- QString name() const;
- void setName(const QString &name);
- QString placeId() const;
- void setPlaceId(const QString &placeId);
- QPlacePaginationList<QPlaceReview> reviews() const;
- void setReviews(const QPlacePaginationList<QPlaceReview> &reviews);
- int reviewCount() const;
- void setReviewCount(const int &count);
- QString shortDescription() const;
- void setShortDescription(const QString &description);
- QStringList tags() const;
- void setTags(const QStringList &tags);
-
-private:
- QSharedDataPointer<QPlacePrivate> d;
-};
-
-QTM_END_NAMESPACE
-
-#endif // QPLACE_H
diff --git a/src/location/places/qplace_p.h b/src/location/places/qplace_p.h
deleted file mode 100644
index c01f34a4..00000000
--- a/src/location/places/qplace_p.h
+++ /dev/null
@@ -1,85 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
-** All rights reserved.
-** Contact: Nokia Corporation (qt-info@nokia.com)
-**
-** This file is part of the Qt Mobility Components.
-**
-** $QT_BEGIN_LICENSE:LGPL$
-** GNU Lesser General Public License Usage
-** This file may be used under the terms of the GNU Lesser General Public
-** License version 2.1 as published by the Free Software Foundation and
-** appearing in the file LICENSE.LGPL included in the packaging of this
-** file. Please review the following information to ensure the GNU Lesser
-** General Public License version 2.1 requirements will be met:
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
-**
-** In addition, as a special exception, Nokia gives you certain additional
-** rights. These rights are described in the Nokia Qt LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU General
-** Public License version 3.0 as published by the Free Software Foundation
-** and appearing in the file LICENSE.GPL included in the packaging of this
-** file. Please review the following information to ensure the GNU General
-** Public License version 3.0 requirements will be met:
-** http://www.gnu.org/copyleft/gpl.html.
-**
-** Other Usage
-** Alternatively, this file may be used in accordance with the terms and
-** conditions contained in a signed written agreement between you and Nokia.
-**
-**
-**
-**
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#ifndef QPLACE_P_H
-#define QPLACE_P_H
-
-#include <QSharedData>
-
-#include "qplace.h"
-
-QTM_BEGIN_NAMESPACE
-
-class QPlacePrivate : public QSharedData
-{
-public:
- QPlacePrivate();
- QPlacePrivate(const QPlacePrivate &other);
-
- ~QPlacePrivate();
-
- bool operator==(const QPlacePrivate &other) const;
-
- QVariantHash additionalData;
- QList<QPlaceAlternativeValue> alternativeNames;
- double placeScore;
- QPlaceBusinessInformation businessInfo;
- QList<QPlaceCategory> categories;
- QList<QPlaceContact> contacts;
- QList<QPlaceDescription> descriptions;
- QPlaceLocation location;
- QList<QPlaceLocation> alternativeLocations;
- QPlaceRating rating;
- QList<QPlaceSupplier> suppliers;
- QStringList feeds;
- QPlacePaginationList<QPlaceMediaObject> media;
- int mediaCount;
- QString name;
- QString placeId;
- QPlacePaginationList<QPlaceReview> reviews;
- int reviewCount;
- QString shortDescription;
- QStringList tags;
-};
-
-QTM_END_NAMESPACE
-
-#endif // QPLACE_P_H
diff --git a/src/location/places/qplacedetailsreply.cpp b/src/location/places/qplacedetailsreply.cpp
index 407b891b..f1ad72ac 100644
--- a/src/location/places/qplacedetailsreply.cpp
+++ b/src/location/places/qplacedetailsreply.cpp
@@ -48,7 +48,7 @@ class QPlaceDetailsReplyPrivate : public QPlaceReplyPrivate
public:
QPlaceDetailsReplyPrivate() {}
~QPlaceDetailsReplyPrivate() {}
- QPlace result;
+ QGeoPlace result;
};
QTM_END_NAMESPACE
@@ -92,7 +92,7 @@ QPlaceReply::Type QPlaceDetailsReply::type() const
/*!
Returns a place result;
*/
-QPlace QPlaceDetailsReply::result() const
+QGeoPlace QPlaceDetailsReply::result() const
{
Q_D(const QPlaceDetailsReply);
return d->result;
@@ -101,7 +101,7 @@ QPlace QPlaceDetailsReply::result() const
/*!
Sets place \a result.
*/
-void QPlaceDetailsReply::setResult(const QPlace &result)
+void QPlaceDetailsReply::setResult(const QGeoPlace &result)
{
Q_D(QPlaceDetailsReply);
d->result = result;
diff --git a/src/location/places/qplacedetailsreply.h b/src/location/places/qplacedetailsreply.h
index 875d07e5..fce97f79 100644
--- a/src/location/places/qplacedetailsreply.h
+++ b/src/location/places/qplacedetailsreply.h
@@ -43,7 +43,7 @@
#define QPLACEDETAILSREPLY_H
#include "qplacereply.h"
-#include "qplace.h"
+#include "qgeoplace.h"
QTM_BEGIN_NAMESPACE
@@ -57,10 +57,10 @@ public:
QPlaceReply::Type type() const;
- QPlace result() const;
+ QGeoPlace result() const;
protected:
- void setResult(const QPlace &result);
+ void setResult(const QGeoPlace &result);
private:
Q_DISABLE_COPY(QPlaceDetailsReply)
Q_DECLARE_PRIVATE(QPlaceDetailsReply)
diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp
index 2c5f29e5..954a0d8f 100644
--- a/src/location/places/qplacemanager.cpp
+++ b/src/location/places/qplacemanager.cpp
@@ -130,7 +130,7 @@ QPlaceDetailsReply *QPlaceManager::getPlaceDetails(const QString &placeId) const
/*!
Retrieves media from a given \a place according to the parameters specified in \a query.
*/
-QPlaceMediaReply *QPlaceManager::getMedia(const QPlace &place, const QPlaceQuery &query) const
+QPlaceMediaReply *QPlaceManager::getMedia(const QGeoPlace &place, const QPlaceQuery &query) const
{
return d->engine->getMedia(place, query);
}
@@ -138,7 +138,7 @@ QPlaceMediaReply *QPlaceManager::getMedia(const QPlace &place, const QPlaceQuery
/*!
Posts a \a rating to a \a place.
*/
-QPlaceReply* QPlaceManager::postRating(const QPlace &place, qreal rating)
+QPlaceReply* QPlaceManager::postRating(const QGeoPlace &place, qreal rating)
{
return d->engine->postRating(place, rating);
}
@@ -146,7 +146,7 @@ QPlaceReply* QPlaceManager::postRating(const QPlace &place, qreal rating)
/*!
Returns reviews for a given \a place according to the parameters specified in \a query.
*/
-QPlaceReviewReply *QPlaceManager::getReviews(const QPlace &place, const QPlaceQuery &query) const
+QPlaceReviewReply *QPlaceManager::getReviews(const QGeoPlace &place, const QPlaceQuery &query) const
{
return d->engine->getReviews(place, query);
}
@@ -170,7 +170,7 @@ QPlaceManager::VisibilityScopes QPlaceManager::supportedSearchVisibilityScopes()
/*!
Provides recommendation based on a given \a place.
*/
-QPlaceSearchReply *QPlaceManager::recommendations(const QPlace &place, const QPlaceSearchQuery &query) const
+QPlaceSearchReply *QPlaceManager::recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query) const
{
return d->engine->recommendations(place, query);
}
@@ -210,7 +210,7 @@ QPlaceManager::ConnectivityModes QPlaceManager::supportedConnectivityModes() con
/*!
Saves a \a place at the given \a scope.
*/
-QPlaceReply *QPlaceManager::savePlace(QPlace *place, VisibilityScope scope)
+QPlaceReply *QPlaceManager::savePlace(QGeoPlace *place, VisibilityScope scope)
{
return d->engine->savePlace(place, scope);
}
diff --git a/src/location/places/qplacemanager.h b/src/location/places/qplacemanager.h
index 3c14dcac..fa00a150 100644
--- a/src/location/places/qplacemanager.h
+++ b/src/location/places/qplacemanager.h
@@ -105,16 +105,16 @@ public:
QString managerName() const;
QPlaceDetailsReply *getPlaceDetails(const QString &placeId) const;
- QPlaceReply *postRating(const QPlace &place, qreal value);
+ QPlaceReply *postRating(const QGeoPlace &place, qreal value);
- QPlaceReviewReply *getReviews(const QPlace &place, const QPlaceQuery &query) const;
+ QPlaceReviewReply *getReviews(const QGeoPlace &place, const QPlaceQuery &query) const;
- QPlaceMediaReply *getMedia(const QPlace &place, const QPlaceQuery &query) const;
+ QPlaceMediaReply *getMedia(const QGeoPlace &place, const QPlaceQuery &query) const;
QPlaceSearchReply *searchForPlaces(const QPlaceSearchQuery &query, VisibilityScope scope) const;
VisibilityScopes supportedSearchVisibilityScopes() const;
- QPlaceSearchReply *recommendations(const QPlace &place, const QPlaceSearchQuery &query) const;
+ QPlaceSearchReply *recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query) const;
QPlaceTextPredictionReply *textPredictions(const QPlaceSearchQuery &query) const;
@@ -122,10 +122,10 @@ public:
void setConnectivityMode(ConnectivityModes connectivityMode);
ConnectivityModes supportedConnectivityModes() const;
- QPlaceReply *savePlace(QPlace *place, VisibilityScope scope);
+ QPlaceReply *savePlace(QGeoPlace *place, VisibilityScope scope);
VisibilityScopes supportedSaveVisibilityScopes();
- QPlaceReply *removePlace(const QPlace &place);
+ QPlaceReply *removePlace(const QGeoPlace &place);
QPlaceReply *initializeCategories();
QList<QPlaceCategory> categories() const;
diff --git a/src/location/places/qplacemanagerengine.h b/src/location/places/qplacemanagerengine.h
index 91373a28..b2ed8bf9 100644
--- a/src/location/places/qplacemanagerengine.h
+++ b/src/location/places/qplacemanagerengine.h
@@ -58,26 +58,26 @@ public:
virtual QPlaceDetailsReply *getPlaceDetails(const QString &placeId) = 0;
- virtual QPlaceMediaReply *getMedia(const QPlace &place, const QPlaceQuery &query) = 0;
+ virtual QPlaceMediaReply *getMedia(const QGeoPlace &place, const QPlaceQuery &query) = 0;
- virtual QPlaceReply *postRating(const QPlace &place, qreal value) = 0;
+ virtual QPlaceReply *postRating(const QGeoPlace &place, qreal value) = 0;
- virtual QPlaceReviewReply *getReviews(const QPlace &place, const QPlaceQuery &query) = 0;
+ virtual QPlaceReviewReply *getReviews(const QGeoPlace &place, const QPlaceQuery &query) = 0;
virtual QPlaceSearchReply *searchForPlaces(const QPlaceSearchQuery &query, QPlaceManager::VisibilityScope scope) = 0;
virtual QPlaceManager::VisibilityScopes supportedSearchVisibilityScopes() const = 0;
- virtual QPlaceSearchReply *recommendations(const QPlace &place, const QPlaceSearchQuery &query) = 0;
+ virtual QPlaceSearchReply *recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query) = 0;
virtual QPlaceTextPredictionReply *textPredictions(const QPlaceSearchQuery &query) = 0;
virtual QPlaceManager::ConnectivityModes connectivityMode() const = 0;
virtual void setConnectivityMode(QPlaceManager::ConnectivityModes mode) = 0;
virtual QPlaceManager::ConnectivityModes supportedConnectivityModes() const = 0;
- virtual QPlaceReply *savePlace(QPlace *place, QPlaceManager::VisibilityScope scope) = 0;
+ virtual QPlaceReply *savePlace(QGeoPlace *place, QPlaceManager::VisibilityScope scope) = 0;
virtual QPlaceManager::VisibilityScopes supportedSaveVisibilityScopes() const = 0;
- virtual QPlaceReply *removePlace(const QPlace &place) = 0;
+ virtual QPlaceReply *removePlace(const QGeoPlace &place) = 0;
virtual QPlaceReply *initializeCategories() = 0;
virtual QList<QPlaceCategory> categories() const = 0;
diff --git a/src/location/places/qplacemediareply.cpp b/src/location/places/qplacemediareply.cpp
index a570bd49..eb1df567 100644
--- a/src/location/places/qplacemediareply.cpp
+++ b/src/location/places/qplacemediareply.cpp
@@ -43,8 +43,6 @@
#include "qplacereply_p.h"
#include "qplacepaginationlist.h"
-#include "qplace.h"
-
QTM_BEGIN_NAMESPACE
class QPlaceMediaReplyPrivate : public QPlaceReplyPrivate
{
diff --git a/src/location/places/qplacereply.cpp b/src/location/places/qplacereply.cpp
index e7f5b8d6..6a2f4d0e 100644
--- a/src/location/places/qplacereply.cpp
+++ b/src/location/places/qplacereply.cpp
@@ -42,9 +42,6 @@
#include "qplacereply.h"
#include "qplacereply_p.h"
-#include "qplace.h"
-#include "qplacesearchresult.h"
-
QTM_USE_NAMESPACE
/*!
diff --git a/src/location/places/qplacereviewreply.cpp b/src/location/places/qplacereviewreply.cpp
index 7509a3d3..19315996 100644
--- a/src/location/places/qplacereviewreply.cpp
+++ b/src/location/places/qplacereviewreply.cpp
@@ -42,7 +42,7 @@
#include "qplacereviewreply.h"
#include "qplacereply_p.h"
-#include "qplace.h"
+#include "qgeoplace.h"
QTM_BEGIN_NAMESPACE
class QPlaceReviewReplyPrivate : public QPlaceReplyPrivate
diff --git a/src/location/places/qplacesearchresult.cpp b/src/location/places/qplacesearchresult.cpp
index 919403fd..46bb8534 100644
--- a/src/location/places/qplacesearchresult.cpp
+++ b/src/location/places/qplacesearchresult.cpp
@@ -230,7 +230,7 @@ void QPlaceSearchResult::setType(const QPlaceSearchResult::SearchResultType &typ
/*!
Returns the place.
*/
-QPlace QPlaceSearchResult::place() const
+QGeoPlace QPlaceSearchResult::place() const
{
return d->place;
}
@@ -238,7 +238,7 @@ QPlace QPlaceSearchResult::place() const
/*!
Sets the \a place.
*/
-void QPlaceSearchResult::setPlace(const QPlace &place)
+void QPlaceSearchResult::setPlace(const QGeoPlace &place)
{
d->place = place;
}
diff --git a/src/location/places/qplacesearchresult.h b/src/location/places/qplacesearchresult.h
index 17dce2be..0af4a3cf 100644
--- a/src/location/places/qplacesearchresult.h
+++ b/src/location/places/qplacesearchresult.h
@@ -47,7 +47,7 @@
#include <QSharedDataPointer>
#include <QVariant>
#include <QString>
-#include "qplace.h"
+#include "qgeoplace.h"
QTM_BEGIN_NAMESPACE
@@ -98,8 +98,8 @@ public:
SearchResultType type() const;
void setType(const SearchResultType &type);
- QPlace place() const;
- void setPlace(const QPlace &place);
+ QGeoPlace place() const;
+ void setPlace(const QGeoPlace &place);
QString didYouMeanSuggestion() const;
void setDidYouMeanSuggestion(const QString &didYouMeanSuggestion);
diff --git a/src/location/places/qplacesearchresult_p.h b/src/location/places/qplacesearchresult_p.h
index 3f6ab6b3..20ac4fad 100644
--- a/src/location/places/qplacesearchresult_p.h
+++ b/src/location/places/qplacesearchresult_p.h
@@ -64,7 +64,7 @@ public:
QPlaceSearchResult::LocationMatchType matchType;
QVariantHash additionalData;
QPlaceSearchResult::SearchResultType type;
- QPlace place;
+ QGeoPlace place;
QString dymString;
};
diff --git a/src/location/qgeoplace.cpp b/src/location/qgeoplace.cpp
index 5517029e..374335e4 100644
--- a/src/location/qgeoplace.cpp
+++ b/src/location/qgeoplace.cpp
@@ -223,6 +223,367 @@ void QGeoPlace::setAddress(const QGeoAddress &address)
d->address = address;
}
+/*!
+ Returns additional data.
+*/
+QVariantHash QGeoPlace::additionalData() const
+{
+ Q_D(const QGeoPlace);
+ return d->additionalData;
+}
+
+/*!
+ Sets additional data.
+*/
+void QGeoPlace::setAdditionalData(const QVariantHash &data)
+{
+ Q_D(QGeoPlace);
+ d->additionalData = data;
+}
+
+/*!
+ Returns alternative names.
+*/
+QList<QPlaceAlternativeValue> QGeoPlace::alternativeNames() const
+{
+ Q_D(const QGeoPlace);
+ return d->alternativeNames;
+}
+
+/*!
+ Sets alternative names.
+*/
+void QGeoPlace::setAlternativeNames(const QList<QPlaceAlternativeValue> &alternativeNames)
+{
+ Q_D(QGeoPlace);
+ d->alternativeNames = alternativeNames;
+}
+
+/*!
+ Returns place score.
+*/
+double QGeoPlace::placeScore() const
+{
+ Q_D(const QGeoPlace);
+ return d->placeScore;
+}
+
+/*!
+ Sets place score.
+*/
+void QGeoPlace::setPlaceScore(const double &data)
+{
+ Q_D(QGeoPlace);
+ d->placeScore = data;
+}
+
+/*!
+ Returns business info.
+*/
+QPlaceBusinessInformation QGeoPlace::businessInformation() const
+{
+ Q_D(const QGeoPlace);
+ return d->businessInfo;
+}
+
+/*!
+ Sets business info.
+*/
+void QGeoPlace::setBusinessInformation(const QPlaceBusinessInformation &business)
+{
+ Q_D(QGeoPlace);
+ d->businessInfo = business;
+}
+
+/*!
+ Returns categories.
+*/
+QList<QPlaceCategory> QGeoPlace::categories() const
+{
+ Q_D(const QGeoPlace);
+ return d->categories;
+}
+
+/*!
+ Sets categories.
+*/
+void QGeoPlace::setCategories(const QList<QPlaceCategory> &categories)
+{
+ Q_D(QGeoPlace);
+ d->categories = categories;
+}
+
+/*!
+ Returns contacts.
+*/
+QList<QPlaceContact> QGeoPlace::contacts() const
+{
+ Q_D(const QGeoPlace);
+ return d->contacts;
+}
+
+/*!
+ Sets contacts.
+*/
+void QGeoPlace::setContacts(const QList<QPlaceContact> &contacts)
+{
+ Q_D(QGeoPlace);
+ d->contacts = contacts;
+}
+
+/*!
+ Returns descriptions.
+*/
+QList<QPlaceDescription> QGeoPlace::descriptions() const
+{
+ Q_D(const QGeoPlace);
+ return d->descriptions;
+}
+
+/*!
+ Sets descriptions.
+*/
+void QGeoPlace::setDescriptions(const QList<QPlaceDescription> &descriptions)
+{
+ Q_D(QGeoPlace);
+ d->descriptions = descriptions;
+}
+
+/*!
+ Returns location.
+*/
+QPlaceLocation QGeoPlace::location() const
+{
+ Q_D(const QGeoPlace);
+ return d->location;
+}
+
+/*!
+ Sets location.
+*/
+void QGeoPlace::setLocation(const QPlaceLocation &location)
+{
+ Q_D(QGeoPlace);
+ d->location = location;
+}
+
+/*!
+ Returns alternative locations.
+*/
+QList<QPlaceLocation> QGeoPlace::alternativeLocations() const
+{
+ Q_D(const QGeoPlace);
+ return d->alternativeLocations;
+}
+
+/*!
+ Sets alternative locations.
+*/
+void QGeoPlace::setAlternativeLocations(const QList<QPlaceLocation> &locations)
+{
+ Q_D(QGeoPlace);
+ d->alternativeLocations = locations;
+}
+
+/*!
+ Returns rating.
+*/
+QPlaceRating QGeoPlace::rating() const
+{
+ Q_D(const QGeoPlace);
+ return d->rating;
+}
+
+/*!
+ Sets rating.
+*/
+void QGeoPlace::setRating(const QPlaceRating &rating)
+{
+ Q_D(QGeoPlace);
+ d->rating = rating;
+}
+
+/*!
+ Returns suppliers.
+*/
+QList<QPlaceSupplier> QGeoPlace::suppliers() const
+{
+ Q_D(const QGeoPlace);
+ return d->suppliers;
+}
+
+/*!
+ Sets suppliers.
+*/
+void QGeoPlace::setSuppliers(const QList<QPlaceSupplier> &data)
+{
+ Q_D(QGeoPlace);
+ d->suppliers = data;
+}
+
+/*!
+ Returns feeds list.
+*/
+QStringList QGeoPlace::feeds() const
+{
+ Q_D(const QGeoPlace);
+ return d->feeds;
+}
+
+/*!
+ Sets feeds list.
+*/
+void QGeoPlace::setFeeds(const QStringList &feeds)
+{
+ Q_D(QGeoPlace);
+ d->feeds = feeds;
+}
+
+/*!
+ Returns list with media objects connected to this place.
+*/
+QPlacePaginationList<QPlaceMediaObject> QGeoPlace::media() const
+{
+ Q_D(const QGeoPlace);
+ return d->media;
+}
+
+/*!
+ Sets list with media objects connected to this place.
+*/
+void QGeoPlace::setMedia(const QPlacePaginationList<QPlaceMediaObject> &media)
+{
+ Q_D(QGeoPlace);
+ d->media = media;
+}
+
+/*!
+ Returns media count.
+*/
+int QGeoPlace::mediaCount() const
+{
+ Q_D(const QGeoPlace);
+ return d->mediaCount;
+}
+
+/*!
+ Sets media count.
+*/
+void QGeoPlace::setMediaCount(const int &count)
+{
+ Q_D(QGeoPlace);
+ d->mediaCount = count;
+}
+
+/*!
+ Returns name.
+*/
+QString QGeoPlace::name() const
+{
+ Q_D(const QGeoPlace);
+ return d->name;
+}
+
+/*!
+ Sets name.
+*/
+void QGeoPlace::setName(const QString &name)
+{
+ Q_D(QGeoPlace);
+ d->name = name;
+}
+
+/*!
+ Returns placeId.
+*/
+QString QGeoPlace::placeId() const
+{
+ Q_D(const QGeoPlace);
+ return d->placeId;
+}
+
+/*!
+ Sets placeId.
+*/
+void QGeoPlace::setPlaceId(const QString &placeId)
+{
+ Q_D(QGeoPlace);
+ d->placeId = placeId;
+}
+
+/*!
+ Returns reviews.
+*/
+QPlacePaginationList<QPlaceReview> QGeoPlace::reviews() const
+{
+ Q_D(const QGeoPlace);
+ return d->reviews;
+}
+
+/*!
+ Sets reviews.
+*/
+void QGeoPlace::setReviews(const QPlacePaginationList<QPlaceReview> &reviews)
+{
+ Q_D(QGeoPlace);
+ d->reviews = reviews;
+}
+
+/*!
+ Returns review count.
+*/
+int QGeoPlace::reviewCount() const
+{
+ Q_D(const QGeoPlace);
+ return d->reviewCount;
+}
+
+/*!
+ Sets review count.
+*/
+void QGeoPlace::setReviewCount(const int &count)
+{
+ Q_D(QGeoPlace);
+ d->reviewCount = count;
+}
+
+/*!
+ Returns short description.
+*/
+QString QGeoPlace::shortDescription() const
+{
+ Q_D(const QGeoPlace);
+ return d->shortDescription;
+}
+
+/*!
+ Sets short description.
+*/
+void QGeoPlace::setShortDescription(const QString &description)
+{
+ Q_D(QGeoPlace);
+ d->shortDescription = description;
+}
+
+/*!
+ Returns list of tags.
+*/
+QStringList QGeoPlace::tags() const
+{
+ Q_D(const QGeoPlace);
+ return d->tags;
+}
+
+/*!
+ Sets tags.
+*/
+void QGeoPlace::setTags(const QStringList &tags)
+{
+ Q_D(QGeoPlace);
+ d->tags = tags;
+}
+
+
/*******************************************************************************
*******************************************************************************/
@@ -235,7 +596,27 @@ QGeoPlacePrivate::QGeoPlacePrivate(const QGeoPlacePrivate &other)
type(other.type),
viewport(other.viewport),
coordinate(other.coordinate),
- address(other.address) {}
+ address(other.address),
+ additionalData(other.additionalData),
+ placeScore(other.placeScore),
+ businessInfo(other.businessInfo),
+ categories(other.categories),
+ contacts(other.contacts),
+ descriptions(other.descriptions),
+ location(other.location),
+ alternativeLocations(other.alternativeLocations),
+ rating(other.rating),
+ suppliers(other.suppliers),
+ feeds(other.feeds),
+ media(other.media),
+ name(other.name),
+ placeId(other.placeId),
+ reviews(other.reviews),
+ reviewCount(other.reviewCount),
+ shortDescription(other.shortDescription),
+ tags(other.tags)
+{
+}
QGeoPlacePrivate::~QGeoPlacePrivate() {}
@@ -259,10 +640,31 @@ bool QGeoPlacePrivate::operator== (const QGeoPlacePrivate &other) const
qDebug() << "address:" << (address == other.address);
#endif
- return ((type == other.type)
- && (viewport == other.viewport)
- && (coordinate == other.coordinate)
- && (address == other.address));
+ return (type == other.type
+ && viewport == other.viewport
+ && coordinate == other.coordinate
+ && address == other.address
+ && additionalData == other.additionalData
+ && alternativeNames == other.alternativeNames
+ && placeScore == other.placeScore
+ && businessInfo == other.businessInfo
+ && categories == other.categories
+ && contacts == other.contacts
+ && descriptions == other.descriptions
+ && location == other.location
+ && alternativeLocations == other.alternativeLocations
+ && rating == other.rating
+ && suppliers == other.suppliers
+ && feeds == other.feeds
+ && media == other.media
+ && mediaCount == other.mediaCount
+ && name == other.name
+ && placeId == other.placeId
+ && reviews == other.reviews
+ && reviewCount == other.reviewCount
+ && shortDescription == other.shortDescription
+ && tags == other.tags
+ );
}
QTM_END_NAMESPACE
diff --git a/src/location/qgeoplace.h b/src/location/qgeoplace.h
index 5ebc6f1a..655fcbbd 100644
--- a/src/location/qgeoplace.h
+++ b/src/location/qgeoplace.h
@@ -44,10 +44,21 @@
#include "qmobilityglobal.h"
#include <QSharedDataPointer>
+#include <QVariant>
#include "qgeoaddress.h"
#include "qgeoboundingbox.h"
#include "qgeocoordinate.h"
+#include "qplacealternativevalue.h"
+#include "qplacebusinessinformation.h"
+#include "qplacecategory.h"
+#include "qplacecontact.h"
+#include "qplacedescription.h"
+#include "qplacelocation.h"
+#include "qplacerating.h"
+#include "qplacepaginationlist.h"
+#include "qplacemediaobject.h"
+#include "qplacereview.h"
class QString;
@@ -80,9 +91,49 @@ public:
QGeoAddress address() const;
void setAddress(const QGeoAddress &address);
+ QVariantHash additionalData() const;
+ void setAdditionalData(const QVariantHash &data);
+ QList<QPlaceAlternativeValue> alternativeNames() const;
+ void setAlternativeNames(const QList<QPlaceAlternativeValue> &alternativeNames);
+ double placeScore() const;
+ void setPlaceScore(const double &data);
+ QPlaceBusinessInformation businessInformation() const;
+ void setBusinessInformation(const QPlaceBusinessInformation &business);
+ QList<QPlaceCategory> categories() const;
+ void setCategories(const QList<QPlaceCategory> &categories);
+ QList<QPlaceContact> contacts() const;
+ void setContacts(const QList<QPlaceContact> &contacts);
+ QList<QPlaceDescription> descriptions() const;
+ void setDescriptions(const QList<QPlaceDescription> &descriptions);
+ QPlaceLocation location() const;
+ void setLocation(const QPlaceLocation &location);
+ QList<QPlaceLocation> alternativeLocations() const;
+ void setAlternativeLocations(const QList<QPlaceLocation> &locations);
+ QPlaceRating rating() const;
+ void setRating(const QPlaceRating &rating);
+ QList<QPlaceSupplier> suppliers() const;
+ void setSuppliers(const QList<QPlaceSupplier> &data);
+ QStringList feeds() const;
+ void setFeeds(const QStringList &feeds);
+ QPlacePaginationList<QPlaceMediaObject> media() const;
+ void setMedia(const QPlacePaginationList<QPlaceMediaObject> &media);
+ int mediaCount() const;
+ void setMediaCount(const int &count);
+ QString name() const;
+ void setName(const QString &name);
+ QString placeId() const;
+ void setPlaceId(const QString &placeId);
+ QPlacePaginationList<QPlaceReview> reviews() const;
+ void setReviews(const QPlacePaginationList<QPlaceReview> &reviews);
+ int reviewCount() const;
+ void setReviewCount(const int &count);
+ QString shortDescription() const;
+ void setShortDescription(const QString &description);
+ QStringList tags() const;
+ void setTags(const QStringList &tags);
+
protected:
QGeoPlace(QGeoPlacePrivate *dd);
-
QSharedDataPointer<QGeoPlacePrivate> d_ptr;
private:
diff --git a/src/location/qgeoplace_p.h b/src/location/qgeoplace_p.h
index 7ee33e84..614a1eb7 100644
--- a/src/location/qgeoplace_p.h
+++ b/src/location/qgeoplace_p.h
@@ -84,6 +84,27 @@ public:
QGeoBoundingBox viewport;
QGeoCoordinate coordinate;
QGeoAddress address;
+
+ QVariantHash additionalData;
+ QList<QPlaceAlternativeValue> alternativeNames;
+ double placeScore;
+ QPlaceBusinessInformation businessInfo;
+ QList<QPlaceCategory> categories;
+ QList<QPlaceContact> contacts;
+ QList<QPlaceDescription> descriptions;
+ QPlaceLocation location;
+ QList<QPlaceLocation> alternativeLocations;
+ QPlaceRating rating;
+ QList<QPlaceSupplier> suppliers;
+ QStringList feeds;
+ QPlacePaginationList<QPlaceMediaObject> media;
+ int mediaCount;
+ QString name;
+ QString placeId;
+ QPlacePaginationList<QPlaceReview> reviews;
+ int reviewCount;
+ QString shortDescription;
+ QStringList tags;
};
QTM_END_NAMESPACE
diff --git a/src/plugins/places/nokia/qplacejsondetailsparser.cpp b/src/plugins/places/nokia/qplacejsondetailsparser.cpp
index b81ca3fa..a0f69a1b 100644
--- a/src/plugins/places/nokia/qplacejsondetailsparser.cpp
+++ b/src/plugins/places/nokia/qplacejsondetailsparser.cpp
@@ -52,9 +52,9 @@
#include <QtScript/QScriptValue>
#include <QtScript/QScriptValueIterator>
-#include <qgeocoordinate.h>
#include <qgeoaddress.h>
-#include <qplace.h>
+#include <qgeocoordinate.h>
+#include <qgeoplace.h>
#include <qplacecontact.h>
#include <qplacecategory.h>
#include <qplacedescription.h>
@@ -199,16 +199,16 @@ QPlaceJSonDetailsParser::~QPlaceJSonDetailsParser()
{
}
-QPlace QPlaceJSonDetailsParser::buildPlace(const QScriptValue &placeValue)
+QGeoPlace QPlaceJSonDetailsParser::buildPlace(const QScriptValue &placeValue)
{
- QPlace newPlace;
+ QGeoPlace newPlace;
if (placeValue.isValid()) {
buildPlace(placeValue, &newPlace);
}
return newPlace;
}
-QPlace QPlaceJSonDetailsParser::result()
+QGeoPlace QPlaceJSonDetailsParser::result()
{
return place;
}
@@ -228,7 +228,7 @@ void QPlaceJSonDetailsParser::processData(const QString &data)
}
}
-void QPlaceJSonDetailsParser::buildPlace(const QScriptValue &placeValue, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::buildPlace(const QScriptValue &placeValue, QGeoPlace*targetPlace)
{
if (placeValue.isValid()) {
QScriptValue value = placeValue.property(place_id_element);
@@ -271,7 +271,7 @@ void QPlaceJSonDetailsParser::buildPlace(const QScriptValue &placeValue, QPlace
}
}
-void QPlaceJSonDetailsParser::processMainProvider(const QScriptValue &placeValue, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processMainProvider(const QScriptValue &placeValue, QGeoPlace*targetPlace)
{
QPlaceSupplier sup;
QScriptValue value = placeValue.property(place_provider);
@@ -290,7 +290,7 @@ void QPlaceJSonDetailsParser::processMainProvider(const QScriptValue &placeValue
targetPlace->setSuppliers(list);
}
-void QPlaceJSonDetailsParser::processContacts(const QScriptValue &contactsValue, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processContacts(const QScriptValue &contactsValue, QGeoPlace*targetPlace)
{
QList<QPlaceContact> contacts;
QScriptValueIterator it(contactsValue);
@@ -318,12 +318,12 @@ void QPlaceJSonDetailsParser::processContacts(const QScriptValue &contactsValue,
targetPlace->setContacts(contacts);
}
-void QPlaceJSonDetailsParser::processCategories(const QScriptValue &categories, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processCategories(const QScriptValue &categories, QGeoPlace*targetPlace)
{
targetPlace->setCategories(QPlaceJSonCategoriesParser::processCategories(categories));
}
-void QPlaceJSonDetailsParser::processRatings(const QScriptValue &ratings, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processRatings(const QScriptValue &ratings, QGeoPlace*targetPlace)
{
QPlaceRating *rating = NULL;
QScriptValue value = ratings.property(place_rating_element);
@@ -420,7 +420,7 @@ void QPlaceJSonDetailsParser::processAddress(const QScriptValue &address, QPlace
location->setAddress(newAddress);
}
-void QPlaceJSonDetailsParser::processLocations(const QScriptValue &locations, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processLocations(const QScriptValue &locations, QGeoPlace*targetPlace)
{
if (locations.isArray()) {
QList<QPlaceLocation> list;
@@ -477,7 +477,7 @@ QPlaceLocation QPlaceJSonDetailsParser::processLocation(const QScriptValue &loca
return newLocation;
}
-void QPlaceJSonDetailsParser::processTags(const QScriptValue &tags, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processTags(const QScriptValue &tags, QGeoPlace*targetPlace)
{
QStringList newTags;
if (tags.isValid()) {
@@ -500,7 +500,7 @@ void QPlaceJSonDetailsParser::processTags(const QScriptValue &tags, QPlace *targ
targetPlace->setTags(newTags);
}
-void QPlaceJSonDetailsParser::processNames(const QScriptValue &names, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processNames(const QScriptValue &names, QGeoPlace*targetPlace)
{
QScriptValue value = names.property(place_alternativenames_element);
if (value.isValid()) {
@@ -558,7 +558,7 @@ QPlaceAlternativeValue *QPlaceJSonDetailsParser::processName(const QScriptValue
return name;
}
-void QPlaceJSonDetailsParser::processPremiumContents(const QScriptValue &premiumContent, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processPremiumContents(const QScriptValue &premiumContent, QGeoPlace*targetPlace)
{
QScriptValue value = premiumContent.property(place_premiumcontent_version_element);
if (value.isValid()) {
@@ -577,7 +577,7 @@ void QPlaceJSonDetailsParser::processPremiumContents(const QScriptValue &premium
}
}
-void QPlaceJSonDetailsParser::processPremiumVersion(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processPremiumVersion(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_premiumcontent_content_element);
if (value.isValid()) {
@@ -596,7 +596,7 @@ void QPlaceJSonDetailsParser::processPremiumVersion(const QScriptValue &content,
}
}
-void QPlaceJSonDetailsParser::processPremiumContent(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processPremiumContent(const QScriptValue &content, QGeoPlace*targetPlace)
{
QString name, id, iconURL;
QScriptValue value = content.property(place_premiumcontent_content_providername_element);
@@ -624,7 +624,7 @@ void QPlaceJSonDetailsParser::processPremiumContent(const QScriptValue &content,
void QPlaceJSonDetailsParser::processPremiumContentDescription(const QScriptValue &content,
const QPlaceSupplier &supplier,
- QPlace *targetPlace)
+ QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_premiumcontent_content_desc_element);
QPlaceDescription desc;
@@ -660,7 +660,7 @@ void QPlaceJSonDetailsParser::processPremiumContentDescription(const QScriptValu
void QPlaceJSonDetailsParser::processPremiumContentMediaObjects(const QScriptValue &content,
const QPlaceSupplier &supplier,
- QPlace *targetPlace)
+ QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_premiumcontent_content_media_element);
if (value.isValid()) {
@@ -711,7 +711,7 @@ QPlaceMediaObject *QPlaceJSonDetailsParser::processPremiumContentMediaObject(con
return obj;
}
-void QPlaceJSonDetailsParser::processAdContent(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContent(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_descriptions_element);
if (value.isValid()) {
@@ -735,7 +735,7 @@ void QPlaceJSonDetailsParser::processAdContent(const QScriptValue &content, QPla
}
}
-void QPlaceJSonDetailsParser::processAdContentPackages(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentPackages(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_package_element);
if (value.isValid()) {
@@ -753,7 +753,7 @@ void QPlaceJSonDetailsParser::processAdContentPackages(const QScriptValue &conte
}
}
-void QPlaceJSonDetailsParser::processAdContentDescriptions(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentDescriptions(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_description_element);
if (value.isValid()) {
@@ -801,7 +801,7 @@ QPlaceDescription *QPlaceJSonDetailsParser::processAdContentDescription(const QS
return description;
}
-void QPlaceJSonDetailsParser::processAdContentMediaObjects(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentMediaObjects(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_media_element);
if (value.isValid()) {
@@ -857,7 +857,7 @@ QPlaceMediaObject *QPlaceJSonDetailsParser::processAdContentMediaObject(const QS
return obj;
}
-void QPlaceJSonDetailsParser::processAdContentPaymentMethods(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentPaymentMethods(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_paymentmethod_element);
if (value.isValid()) {
@@ -898,7 +898,7 @@ QString QPlaceJSonDetailsParser::processAdContentPaymentMethod(const QScriptValu
return obj;
}
-void QPlaceJSonDetailsParser::processAdContentBusinessHours(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentBusinessHours(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_hours_annualclosingsnotes_element);
if (value.isValid()) {
@@ -914,7 +914,7 @@ void QPlaceJSonDetailsParser::processAdContentBusinessHours(const QScriptValue &
}
}
-void QPlaceJSonDetailsParser::processAdContentClosingsNotes(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentClosingsNotes(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_hours_annualclosingsnote_element);
if (value.isValid()) {
@@ -955,7 +955,7 @@ QString QPlaceJSonDetailsParser::processAdContentClosingsNote(const QScriptValue
return ret;
}
-void QPlaceJSonDetailsParser::processAdContentOpeningHours(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentOpeningHours(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_hours_open_hours_element);
if (value.isValid()) {
@@ -1024,7 +1024,7 @@ QPlaceWeekdayHours *QPlaceJSonDetailsParser::processAdContentOpeningHoursElement
return openH;
}
-void QPlaceJSonDetailsParser::processAdContentOpeningNotes(const QScriptValue &content, QPlace *targetPlace)
+void QPlaceJSonDetailsParser::processAdContentOpeningNotes(const QScriptValue &content, QGeoPlace*targetPlace)
{
QScriptValue value = content.property(place_adcontent_hours_openingnote_element);
if (value.isValid()) {
diff --git a/src/plugins/places/nokia/qplacejsondetailsparser.h b/src/plugins/places/nokia/qplacejsondetailsparser.h
index ca5b0488..313300b5 100644
--- a/src/plugins/places/nokia/qplacejsondetailsparser.h
+++ b/src/plugins/places/nokia/qplacejsondetailsparser.h
@@ -52,7 +52,7 @@
#include <QObject>
#include <QList>
-#include <qplace.h>
+#include <qgeoplace.h>
class QScriptEngine;
class QScriptValue;
@@ -71,8 +71,8 @@ public:
explicit QPlaceJSonDetailsParser(QObject *parent = 0);
virtual ~QPlaceJSonDetailsParser();
- static QPlace buildPlace(const QScriptValue &place);
- QPlace result();
+ static QGeoPlace buildPlace(const QScriptValue &place);
+ QGeoPlace result();
signals:
void finished(const QPlaceJSonDetailsParser::Error &error, const QString &errorMessage);
@@ -81,48 +81,48 @@ public slots:
void processData(const QString &data);
private:
- static void buildPlace(const QScriptValue &place, QPlace *targetPlace);
- static void processMainProvider(const QScriptValue &place, QPlace *targetPlace);
- static void processContacts(const QScriptValue &contacts, QPlace *targetPlace);
- static void processCategories(const QScriptValue &categories, QPlace *targetPlace);
+ static void buildPlace(const QScriptValue &place, QGeoPlace *targetPlace);
+ static void processMainProvider(const QScriptValue &place, QGeoPlace *targetPlace);
+ static void processContacts(const QScriptValue &contacts, QGeoPlace *targetPlace);
+ static void processCategories(const QScriptValue &categories, QGeoPlace *targetPlace);
static QPlaceCategory processCategory(const QScriptValue &category);
- static void processRatings(const QScriptValue &ratings, QPlace *targetPlace);
+ static void processRatings(const QScriptValue &ratings, QGeoPlace *targetPlace);
static QPlaceRating *processRating(const QScriptValue &rating);
static void processAddress(const QScriptValue &address, QPlaceLocation *location);
- static void processLocations(const QScriptValue &locations, QPlace *targetPlace);
+ static void processLocations(const QScriptValue &locations, QGeoPlace *targetPlace);
static QPlaceLocation processLocation(const QScriptValue &location);
- static void processTags(const QScriptValue &locations, QPlace *targetPlace);
- static void processNames(const QScriptValue &locations, QPlace *targetPlace);
+ static void processTags(const QScriptValue &locations, QGeoPlace *targetPlace);
+ static void processNames(const QScriptValue &locations, QGeoPlace *targetPlace);
static QPlaceAlternativeValue *processName(const QScriptValue &nameValue);
- static void processPremiumContents(const QScriptValue &content, QPlace *targetPlace);
- static void processPremiumVersion(const QScriptValue &content, QPlace *targetPlace);
- static void processPremiumContent(const QScriptValue &content, QPlace *targetPlace);
+ static void processPremiumContents(const QScriptValue &content, QGeoPlace *targetPlace);
+ static void processPremiumVersion(const QScriptValue &content, QGeoPlace *targetPlace);
+ static void processPremiumContent(const QScriptValue &content, QGeoPlace *targetPlace);
static void processPremiumContentDescription(const QScriptValue &content,
const QPlaceSupplier &supplier,
- QPlace *targetPlace);
+ QGeoPlace *targetPlace);
static void processPremiumContentMediaObjects(const QScriptValue &content,
const QPlaceSupplier &supplier,
- QPlace *targetPlace);
+ QGeoPlace *targetPlace);
static QPlaceMediaObject *processPremiumContentMediaObject(const QScriptValue &content);
- static void processAdContent(const QScriptValue &content, QPlace *targetPlace);
- static void processAdContentPackages(const QScriptValue &content, QPlace *targetPlace);
- static void processAdContentDescriptions(const QScriptValue &content, QPlace *targetPlace);
+ static void processAdContent(const QScriptValue &content, QGeoPlace *targetPlace);
+ static void processAdContentPackages(const QScriptValue &content, QGeoPlace *targetPlace);
+ static void processAdContentDescriptions(const QScriptValue &content, QGeoPlace *targetPlace);
static QPlaceDescription *processAdContentDescription(const QScriptValue &content);
- static void processAdContentMediaObjects(const QScriptValue &content, QPlace *targetPlace);
+ static void processAdContentMediaObjects(const QScriptValue &content, QGeoPlace *targetPlace);
static QPlaceMediaObject *processAdContentMediaObject(const QScriptValue &content);
- static void processAdContentPaymentMethods(const QScriptValue &content, QPlace *targetPlace);
+ static void processAdContentPaymentMethods(const QScriptValue &content, QGeoPlace *targetPlace);
static QString processAdContentPaymentMethod(const QScriptValue &content);
- static void processAdContentBusinessHours(const QScriptValue &content, QPlace *targetPlace);
- static void processAdContentClosingsNotes(const QScriptValue &content, QPlace *targetPlace);
+ static void processAdContentBusinessHours(const QScriptValue &content, QGeoPlace *targetPlace);
+ static void processAdContentClosingsNotes(const QScriptValue &content, QGeoPlace *targetPlace);
static QString processAdContentClosingsNote(const QScriptValue &content);
- static void processAdContentOpeningHours(const QScriptValue &content, QPlace *targetPlace);
+ static void processAdContentOpeningHours(const QScriptValue &content, QGeoPlace *targetPlace);
static QPlaceWeekdayHours *processAdContentOpeningHoursElement(const QScriptValue &content);
- static void processAdContentOpeningNotes(const QScriptValue &content, QPlace *targetPlace);
+ static void processAdContentOpeningNotes(const QScriptValue &content, QGeoPlace *targetPlace);
static QString processAdContentOpeningNote(const QScriptValue &content);
private:
QScriptEngine *engine;
- QPlace place;
+ QGeoPlace place;
};
QTM_END_NAMESPACE
diff --git a/src/plugins/places/nokia/qplacejsonrecommendationparser.cpp b/src/plugins/places/nokia/qplacejsonrecommendationparser.cpp
index 84603d24..edac29d8 100644
--- a/src/plugins/places/nokia/qplacejsonrecommendationparser.cpp
+++ b/src/plugins/places/nokia/qplacejsonrecommendationparser.cpp
@@ -53,7 +53,7 @@
#include <QtScript/QScriptValueIterator>
#include "qplacejsondetailsparser.h"
-#include <qplace.h>
+#include <qgeoplace.h>
#if defined(QT_PLACES_LOGGING)
#include <QDebug>
@@ -123,7 +123,7 @@ void QPlaceJSonRecommendationParser::processResultElement(const QScriptValue &va
}
QScriptValue place = value.property(recommendations_place_element);
if (place.isValid()) {
- QPlace newPlace = QPlaceJSonDetailsParser::buildPlace(place);
+ QGeoPlace newPlace = QPlaceJSonDetailsParser::buildPlace(place);
result.setPlace(newPlace);
searchResults.append(result);
}
diff --git a/src/plugins/places/nokia/qplacejsonsearchparser.cpp b/src/plugins/places/nokia/qplacejsonsearchparser.cpp
index cbb81cb5..b9c2c6bd 100644
--- a/src/plugins/places/nokia/qplacejsonsearchparser.cpp
+++ b/src/plugins/places/nokia/qplacejsonsearchparser.cpp
@@ -54,7 +54,7 @@
#include <qgeocoordinate.h>
#include <qgeoaddress.h>
-#include <qplace.h>
+#include <qgeoplace.h>
#include <qplacecontact.h>
#include <qplacelocation.h>
#include <qplacerating.h>
@@ -175,7 +175,7 @@ QPlaceSearchResult QPlaceJSonSearchParser::processPlaceElement(const QScriptValu
{
QPlaceSearchResult result;
result.setType(QPlaceSearchResult::Place);
- QPlace newPlace;
+ QGeoPlace newPlace;
// Processing properties
QScriptValue properties = results.property(search_properties_element);
@@ -230,7 +230,7 @@ QPlaceSearchResult QPlaceJSonSearchParser::processPlaceElement(const QScriptValu
return result;
}
-void QPlaceJSonSearchParser::processContacts(const QScriptValue &properties, QPlace *place)
+void QPlaceJSonSearchParser::processContacts(const QScriptValue &properties, QGeoPlace *place)
{
QList<QPlaceContact> contacts;
QScriptValue value = properties.property(search_properties_url_value);
@@ -251,7 +251,7 @@ void QPlaceJSonSearchParser::processContacts(const QScriptValue &properties, QPl
}
-void QPlaceJSonSearchParser::processCategories(const QScriptValue &categories, QPlace *place)
+void QPlaceJSonSearchParser::processCategories(const QScriptValue &categories, QGeoPlace *place)
{
QList<QPlaceCategory> categoriesList;
QScriptValueIterator it(categories);
@@ -272,7 +272,7 @@ void QPlaceJSonSearchParser::processCategories(const QScriptValue &categories, Q
place->setCategories(categoriesList);
}
-void QPlaceJSonSearchParser::processRating(const QScriptValue &properties, QPlace *place)
+void QPlaceJSonSearchParser::processRating(const QScriptValue &properties, QGeoPlace *place)
{
QScriptValue value = properties.property(search_properties_rating_value);
if (value.isValid() && !value.toString().isEmpty()) {
@@ -330,7 +330,7 @@ void QPlaceJSonSearchParser::processAddress(const QScriptValue &properties, QPla
location->setAddress(newAddress);
}
-void QPlaceJSonSearchParser::processLocation(const QScriptValue &properties, QPlace *place)
+void QPlaceJSonSearchParser::processLocation(const QScriptValue &properties, QGeoPlace *place)
{
QPlaceLocation location;
diff --git a/src/plugins/places/nokia/qplacejsonsearchparser.h b/src/plugins/places/nokia/qplacejsonsearchparser.h
index ed75e2f9..ed6fd1ca 100644
--- a/src/plugins/places/nokia/qplacejsonsearchparser.h
+++ b/src/plugins/places/nokia/qplacejsonsearchparser.h
@@ -83,11 +83,11 @@ public slots:
private:
void processResultElement(const QScriptValue &value);
QPlaceSearchResult processPlaceElement(const QScriptValue &value);
- void processContacts(const QScriptValue &properties, QPlace *place);
- void processCategories(const QScriptValue &categories, QPlace *place);
- void processRating(const QScriptValue &properties, QPlace *place);
+ void processContacts(const QScriptValue &properties, QGeoPlace *place);
+ void processCategories(const QScriptValue &categories, QGeoPlace *place);
+ void processRating(const QScriptValue &properties, QGeoPlace *place);
void processAddress(const QScriptValue &properties, QPlaceLocation *location);
- void processLocation(const QScriptValue &properties, QPlace *place);
+ void processLocation(const QScriptValue &properties, QGeoPlace *place);
private:
QScriptEngine *engine;
QList<QPlaceSearchResult> searchResultsList;
diff --git a/src/plugins/places/nokia/qplacemanagerengineimpl.cpp b/src/plugins/places/nokia/qplacemanagerengineimpl.cpp
index f4c3553f..333ddfa6 100644
--- a/src/plugins/places/nokia/qplacemanagerengineimpl.cpp
+++ b/src/plugins/places/nokia/qplacemanagerengineimpl.cpp
@@ -91,7 +91,7 @@ QPlaceDetailsReply *QPlaceManagerEngineImpl::getPlaceDetails(const QString &plac
return reply;
}
-QPlaceMediaReply *QPlaceManagerEngineImpl::getMedia(const QPlace &place, const QPlaceQuery &query)
+QPlaceMediaReply *QPlaceManagerEngineImpl::getMedia(const QGeoPlace &place, const QPlaceQuery &query)
{
QPlaceMediaReplyImpl *reply = NULL;
QPlaceRestReply *restReply = QPlaceRestManager::instance()->sendPlaceImagesRequest(place.placeId(),
@@ -107,7 +107,7 @@ QPlaceMediaReply *QPlaceManagerEngineImpl::getMedia(const QPlace &place, const Q
return reply;
}
-QPlaceReply *QPlaceManagerEngineImpl::postRating(const QPlace &place, qreal value)
+QPlaceReply *QPlaceManagerEngineImpl::postRating(const QGeoPlace &place, qreal value)
{
QPlaceRatingReplyImpl *reply = NULL;
//TODO: need to post user name
@@ -124,7 +124,7 @@ QPlaceReply *QPlaceManagerEngineImpl::postRating(const QPlace &place, qreal valu
return reply;
}
-QPlaceReviewReply *QPlaceManagerEngineImpl::getReviews(const QPlace &place, const QPlaceQuery &query)
+QPlaceReviewReply *QPlaceManagerEngineImpl::getReviews(const QGeoPlace &place, const QPlaceQuery &query)
{
QPlaceReviewReplyImpl *reply = NULL;
QPlaceRestReply *restReply = QPlaceRestManager::instance()->sendPlaceReviewRequest(place.placeId(),
@@ -166,7 +166,7 @@ QPlaceManager::VisibilityScopes QPlaceManagerEngineImpl::supportedSearchVisibili
return QPlaceManager::PublicScope;
}
-QPlaceSearchReply *QPlaceManagerEngineImpl::recommendations(const QPlace &place, const QPlaceSearchQuery &query)
+QPlaceSearchReply *QPlaceManagerEngineImpl::recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query)
{
QPlaceRecommendationReplyImpl *reply = NULL;
QPlaceSearchQuery newQuery = query;
@@ -212,7 +212,7 @@ QPlaceManager::ConnectivityModes QPlaceManagerEngineImpl::supportedConnectivityM
return QPlaceManager::OnlineMode;
}
-QPlaceReply *QPlaceManagerEngineImpl::savePlace(QPlace *place, QPlaceManager::VisibilityScope scope) {
+QPlaceReply *QPlaceManagerEngineImpl::savePlace(QGeoPlace *place, QPlaceManager::VisibilityScope scope) {
//TODO: implementation
return NULL;
}
@@ -221,7 +221,7 @@ QPlaceManager::VisibilityScopes QPlaceManagerEngineImpl::supportedSaveVisibility
return QPlaceManager::NoScope;
}
-QPlaceReply *QPlaceManagerEngineImpl::removePlace(const QPlace &place) {
+QPlaceReply *QPlaceManagerEngineImpl::removePlace(const QGeoPlace &place) {
//TODO: implementation
return NULL;
}
diff --git a/src/plugins/places/nokia/qplacemanagerengineimpl.h b/src/plugins/places/nokia/qplacemanagerengineimpl.h
index bde71f03..1d8d425e 100644
--- a/src/plugins/places/nokia/qplacemanagerengineimpl.h
+++ b/src/plugins/places/nokia/qplacemanagerengineimpl.h
@@ -65,26 +65,26 @@ public:
QPlaceDetailsReply *getPlaceDetails(const QString &placeId);
- QPlaceMediaReply *getMedia(const QPlace &place, const QPlaceQuery &query);
+ QPlaceMediaReply *getMedia(const QGeoPlace &place, const QPlaceQuery &query);
- QPlaceReply *postRating(const QPlace &place, qreal value);
+ QPlaceReply *postRating(const QGeoPlace &place, qreal value);
- QPlaceReviewReply *getReviews(const QPlace &place, const QPlaceQuery &query);
+ QPlaceReviewReply *getReviews(const QGeoPlace &place, const QPlaceQuery &query);
QPlaceSearchReply *searchForPlaces(const QPlaceSearchQuery &query, QPlaceManager::VisibilityScope scope);
QPlaceManager::VisibilityScopes supportedSearchVisibilityScopes() const;
- QPlaceSearchReply *recommendations(const QPlace &place, const QPlaceSearchQuery &query);
+ QPlaceSearchReply *recommendations(const QGeoPlace &place, const QPlaceSearchQuery &query);
QPlaceTextPredictionReply *textPredictions(const QPlaceSearchQuery &query);
QPlaceManager::ConnectivityModes connectivityMode() const;
void setConnectivityMode(QPlaceManager::ConnectivityModes connectivityMode);
QPlaceManager::ConnectivityModes supportedConnectivityModes() const;
- QPlaceReply *savePlace(QPlace *place, QPlaceManager::VisibilityScope scope);
+ QPlaceReply *savePlace(QGeoPlace *place, QPlaceManager::VisibilityScope scope);
QPlaceManager::VisibilityScopes supportedSaveVisibilityScopes() const;
- QPlaceReply *removePlace(const QPlace &place);
+ QPlaceReply *removePlace(const QGeoPlace &place);
QPlaceReply *initializeCategories();
QList<QPlaceCategory> categories() const;