• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • plugins
  • runner
  • osm
  • handlers
OsmOsmTagHandler.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2011 Konstantin Oblaukhov <oblaukhov.konstantin@gmail.com>
9 //
10 
11 #include "OsmOsmTagHandler.h"
12 
13 #include "OsmElementDictionary.h"
14 #include "OsmParser.h"
15 
16 #include "GeoParser.h"
17 #include "GeoDataPoint.h"
18 #include "GeoDataDocument.h"
19 #include "MarbleGlobal.h"
20 #include "GeoDataParser.h"
21 #include "GeoDataLineStyle.h"
22 #include "GeoDataStyleMap.h"
23 #include "GeoDataStyle.h"
24 
25 namespace Marble
26 {
27 
28 namespace osm
29 {
30 static GeoTagHandlerRegistrar osmOsmTagHandler( GeoParser::QualifiedName( osmTag_osm, "" ),
31  new OsmOsmTagHandler() );
32 
33 GeoNode* OsmOsmTagHandler::parse( GeoParser& parser ) const
34 {
35  // Osm Node http://wiki.openstreetmap.org/wiki/Data_Primitives#Node
36 
37  GeoDataDocument* doc = geoDataDoc( parser );
38 
39  GeoDataPolyStyle backgroundPolyStyle;
40  backgroundPolyStyle.setFill( true );
41  backgroundPolyStyle.setOutline( false );
42  backgroundPolyStyle.setColor( OsmParser::backgroundColor );
43  GeoDataStyle backgroundStyle;
44  backgroundStyle.setPolyStyle( backgroundPolyStyle );
45  backgroundStyle.setId( "background" );
46  doc->addStyle( backgroundStyle );
47 
48  return doc;
49 }
50 
51 }
52 
53 }
GeoDataDocument.h
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Marble::osm::OsmOsmTagHandler::parse
virtual GeoNode * parse(GeoParser &) const
Definition: OsmOsmTagHandler.cpp:33
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
GeoParser.h
Marble::GeoDataColorStyle::setColor
void setColor(const QColor &value)
Set a new color.
Definition: GeoDataColorStyle.cpp:84
GeoDataStyle.h
OsmOsmTagHandler.h
GeoDataParser.h
GeoDataLineStyle.h
Marble::GeoParser
Definition: GeoParser.h:40
OsmElementDictionary.h
Marble::GeoDataStyle
an addressable style group
Definition: GeoDataStyle.h:55
Marble::GeoDataPolyStyle::setFill
void setFill(const bool &fill)
Set whether to fill the polygon.
Definition: GeoDataPolyStyle.cpp:90
Marble::GeoDataDocument::addStyle
void addStyle(const GeoDataStyle &style)
Add a style to the style storage.
Definition: GeoDataDocument.cpp:134
MarbleGlobal.h
GeoDataStyleMap.h
Marble::osm::osmTag_osm
const char * osmTag_osm
Definition: OsmElementDictionary.cpp:19
GeoDataPoint.h
Marble::GeoDataObject::setId
void setId(const QString &value)
Set the id of the object.
Definition: GeoDataObject.cpp:80
Marble::OsmParser::backgroundColor
static const QColor backgroundColor
Definition: src/plugins/runner/osm/OsmParser.h:47
Marble::GeoDataPolyStyle::setOutline
void setOutline(const bool &outline)
Set whether to draw the outline.
Definition: GeoDataPolyStyle.cpp:100
Marble::GeoDataPolyStyle
specifies the style how polygons are drawn
Definition: GeoDataPolyStyle.h:34
Marble::GeoParser::QualifiedName
QPair< QString, QString > QualifiedName
Definition: GeoParser.h:43
Marble::GeoDataStyle::setPolyStyle
void setPolyStyle(const GeoDataPolyStyle &style)
set the poly style
Definition: GeoDataStyle.cpp:117
Marble::osm::osmOsmTagHandler
static GeoTagHandlerRegistrar osmOsmTagHandler(GeoParser::QualifiedName(osmTag_osm,""), new OsmOsmTagHandler())
Marble::geoDataDoc
GeoDataDocument * geoDataDoc(GeoParser &parser)
Definition: GeoDataParser.cpp:105
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal