equal
deleted
inserted
replaced
24 #include <QUrl> |
24 #include <QUrl> |
25 #include <qgeopositioninfo.h> // Qt mobility class |
25 #include <qgeopositioninfo.h> // Qt mobility class |
26 #include <qdatastream.h> |
26 #include <qdatastream.h> |
27 #include <QSharedData> |
27 #include <QSharedData> |
28 #include <smfclientglobal.h> |
28 #include <smfclientglobal.h> |
29 |
29 #include <QMetaType> |
30 using namespace QtMobility; // Qt mobility - namespace |
30 |
|
31 // Qt mobility - namespace |
|
32 using namespace QtMobility; |
31 |
33 |
32 typedef enum |
34 typedef enum |
33 { |
35 { |
34 SearchByStreet = 0x00, |
36 SearchByStreet = 0x00, |
35 SearchByLocality, |
37 SearchByLocality, |
46 * @ingroup smf_common_group |
48 * @ingroup smf_common_group |
47 * The SmfPlace class represents a place and its related information. |
49 * The SmfPlace class represents a place and its related information. |
48 * |
50 * |
49 * Note: This class has dependencies on QtMobility project |
51 * Note: This class has dependencies on QtMobility project |
50 */ |
52 */ |
51 class SMFCLIENT_EXPORT SmfPlace : public QObject |
53 class SMFCLIENT_EXPORT SmfPlace |
52 { |
54 { |
53 Q_OBJECT |
|
54 public: |
55 public: |
55 /** |
56 /** |
56 * Constructor with default argument |
57 * Constructor with default argument |
57 * @param aParent The parent object |
58 */ |
58 */ |
59 SmfPlace( ); |
59 SmfPlace( QObject *aParent = 0 ); |
|
60 |
60 |
61 /** |
61 /** |
62 * Copy Constructor |
62 * Copy Constructor |
63 * @param aOther The reference object |
63 * @param aOther The reference object |
64 */ |
64 */ |
65 SmfPlace( const SmfPlace &aOther ); |
65 SmfPlace( const SmfPlace &aOther ); |
66 |
66 |
67 /** |
67 /** |
68 * Overloaded = operator |
68 * Overloaded = operator |
69 * @param aOther The reference object |
69 * @param aOther The reference object |
70 */ |
70 * @return The current object reference |
71 SmfPlace operator=( const SmfPlace &aOther ); |
71 */ |
|
72 SmfPlace& operator=( const SmfPlace &aOther ); |
72 |
73 |
73 /** |
74 /** |
74 * Destructor |
75 * Destructor |
75 */ |
76 */ |
76 ~SmfPlace( ); |
77 ~SmfPlace( ); |
109 * Method to get the Geo Position information (like information gathered |
110 * Method to get the Geo Position information (like information gathered |
110 * on a global position, direction and velocity at a particular point |
111 * on a global position, direction and velocity at a particular point |
111 * in time) of the place. |
112 * in time) of the place. |
112 * @return The Geo Position information of place |
113 * @return The Geo Position information of place |
113 */ |
114 */ |
114 QtMobility::QGeoPositionInfo geoPositionInfo( ) const; |
115 QGeoPositionInfo geoPositionInfo( ) const; |
115 |
116 |
116 /** |
117 /** |
117 * Method to get the url indicating the place |
118 * Method to get the url indicating the place |
118 * @return The url indicating the place |
119 * @return The url indicating the place |
119 */ |
120 */ |
159 * Method to set the Geo Postion information (like information gathered |
160 * Method to set the Geo Postion information (like information gathered |
160 * on a global position, direction and velocity at a particular point |
161 * on a global position, direction and velocity at a particular point |
161 * in time) of the place. |
162 * in time) of the place. |
162 * @param aGeoPosInfo The new Geo Position information of place |
163 * @param aGeoPosInfo The new Geo Position information of place |
163 */ |
164 */ |
164 void setGeoPositionInfo( const QtMobility::QGeoPositionInfo& aGeoPosInfo ); |
165 void setGeoPositionInfo( const QGeoPositionInfo &aGeoPosInfo ); |
165 |
166 |
166 /** |
167 /** |
167 * Method to set the url indicating the place |
168 * Method to set the url indicating the place |
168 * @param aUrl The new url indicating the place |
169 * @param aUrl The new url indicating the place |
169 */ |
170 */ |
170 void setUrl( const QUrl& aUrl ); |
171 void setUrl( const QUrl& aUrl ); |
|
172 |
|
173 /** |
|
174 * Method to set the id of the place |
|
175 * @return The ID value |
|
176 */ |
|
177 void setId( const QString &aId ); |
171 |
178 |
172 private: |
179 private: |
173 QSharedDataPointer<SmfPlacePrivate> d; |
180 QSharedDataPointer<SmfPlacePrivate> d; |
174 |
181 |
175 friend QDataStream &operator<<( QDataStream &aDataStream, |
182 friend QDataStream &operator<<( QDataStream &aDataStream, |
199 * @return reference to the stream |
206 * @return reference to the stream |
200 */ |
207 */ |
201 QDataStream &operator>>( QDataStream &aDataStream, |
208 QDataStream &operator>>( QDataStream &aDataStream, |
202 SmfPlace &aPlace); |
209 SmfPlace &aPlace); |
203 |
210 |
|
211 |
|
212 // Make the class SmfPlace known to QMetaType, so that as to register it. |
|
213 Q_DECLARE_METATYPE(SmfPlace) |
|
214 |
|
215 |
204 #endif /* SMFPLACE_H_ */ |
216 #endif /* SMFPLACE_H_ */ |