smf/inc/common/smfplace/smfplace.h
changeset 5 edb9dc8273d9
parent 3 0446eb7b28aa
--- a/smf/inc/common/smfplace/smfplace.h	Thu Apr 15 15:40:08 2010 +0530
+++ b/smf/inc/common/smfplace/smfplace.h	Thu Apr 22 15:18:37 2010 +0530
@@ -26,8 +26,10 @@
 #include <qdatastream.h>
 #include <QSharedData>
 #include <smfclientglobal.h>
+#include <QMetaType>
 
-using namespace QtMobility; // Qt mobility - namespace
+// Qt mobility - namespace
+using namespace QtMobility;
 
 typedef enum 
 {
@@ -48,15 +50,13 @@
  * 
  * Note: This class has dependencies on QtMobility project
  */
-class SMFCLIENT_EXPORT SmfPlace : public QObject
+class SMFCLIENT_EXPORT SmfPlace
 	{
-	Q_OBJECT
 public:
 	/**
 	 * Constructor with default argument
-	 * @param aParent The parent object
 	 */
-	SmfPlace( QObject *aParent = 0 );
+	SmfPlace( );
 	
 	/**
 	 * Copy Constructor
@@ -67,8 +67,9 @@
 	/**
 	 * Overloaded = operator 
 	 * @param aOther The reference object
+	 * @return The current object reference
 	 */
-	SmfPlace operator=( const SmfPlace &aOther );
+	SmfPlace& operator=( const SmfPlace &aOther );
 	
 	/**
 	 * Destructor
@@ -111,7 +112,7 @@
 	 * in time) of the place.
 	 * @return The Geo Position information of place
 	 */
-	QtMobility::QGeoPositionInfo geoPositionInfo( ) const;
+	QGeoPositionInfo geoPositionInfo( ) const;
 	
 	/**
 	 * Method to get the url indicating the place
@@ -161,7 +162,7 @@
 	 * in time) of the place.
 	 * @param aGeoPosInfo The new Geo Position information of place
 	 */
-	void setGeoPositionInfo( const QtMobility::QGeoPositionInfo& aGeoPosInfo );
+	void setGeoPositionInfo( const QGeoPositionInfo &aGeoPosInfo );
 	
 	/**
 	 * Method to set the url indicating the place
@@ -169,6 +170,12 @@
 	 */
 	void setUrl( const QUrl& aUrl );
 	
+	/**
+	 * Method to set the id of the place
+	 * @return The ID value 
+	 */
+	void setId( const QString &aId );
+	
 private:
 	QSharedDataPointer<SmfPlacePrivate> d;
 	
@@ -201,4 +208,9 @@
 QDataStream &operator>>( QDataStream &aDataStream, 
 		SmfPlace &aPlace);
 
+
+// Make the class SmfPlace known to QMetaType, so that as to register it.
+Q_DECLARE_METATYPE(SmfPlace)
+
+
 #endif /* SMFPLACE_H_ */