Add support for the KML Schema tag and its child tags SimpleField and displayName. - For Schema and SimpleField, add one class - GeoDataSchema and GeoDataSimpleField in src/lib/marble/geodata/data - KmlSchemaTagHandler and KmlSimpleFieldTagHandler in src/lib/marble/geodata/handlers/kml - KmlSchemaTagWriter and KmlSimpleFieldTagWriter in src/lib/marble/geodata/writers/kml Have a look at other files in the respective directories for examples. For displayName extend the existing KmlDisplayTagHandler. There's no need to have a writer for it, KmlSimpleFieldTagWriter can write the needed tag on its own. GeoDataSchema should derive from GeoDataObject. For simplicity it can also derive from QVector<GeoDataSimpleField>, or provide a similar API to get/set the SimpleField children. GeoDataSimpleField should have getters and setters for type (a new enum), name (QString) and displayName (QString). Modify GeoDataDocument such that GeoDataSchema instances can be added, removed and queried from it. Change KmlDocumentTagHandler and KmlDocumentTagWriter to read/write Schema tags. Add a KML file tests/data/Schema.kml as a unit test. It should contain various Schema tags in a Document (see KML reference). Make sure to compile Marble with the following cmake options enabled: BUILD_MARBLE_TESTS=TRUE, BUILD_MARBLE_TOOLS=TRUE. Execute tests/TestGeoDataWriter and make sure no errors come up. Use tools/kml2kml to analyze errors and fix the tag writers, if needed. Submit a review request at https://git.reviewboard.kde.org with the marble group as reviewers. Please leave a comment here (e.g. "I want to work on this task.") if you start working on this task to avoid multiple people working on it at the same time.
I would like to work on this task
Git commit c2aa91e4c0507a0d66396dc558d66f3a14a5b6cd by Dennis Nienhüser, on behalf of Abhinav Gangwar. Committed on 28/03/2014 at 18:37. Pushed by nienhueser into branch 'master'. Support for KML Schema tag and its child elements REVIEW: 117022 M +4 -0 src/lib/marble/geodata/CMakeLists.txt M +25 -0 src/lib/marble/geodata/data/GeoDataDocument.cpp M +24 -0 src/lib/marble/geodata/data/GeoDataDocument.h M +2 -0 src/lib/marble/geodata/data/GeoDataDocument_p.h A +123 -0 src/lib/marble/geodata/data/GeoDataSchema.cpp [License: LGPL] A +89 -0 src/lib/marble/geodata/data/GeoDataSchema.h [License: LGPL] A +111 -0 src/lib/marble/geodata/data/GeoDataSimpleField.cpp [License: LGPL] A +109 -0 src/lib/marble/geodata/data/GeoDataSimpleField.h [License: LGPL] M +6 -1 src/lib/marble/geodata/handlers/kml/KmlDisplayNameTagHandler.cpp M +9 -8 src/lib/marble/geodata/handlers/kml/KmlSchemaTagHandler.cpp M +38 -1 src/lib/marble/geodata/handlers/kml/KmlSimpleFieldTagHandler.cpp M +5 -0 src/lib/marble/geodata/handlers/kml/KmlSimpleFieldTagHandler.h M +2 -0 src/lib/marble/geodata/parser/GeoDataTypes.cpp M +2 -0 src/lib/marble/geodata/parser/GeoDataTypes.h M +4 -0 src/lib/marble/geodata/writers/kml/KmlDocumentTagWriter.cpp A +45 -0 src/lib/marble/geodata/writers/kml/KmlSchemaTagWriter.cpp [License: LGPL] A +27 -0 src/lib/marble/geodata/writers/kml/KmlSchemaTagWriter.h [License: LGPL] A +74 -0 src/lib/marble/geodata/writers/kml/KmlSimpleFieldTagWriter.cpp [License: LGPL] A +32 -0 src/lib/marble/geodata/writers/kml/KmlSimpleFieldTagWriter.h [License: LGPL] M +0 -12 tests/TestGeoDataWriter.cpp A +47 -0 tests/data/schema.kml http://commits.kde.org/marble/c2aa91e4c0507a0d66396dc558d66f3a14a5b6cd