diff options
author | abcd <qt-info@nokia.com> | 2011-10-10 19:48:20 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2011-10-12 04:02:15 +0200 |
commit | 559ad8baa411b6f8bec8e41254a1ee0098c792b8 (patch) | |
tree | 31b4cc6bae811324b5be639abc26a167b2b105c1 /src/location/places | |
parent | 5ce1a5a6c0de34961cfa0711d1a7a5d25755f689 (diff) | |
download | qtlocation-559ad8baa411b6f8bec8e41254a1ee0098c792b8.tar.gz |
Add Supported Features handling
Change-Id: Ie2518c349fc551756f78a963417cceb93c81a3a8
Reviewed-on: http://codereview.qt-project.org/6407
Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
Diffstat (limited to 'src/location/places')
-rw-r--r-- | src/location/places/qplacemanager.cpp | 8 | ||||
-rw-r--r-- | src/location/places/qplacemanager.h | 23 | ||||
-rw-r--r-- | src/location/places/qplacemanagerengine.h | 1 |
3 files changed, 25 insertions, 7 deletions
diff --git a/src/location/places/qplacemanager.cpp b/src/location/places/qplacemanager.cpp index 9dbc9e13..2658cd22 100644 --- a/src/location/places/qplacemanager.cpp +++ b/src/location/places/qplacemanager.cpp @@ -278,6 +278,14 @@ QUrl QPlaceManager::constructIconUrl(const QPlaceIcon &icon, const QSize &size, } /*! + Returns a set of flags indicating what particular features this manager instance supports. +*/ +QPlaceManager::ManagerFeatures QPlaceManager::supportedFeatures() const +{ + return d->supportedFeatures(); +} + +/*! \fn void QPlaceManager::finished(QPlaceReply* reply) This signal is emitted when \a reply has finished processing. diff --git a/src/location/places/qplacemanager.h b/src/location/places/qplacemanager.h index 13d1dffa..b4f7d606 100644 --- a/src/location/places/qplacemanager.h +++ b/src/location/places/qplacemanager.h @@ -72,15 +72,20 @@ class Q_LOCATION_EXPORT QPlaceManager : public QObject Q_OBJECT public: enum ManagerFeature { - SuggestionFeature, - AuthenticationFeature, - PlaceEditingFeature, - SavePlaceFeature, - SaveCategoryFeature, - RecommendationsFeature, - LocaleFeature + NoFeatures = 0x0, + SavePlaceFeature = 0x1, + RemovePlaceFeature = 0x2, + SaveCategoryFeature = 0x4, + RemoveCategoryFeature = 0x8, + RecommendationsFeature = 0x10, + TextPredictionsFeature = 0x20, + CorrectionsFeature = 0x40, + LocaleFeature = 0x80 }; + Q_DECLARE_FLAGS(ManagerFeatures, ManagerFeature) + Q_FLAGS(ManagerFeatures) + ~QPlaceManager(); QString managerName() const; @@ -114,6 +119,8 @@ public: QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size, QPlaceIcon::IconFlags flags); + ManagerFeatures supportedFeatures() const; + Q_SIGNALS: void finished(QPlaceReply *reply); void error(QPlaceReply *, QPlaceReply::Error error, const QString &errorString = QString()); @@ -141,4 +148,6 @@ QT_END_NAMESPACE QT_END_HEADER +Q_DECLARE_OPERATORS_FOR_FLAGS(QT_PREPEND_NAMESPACE(QPlaceManager::ManagerFeatures)) + #endif // QPLACEMANAGER_H diff --git a/src/location/places/qplacemanagerengine.h b/src/location/places/qplacemanagerengine.h index 49f3eeb3..38b031d5 100644 --- a/src/location/places/qplacemanagerengine.h +++ b/src/location/places/qplacemanagerengine.h @@ -89,6 +89,7 @@ public: virtual void setLocale(const QLocale &locale) = 0; virtual QUrl constructIconUrl(const QPlaceIcon &icon, const QSize &size, QPlaceIcon::IconFlags flags) = 0; + virtual QPlaceManager::ManagerFeatures supportedFeatures() const = 0; Q_SIGNALS: void finished(QPlaceReply *reply); |