[Marble-commits] KDE/kdeedu/marble/src/lib/geodata

Bastian Holst bastianholst at gmx.de
Wed Jul 14 22:38:03 CEST 2010


SVN commit 1150009 by bholst:

Patch by Harshit Jain:
This patch implements the KML time tags TimeStamp & TimeSpan

 M  +22 -0     data/GeoDataFeature.cpp  
 M  +25 -0     data/GeoDataFeature.h  
 M  +11 -0     data/GeoDataFeature_p.h  
 A             data/GeoDataTimePrimitive.cpp   [License: LGPL]
 A             data/GeoDataTimePrimitive.h   [License: LGPL]
 A             data/GeoDataTimePrimitive_p.h   [License: LGPL]
 A             data/GeoDataTimeSpan.cpp   [License: LGPL]
 A             data/GeoDataTimeSpan.h   [License: LGPL]
 A             data/GeoDataTimeSpan_p.h   [License: LGPL]
 A             data/GeoDataTimeStamp.cpp   [License: LGPL]
 A             data/GeoDataTimeStamp.h   [License: LGPL]
 A             data/GeoDataTimeStamp_p.h   [License: LGPL]
 A             handlers/kml/KmlBeginTagHandler.cpp   [License: LGPL]
 A             handlers/kml/KmlBeginTagHandler.h   [License: LGPL]
 M  +0 -1      handlers/kml/KmlElementDictionary.cpp  
 M  +0 -1      handlers/kml/KmlElementDictionary.h  
 A             handlers/kml/KmlEndTagHandler.cpp   [License: LGPL]
 A             handlers/kml/KmlEndTagHandler.h   [License: LGPL]
 A             handlers/kml/KmlTimeSpanTagHandler.cpp   [License: LGPL]
 A             handlers/kml/KmlTimeSpanTagHandler.h   [License: LGPL]
 A             handlers/kml/KmlTimeStampTagHandler.cpp   [License: LGPL]
 A             handlers/kml/KmlTimeStampTagHandler.h   [License: LGPL]
 A             handlers/kml/KmlWhenTagHandler.cpp   [License: LGPL]
 A             handlers/kml/KmlWhenTagHandler.h   [License: LGPL]
 M  +3 -0      parser/GeoDataTypes.cpp  
 M  +3 -0      parser/GeoDataTypes.h  


--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature.cpp #1150008:1150009
@@ -453,6 +453,28 @@
     d->m_visible = value;
 }
 
