• 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
  • tools
  • osm-addresses
OsmRegion.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 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #include "OsmRegion.h"
12 
13 #include <QList>
14 
15 namespace Marble
16 {
17 
18 int OsmRegion::m_idFactory = 0;
19 
20 OsmRegion::OsmRegion() : m_identifier( ++m_idFactory ),
21  m_parent( 0 ), m_longitude( 0.0 ), m_latitude( 0.0 ),
22  m_left( 0 ), m_right( 0 ), m_adminLevel( 10 )
23 {
24  // nothing to do
25 }
26 
27 int OsmRegion::identifier() const
28 {
29  return m_identifier;
30 }
31 
32 void OsmRegion::setIdentifier( int identifier )
33 {
34  m_identifier = identifier;
35 }
36 
37 int OsmRegion::parentIdentifier() const
38 {
39  return m_parent;
40 }
41 
42 void OsmRegion::setParentIdentifier( int identifier )
43 {
44  m_parent = identifier;
45 }
46 
47 QString OsmRegion::name() const
48 {
49  return m_name;
50 }
51 
52 void OsmRegion::setName( const QString &name )
53 {
54  m_name = name;
55 }
56 
57 qreal OsmRegion::longitude() const
58 {
59  return m_longitude;
60 }
61 
62 void OsmRegion::setLongitude( qreal longitude )
63 {
64  m_longitude = longitude;
65 }
66 
67 qreal OsmRegion::latitude() const
68 {
69  return m_latitude;
70 }
71 
72 void OsmRegion::setLatitude( qreal latitude )
73 {
74  m_latitude = latitude;
75 }
76 
77 bool OsmRegion::operator==( const OsmRegion &other ) const
78 {
79  return identifier() == other.identifier();
80 }
81 
82 void OsmRegion::setLeft( int left )
83 {
84  m_left = left;
85 }
86 
87 int OsmRegion::left() const
88 {
89  return m_left;
90 }
91 
92 void OsmRegion::setRight( int right )
93 {
94  m_right = right;
95 }
96 
97 int OsmRegion::right() const
98 {
99  return m_right;
100 }
101 
102 const GeoDataPolygon& OsmRegion::geometry() const
103 {
104  return m_geometry;
105 }
106 
107 void OsmRegion::setGeometry( const GeoDataPolygon &polygon )
108 {
109  m_geometry = polygon;
110 }
111 
112 int OsmRegion::adminLevel() const
113 {
114  return m_adminLevel;
115 }
116 
117 void OsmRegion::setAdminLevel( int level )
118 {
119  m_adminLevel = level;
120 }
121 
122 
123 }
Marble::OsmRegion::setLongitude
void setLongitude(qreal longitude)
Definition: OsmRegion.cpp:62
Marble::OsmRegion::OsmRegion
OsmRegion()
Definition: OsmRegion.cpp:20
Marble::OsmRegion
A lightweight data structure to represent administrative regions like villages, cities, states, ...
Definition: OsmRegion.h:26
Marble::OsmRegion::geometry
const GeoDataPolygon & geometry() const
Definition: OsmRegion.cpp:102
Marble::OsmRegion::setName
void setName(const QString &name)
Definition: OsmRegion.cpp:52
Marble::OsmRegion::setLeft
void setLeft(int left)
Definition: OsmRegion.cpp:82
Marble::OsmRegion::setAdminLevel
void setAdminLevel(int level)
Definition: OsmRegion.cpp:117
Marble::OsmRegion::setRight
void setRight(int right)
Definition: OsmRegion.cpp:92
Marble::OsmRegion::left
int left() const
Definition: OsmRegion.cpp:87
Marble::OsmRegion::right
int right() const
Definition: OsmRegion.cpp:97
Marble::OsmRegion::setLatitude
void setLatitude(qreal latitude)
Definition: OsmRegion.cpp:72
Marble::GeoDataPolygon
A polygon that can have "holes".
Definition: GeoDataPolygon.h:81
Marble::OsmRegion::name
QString name() const
Definition: OsmRegion.cpp:47
OsmRegion.h
Marble::OsmRegion::setGeometry
void setGeometry(const GeoDataPolygon &polygon)
Definition: OsmRegion.cpp:107
QString
Marble::OsmRegion::parentIdentifier
int parentIdentifier() const
Definition: OsmRegion.cpp:37
Marble::OsmRegion::setParentIdentifier
void setParentIdentifier(int identifier)
Definition: OsmRegion.cpp:42
Marble::OsmRegion::adminLevel
int adminLevel() const
Definition: OsmRegion.cpp:112
Marble::OsmRegion::operator==
bool operator==(const OsmRegion &other) const
Definition: OsmRegion.cpp:77
Marble::OsmRegion::identifier
int identifier() const
Unique (per process) region identifier.
Definition: OsmRegion.cpp:27
Marble::OsmRegion::setIdentifier
void setIdentifier(int identifier)
Identifier change.
Definition: OsmRegion.cpp:32
Marble::OsmRegion::longitude
qreal longitude() const
Longitude of the region's center point, in degree.
Definition: OsmRegion.cpp:57
Marble::OsmRegion::latitude
qreal latitude() const
Latitude of the region's center point, in degree.
Definition: OsmRegion.cpp:67
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