[Marble-commits] KDE/kdeedu/marble/src/lib/geodata
Bastian Holst
bastianholst at gmx.de
Mon Jun 14 19:12:10 CEST 2010
SVN commit 1137923 by bholst:
Patch by Harshit Jain:
Adding support for the ExtendedData kml tag to marble.
A data/GeoDataData.cpp [License: LGPL]
A data/GeoDataData.h [License: LGPL]
A data/GeoDataData_p.h [License: LGPL]
A data/GeoDataExtendedData.cpp [License: LGPL]
A data/GeoDataExtendedData.h [License: LGPL]
A data/GeoDataExtendedData_p.h [License: LGPL]
M +11 -0 data/GeoDataFeature.cpp
M +12 -0 data/GeoDataFeature.h
M +6 -0 data/GeoDataFeature_p.h
A handlers/kml/KmlDataTagHandler.cpp [License: LGPL]
A handlers/kml/KmlDataTagHandler.h [License: LGPL]
A handlers/kml/KmlDisplayNameTagHandler.cpp [License: LGPL]
A handlers/kml/KmlDisplayNameTagHandler.h [License: LGPL]
M +4 -0 handlers/kml/KmlElementDictionary.cpp
M +4 -0 handlers/kml/KmlElementDictionary.h
A handlers/kml/KmlExtendedDataTagHandler.cpp [License: LGPL]
A handlers/kml/KmlExtendedDataTagHandler.h [License: LGPL]
A handlers/kml/KmlValueTagHandler.cpp [License: LGPL]
A handlers/kml/KmlValueTagHandler.h [License: LGPL]
M +2 -0 parser/GeoDataTypes.cpp
M +2 -0 parser/GeoDataTypes.h
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature.cpp #1137922:1137923
@@ -482,6 +482,17 @@
d->m_style = style;
}
+GeoDataExtendedData& GeoDataFeature::extendedData() const
+{
+ return d->m_extendedData;
+}
+
+void GeoDataFeature::setExtendedData( const GeoDataExtendedData& extendedData )
+{
+ detach();
+ d->m_extendedData = extendedData;
+}
+
GeoDataRegion& GeoDataFeature::region() const
{
return d->m_region;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature.h #1137922:1137923
@@ -38,6 +38,7 @@
class GeoDataStyle;
class GeoDataStyleMap;
+class GeoDataExtendedData;
class GeoDataFeaturePrivate;
@@ -224,6 +225,17 @@
void setStyle( GeoDataStyle* style );
/**
+ * Return the ExtendedData assigned to the feature.
+ */
+ GeoDataExtendedData& extendedData() const;
+
+ /**
+ * Sets the ExtendedData of the feature.
+ * @param extendedData the new ExtendedData to be used.
+ */
+ void setExtendedData( const GeoDataExtendedData& extendedData );
+
+ /**
* Return the region assigned to the placemark.
*/
GeoDataRegion& region() const;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/data/GeoDataFeature_p.h #1137922:1137923
@@ -14,6 +14,7 @@
#include <QtCore/QString>
#include <QtCore/QAtomicInt>
+#include "GeoDataExtendedData.h"
#include "GeoDataAbstractView.h"
#include "GeoDataFeature.h"
#include "GeoDataRegion.h"
@@ -41,6 +42,7 @@
m_role(" "),
m_style( 0 ),
m_styleMap( 0 ),
+ m_extendedData(),
m_region(),
ref( 0 )
{
@@ -60,6 +62,7 @@
m_role( other.m_role ),
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_region( other.m_region ),
ref( 0 )
{
@@ -80,6 +83,7 @@
m_style = other.m_style;
m_styleMap = other.m_styleMap;
m_visualCategory = other.m_visualCategory;
+ m_extendedData = other.m_extendedData;
m_region = other.m_region;
}
@@ -123,6 +127,8 @@
GeoDataStyle* m_style;
GeoDataStyleMap* m_styleMap;
+ GeoDataExtendedData m_extendedData;
+
GeoDataRegion m_region;
QAtomicInt ref;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlElementDictionary.cpp #1137922:1137923
@@ -49,13 +49,16 @@
const char* kmlTag_cookie = "cookie";
const char* kmlTag_coordinates = "coordinates";
const char* kmlTag_Create = "Create";
+const char* kmlTag_Data = "Data";
const char* kmlTag_Delete = "Delete";
const char* kmlTag_description = "description";
+const char* kmlTag_displayName = "displayName";
const char* kmlTag_Document = "Document";
const char* kmlTag_drawOrder = "drawOrder";
const char* kmlTag_east = "east";
const char* kmlTag_end = "end";
const char* kmlTag_expires = "expires";
+const char* kmlTag_ExtendedData = "ExtendedData";
const char* kmlTag_extrude = "extrude";
const char* kmlTag_Feature = "Feature";
const char* kmlTag_fill = "fill";
@@ -162,6 +165,7 @@
const char* kmlTag_TimeStamp = "TimeStamp";
const char* kmlTag_Update = "Update";
const char* kmlTag_Url = "Url";
+const char* kmlTag_value = "value";
const char* kmlTag_viewBoundScale = "viewBoundScale";
const char* kmlTag_viewFormat = "viewFormat";
const char* kmlTag_viewRefreshMode = "viewRefreshMode";
--- trunk/KDE/kdeedu/marble/src/lib/geodata/handlers/kml/KmlElementDictionary.h #1137922:1137923
@@ -49,13 +49,16 @@
extern const char* kmlTag_cookie;
extern const char* kmlTag_coordinates;
extern const char* kmlTag_Create;
+ extern const char* kmlTag_Data;
extern const char* kmlTag_Delete;
extern const char* kmlTag_description;
+ extern const char* kmlTag_displayName;
extern const char* kmlTag_Document;
extern const char* kmlTag_drawOrder;
extern const char* kmlTag_east;
extern const char* kmlTag_end;
extern const char* kmlTag_expires;
+ extern const char* kmlTag_ExtendedData;
extern const char* kmlTag_extrude;
extern const char* kmlTag_Feature;
extern const char* kmlTag_fill;
@@ -162,6 +165,7 @@
extern const char* kmlTag_TimeStamp;
extern const char* kmlTag_Update;
extern const char* kmlTag_Url;
+ extern const char* kmlTag_value;
extern const char* kmlTag_viewBoundScale;
extern const char* kmlTag_viewFormat;
extern const char* kmlTag_viewRefreshMode;
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDataTypes.cpp #1137922:1137923
@@ -28,7 +28,9 @@
{
const char* GeoDataColorStyleType = "GeoDataColorStyle";
const char* GeoDataContainerType = "GeoDataContainer";
+const char* GeoDataDataType = "GeoDataData";
const char* GeoDataDocumentType = "GeoDataDocument";
+const char* GeoDataExtendedDataType = "GeoDataExtendedData";
const char* GeoDataFeatureType = "GeoDataFeature";
const char* GeoDataFolderType = "GeoDataFolder";
const char* GeoDataGeometryType = "GeoDataGeometry";
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoDataTypes.h #1137922:1137923
@@ -35,7 +35,9 @@
*/
extern const char* GeoDataColorStyleType;
extern const char* GeoDataContainerType;
+extern const char* GeoDataDataType;
extern const char* GeoDataDocumentType;
+extern const char* GeoDataExtendedDataType;
extern const char* GeoDataFeatureType;
extern const char* GeoDataFolderType;
extern const char* GeoDataGeometryType;
More information about the Marble-commits
mailing list