summaryrefslogtreecommitdiff
path: root/src/location/places/qplacesearchresult.h
diff options
context:
space:
mode:
authorabcd <qt-info@nokia.com>2011-06-02 17:07:29 +1000
committerabcd <qt-info@nokia.com>2011-06-02 17:28:32 +1000
commit8fab6bcfc3ef9912852e916b852456327fba299f (patch)
treed652f611c06e9f35ea8aeaa353d1674535747e99 /src/location/places/qplacesearchresult.h
parent1dd8b4805d108931a41eb2d58874a598281ee2c4 (diff)
downloadqtlocation-8fab6bcfc3ef9912852e916b852456327fba299f.tar.gz
Initial dump of places
Diffstat (limited to 'src/location/places/qplacesearchresult.h')
-rw-r--r--src/location/places/qplacesearchresult.h72
1 files changed, 72 insertions, 0 deletions
diff --git a/src/location/places/qplacesearchresult.h b/src/location/places/qplacesearchresult.h
new file mode 100644
index 00000000..fbb6e778
--- /dev/null
+++ b/src/location/places/qplacesearchresult.h
@@ -0,0 +1,72 @@
+#ifndef QPLACESEARCHRESULT_H
+#define QPLACESEARCHRESULT_H
+
+#include "qplaceglobal.h"
+
+#include <QSharedDataPointer>
+#include <QVariant>
+#include <QString>
+#include "qplace.h"
+
+namespace QT_PLACES_NAMESPACE {
+
+class QPlaceSearchResultPrivate;
+
+class Q_PLACES_EXPORT QPlaceSearchResult
+{
+public:
+ QPlaceSearchResult();
+ QPlaceSearchResult(const QPlaceSearchResult &other);
+
+ virtual ~QPlaceSearchResult();
+
+ QPlaceSearchResult &operator=(const QPlaceSearchResult &other);
+
+ bool operator==(const QPlaceSearchResult &other) const;
+ bool operator!=(const QPlaceSearchResult &other) const {
+ return !(other == *this);
+ }
+
+ enum LocationMatchType {
+ PointAddress,
+ Interpolated,
+ Undefined
+ };
+
+ enum SearchResultType {
+ Place,
+ DidYouMeanSuggestion,
+ Unassigned
+ };
+
+ qreal relevance() const;
+ void setRelevance(const qreal &relevance);
+
+ qreal distance() const;
+ void setDistance(const qreal &distance);
+
+ qreal heading() const;
+ void setHeading(const qreal &heading);
+
+ LocationMatchType matchType() const;
+ void setLocationMatchType(const LocationMatchType &matchType);
+
+ QVariantHash additionalData() const;
+ void setAdditionalData(const QVariantHash &data);
+
+ SearchResultType type() const;
+ void setType(const SearchResultType &type);
+
+ QPlace place() const;
+ void setPlace(const QPlace &place);
+
+ QString didYouMeanSuggestion() const;
+ void setDidYouMeanSuggestion(const QString &didYouMeanSuggestion);
+
+private:
+ QSharedDataPointer<QPlaceSearchResultPrivate> d;
+};
+
+} // QT_PLACES_NAMESPACE
+
+#endif // QPLACESEARCHRESULT_H