• 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
OsmBoundsTagHandler.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 "OsmBoundsTagHandler.h"
12 
13 #include "OsmElementDictionary.h"
14 
15 #include "GeoParser.h"
16 #include "GeoDataDocument.h"
17 #include "GeoDataParser.h"
18 #include "GeoDataLatLonAltBox.h"
19 #include "GeoDataLinearRing.h"
20 #include "GeoDataRegion.h"
21 
22 #include "MarbleDebug.h"
23 
24 namespace Marble
25 {
26 
27 namespace osm
28 {
29 
30 static GeoTagHandlerRegistrar osmBoundsTagHandler( GeoParser::QualifiedName( osmTag_bounds, "" ),
31  new OsmBoundsTagHandler() );
32 
33 GeoNode* OsmBoundsTagHandler::parse( GeoParser& parser ) const
34 {
35  Q_ASSERT( parser.isStartElement() );
36 
37  qreal minlat = parser.attribute("minlat").toFloat();
38  qreal minlon = parser.attribute("minlon").toFloat();
39  qreal maxlat = parser.attribute("maxlat").toFloat();
40  qreal maxlon = parser.attribute("maxlon").toFloat();
41 
42  mDebug() << "[OSM] Bounds: " << minlat << " " << minlon << " " << maxlat << " " << maxlon;
43  return 0;
44 }
45 
46 }
47 
48 }
GeoDataDocument.h
Marble::GeoNode
A shared base class for all classes that are mapped to a specific tag (ie.
Definition: GeoDocument.h:60
GeoParser.h
GeoDataParser.h
OsmBoundsTagHandler.h
MarbleDebug.h
Marble::osm::osmBoundsTagHandler
static GeoTagHandlerRegistrar osmBoundsTagHandler(GeoParser::QualifiedName(osmTag_bounds,""), new OsmBoundsTagHandler())
Marble::GeoParser
Definition: GeoParser.h:40
Marble::osm::OsmBoundsTagHandler::parse
virtual GeoNode * parse(GeoParser &) const
Definition: OsmBoundsTagHandler.cpp:33
OsmElementDictionary.h
GeoDataRegion.h
Marble::GeoParser::attribute
QString attribute(const char *attributeName) const
Definition: GeoParser.cpp:200
Marble::osm::osmTag_bounds
const char * osmTag_bounds
Definition: OsmElementDictionary.cpp:21
QPair< QString, QString >
GeoDataLinearRing.h
QXmlStreamReader::isStartElement
bool isStartElement() const
GeoDataLatLonAltBox.h
QString::toFloat
float toFloat(bool *ok) const
Marble::GeoTagHandlerRegistrar
Definition: GeoTagHandler.h:74
Marble::osm::OsmBoundsTagHandler
Definition: OsmBoundsTagHandler.h:22
Marble::mDebug
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:36
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