~ubuntu-branches/ubuntu/wily/marble/wily-proposed

« back to all changes in this revision

Viewing changes to src/lib/marble/geodata/writers/kml/KmlPolygonTagWriter.cpp

  • Committer: Package Import Robot
  • Author(s): Scarlett Clark, Jonathan Riddell, Scarlett Clark
  • Date: 2014-07-24 23:38:32 UTC
  • mfrom: (1.5.2)
  • Revision ID: package-import@ubuntu.com-20140724233832-7v4421t4khrhw487
Tags: 4:4.13.90-0ubuntu1
[ Jonathan Riddell ]
* Switch to libmarblewidget19 for new soversion

[ Scarlett Clark ]
* New upstream beta release
* Update: do_not_install_private_headers. 

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
// the source code.
7
7
//
8
8
// Copyright 2012      Shou Ya <shouyatf@gmail.com>
 
9
// Copyright 2014      Marek Hakala <hakala.marek@gmail.com>
9
10
//
10
11
 
11
12
#include "KmlPolygonTagWriter.h"
14
15
#include "GeoDataTypes.h"
15
16
#include "GeoWriter.h"
16
17
#include "KmlElementDictionary.h"
 
18
#include "KmlObjectTagWriter.h"
17
19
 
18
20
namespace Marble
19
21
{
20
22
 
21
23
static GeoTagWriterRegistrar s_writerLookAt(
22
24
    GeoTagWriter::QualifiedName( GeoDataTypes::GeoDataPolygonType,
23
 
                                 kml::kmlTag_nameSpace22 ),
 
25
                                 kml::kmlTag_nameSpaceOgc22 ),
24
26
    new KmlPolygonTagWriter);
25
27
 
26
28
bool KmlPolygonTagWriter::write( const GeoNode *node, GeoWriter& writer ) const
28
30
    const GeoDataPolygon *polygon = static_cast<const GeoDataPolygon*>( node );
29
31
 
30
32
    writer.writeStartElement( kml::kmlTag_Polygon );
 
33
    KmlObjectTagWriter::writeIdentifiers( writer, polygon );
 
34
    writer.writeOptionalElement( kml::kmlTag_extrude, QString::number( polygon->extrude() ), "0" );
31
35
 
32
36
    writer.writeStartElement( "outerBoundaryIs" );
33
37
    writeElement( &polygon->outerBoundary(), writer );