+GeoDataTimeSpan& GeoDataFeature::timeSpan() const
+{
+    return d->m_timeSpan;
+}
+
+void GeoDataFeature::setTimeSpan( GeoDataTimeSpan timeSpan )
+{
+    detach();
+    d->m_timeSpan = timeSpan;
+}
+
+GeoDataTimeStamp&  GeoDataFeature::timeStamp() const
+{
+    return d->m_timeStamp;
+}
+
+void GeoDataFeature::setTimeStamp( GeoDataTimeStamp timeStamp )
+{
+    detach();
+    d->m_timeStamp = timeStamp;
+}
+
 GeoDataStyle* GeoDataFeature::style() const
 {
     if ( s_defaultStyleInitialized == false )
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature.h #1150008:1150009
@@ -40,6 +40,9 @@
 
 class GeoDataExtendedData;
 
+class GeoDataTimeSpan;
+class GeoDataTimeStamp;
+
 class GeoDataFeaturePrivate;
 
 /**
@@ -215,6 +218,28 @@
     void setVisible( bool value );
 
     /**
+     * Return the timespan of the feature.
+     */
+    GeoDataTimeSpan& timeSpan() const;
+
+    /**
+     * Set the timespan of the feature.
+     * @param timeSpan new of timespan.	
+     */
+    void setTimeSpan( GeoDataTimeSpan timeSpan );
+
+    /**
+     * Return the timestamp of the feature.
+     */
+    GeoDataTimeStamp& timeStamp() const;
+
+    /**
+     * Set the timestamp of the feature.
+     * @param timeStamp new of the timestamp.
+     */
+    void setTimeStamp( GeoDataTimeStamp timeStamp );
+
+    /**
      * Return the style assigned to the placemark.
      */
     GeoDataStyle* style() const;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature_p.h #1150008:1150009
@@ -18,6 +18,8 @@
 #include "GeoDataAbstractView.h"
 #include "GeoDataFeature.h"
 #include "GeoDataRegion.h"
+#include "GeoDataTimeStamp.h"
+#include "GeoDataTimeSpan.h"
 
 #include "GeoDataTypes.h"
 
@@ -43,6 +45,8 @@
         m_style( 0 ),
         m_styleMap( 0 ),
         m_extendedData(),
+        m_timeSpan(),
+        m_timeStamp(),
         m_region(),
         ref( 0 )
     {
@@ -63,6 +67,8 @@
         m_style( other.m_style ),               //FIXME: both style and stylemap need to be reworked internally!!!!
         m_styleMap( other.m_styleMap ),
         m_extendedData( other.m_extendedData ),
+        m_timeSpan( other.m_timeSpan ),
+        m_timeStamp( other.m_timeStamp ),
         m_region( other.m_region ),
         ref( 0 )
     {
@@ -82,6 +88,8 @@
         m_role = other.m_role;
         m_style = other.m_style;
         m_styleMap = other.m_styleMap;
+        m_timeSpan = other.m_timeSpan;
+        m_timeStamp = other.m_timeStamp;
         m_visualCategory = other.m_visualCategory;
         m_extendedData = other.m_extendedData;
         m_region = other.m_region;
@@ -129,6 +137,9 @@
 
     GeoDataExtendedData m_extendedData;
 
+    GeoDataTimeSpan  m_timeSpan;
+    GeoDataTimeStamp m_timeStamp;
+
     GeoDataRegion m_region;
     
     QAtomicInt  ref;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlElementDictionary.cpp #1150008:1150009
@@ -160,7 +160,6 @@
 const char* kmlTag_text = "text";
 const char* kmlTag_textcolor = "textcolor";
 const char* kmlTag_tilt = "tilt";
-const char* kmlTag_TimePrimitive = "TimePrimitive";
 const char* kmlTag_TimeSpan = "TimeSpan";
 const char* kmlTag_TimeStamp = "TimeStamp";
 const char* kmlTag_Update = "Update";
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlElementDictionary.h #1150008:1150009
@@ -160,7 +160,6 @@
     extern const char* kmlTag_text;
     extern const char* kmlTag_textcolor;
     extern const char* kmlTag_tilt;
-    extern const char* kmlTag_TimePrimitive;
     extern const char* kmlTag_TimeSpan;
     extern const char* kmlTag_TimeStamp;
     extern const char* kmlTag_Update;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDataTypes.cpp #1150008:1150009
@@ -55,6 +55,9 @@
 const char* GeoDataStyleSelectorType = "GeoDataStyleSelector";
 const char* GeoDataStyleType = "GeoDataStyle";
 const char* GeoDataStyleMapType = "GeoDataStyleMap";
+const char* GeoDataTimePrimitiveType = "GeoDataTimePrimitive";
+const char* GeoDataTimeSpanType = "GeoDataTimeSpan";
+const char* GeoDataTimeStampType = "GeoDataTimeStamp";
 }
 
 }
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDataTypes.h #1150008:1150009
@@ -62,6 +62,9 @@
 extern const char* GeoDataStyleSelectorType;
 extern const char* GeoDataStyleType;
 extern const char* GeoDataStyleMapType;
+extern const char* GeoDataTimePrimitiveType;
+extern const char* GeoDataTimeStampType;
+extern const char* GeoDataTimeSpanType;
 }
 
 }


More information about the Marble-commits mailing list