[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdeedu/marble/src/lib/geodata
From:       Torsten Rahn <tackat () kde ! org>
Date:       2009-07-30 19:26:43
Message-ID: 1248982003.670299.22083.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1004742 by rahn:

Adding a patch by Gaurav Gupta that implements

- GeoDataAbstractView
- GeoDataLookAt

Further additions to integrate these classes with GeoDataFeature.



 M  +2 -1      GeoDataTest.cpp  
 A             data/GeoDataAbstractView.cpp   [License: UNKNOWN]
 A             data/GeoDataAbstractView.h   [License: UNKNOWN]
 M  +4 -2      data/GeoDataCoordinates.cpp  
 M  +10 -0     data/GeoDataFeature.cpp  
 M  +14 -1     data/GeoDataFeature.h  
 M  +1 -0      data/GeoDataFeature_p.h  
 A             data/GeoDataLookAt.cpp   [License: UNKNOWN]
 A             data/GeoDataLookAt.h   [License: UNKNOWN]
 A             data/GeoDataLookAt_p.h   [License: UNKNOWN]


--- trunk/KDE/kdeedu/marble/src/lib/geodata/GeoDataTest.cpp #1004741:1004742
@@ -28,6 +28,7 @@
 #include "GeoDataDocument.h"
 #include "GeoDataFolder.h"
 #include "GeoDataPlacemark.h"
+#include "GeoDataLookAt.h"
 
 #include "GeoSceneDocument.h"
 #include "GeoSceneHead.h"
@@ -190,7 +191,7 @@
 
 void dumpGeoDataPlacemark(const GeoDataPlacemark& placemark)
 {
-    qDebug() << placemark.name() << placemark.population() << \
placemark.coordinate().toString(); +	qDebug() << placemark.name() << \
placemark.population() << placemark.coordinate().toString()<<"lookAt info \
"<<(placemark.lookAt()->coordinate())->toString()<<placemark.lookAt()->altitude();  }
 
 void dumpFoldersRecursively(const GeoDataContainer& container, int depth)
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataCoordinates.cpp \
#1004741:1004742 @@ -130,6 +130,7 @@
     }
 }
 
+
 /*
  * call detach() at the start of all non-static, non-const functions
  */
@@ -148,6 +149,7 @@
     }
 }
 
+
 void GeoDataCoordinates::geoCoordinates( qreal& lon, qreal& lat, 
                                GeoDataCoordinates::Unit unit ) const
 {
@@ -167,7 +169,7 @@
 
 qreal GeoDataCoordinates::longitude( GeoDataCoordinates::Unit unit ) const
 {
-    switch ( unit ) 
+    switch ( unit )
     {
     default:
     case Radian:
@@ -179,7 +181,7 @@
 
 qreal GeoDataCoordinates::latitude( GeoDataCoordinates::Unit unit ) const
 {
-    switch ( unit ) 
+    switch ( unit )
     {
     default:
     case Radian:
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature.cpp #1004741:1004742
@@ -485,6 +485,16 @@
     d->m_styleMap = styleMap;
 }
 
+GeoDataLookAt* GeoDataFeature::lookAt() const
+{
+	return p()->m_lookAt;
+}
+
+void GeoDataFeature::setLookAt( GeoDataLookAt* lookAt )
+{
+	p()->m_lookAt = lookAt;
+}
+	
 int GeoDataFeature::popularityIndex() const
 {
     return d->m_popularityIndex;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature.h #1004741:1004742
@@ -21,6 +21,7 @@
 #include <QtGui/QColor>
 
 #include "GeoDataObject.h"
+#include "GeoDataLookAt.h"
 #include "GeoGraphicsItem.h"
 
 #include "geodata_export.h"
@@ -262,8 +263,20 @@
     * Sets the styleMap of the feature
     */
     void setStyleMap( GeoDataStyleMap* map );
-    
 
+	/**
+	 * Returns pointer to the GeoDataLooAt of the feature.
+	 */
+	GeoDataLookAt* lookAt() const;
+
+	/**
+	 * Sets the lookAt of the placemark.
+	 * @param  LookAt  the new LookAt of the feature.
+	 */
+	void setLookAt( GeoDataLookAt *lookAt );
+
+	
+
     // ----------------------------------------------------------------
     // The following functions are use for painting, and mostly for placemarks.
 
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature_p.h #1004741:1004742
@@ -104,6 +104,7 @@
 
     GeoDataStyle* m_style;
     GeoDataStyleMap* m_styleMap;
+	GeoDataLookAt* m_lookAt;
     
     QAtomicInt  ref;
 };


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic