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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • tools
  • osm-addresses
OsmRegionTree.h
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 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef OSMREGIONTREE_H
12 #define OSMREGIONTREE_H
13 
14 #include "OsmRegion.h"
15 
16 #include <QVector>
17 
18 namespace Marble
19 {
20 
21 class OsmRegionTree
22 {
23 public:
24  explicit OsmRegionTree( const OsmRegion & node = OsmRegion() );
25 
26  const OsmRegion &node() const;
27 
28  void setChildren( const QVector<OsmRegionTree> children );
29 
30  const QVector<OsmRegionTree> & children() const;
31 
32  void append( QList<OsmRegion> &regions );
33 
34  void traverse( int &counter );
35 
36  operator QList<OsmRegion>() const;
37 
38  int smallestRegionId( const GeoDataCoordinates &coordinates ) const;
39 
40 private:
41  int smallestRegionId( const GeoDataCoordinates &coordinates, int &level ) const;
42 
43  void enumerate( QList<OsmRegion> &list ) const;
44 
45  OsmRegion m_node;
46 
47  QVector<OsmRegionTree> m_children;
48 };
49 
50 }
51 
52 #endif // OSMREGIONTREE_H
53 
Marble::OsmRegionTree::OsmRegionTree
OsmRegionTree(const OsmRegion &node=OsmRegion())
Definition: OsmRegionTree.cpp:16
Marble::OsmRegionTree::setChildren
void setChildren(const QVector< OsmRegionTree > children)
Definition: OsmRegionTree.cpp:27
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::OsmRegion
A lightweight data structure to represent administrative regions like villages, cities, states, ...
Definition: OsmRegion.h:26
Marble::OsmRegionTree::smallestRegionId
int smallestRegionId(const GeoDataCoordinates &coordinates) const
Definition: OsmRegionTree.cpp:82
Marble::OsmRegionTree
Definition: OsmRegionTree.h:21
Marble::OsmRegionTree::append
void append(QList< OsmRegion > &regions)
Definition: OsmRegionTree.cpp:37
Marble::OsmRegionTree::children
const QVector< OsmRegionTree > & children() const
Definition: OsmRegionTree.cpp:32
OsmRegion.h
Marble::OsmRegionTree::traverse
void traverse(int &counter)
Definition: OsmRegionTree.cpp:54
Marble::OsmRegionTree::node
const OsmRegion & node() const
Definition: OsmRegionTree.cpp:22
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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