Marble

GeoDataBuilding.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2017 Mohammed Nafees <[email protected]>
4 //
5 
6 #ifndef MARBLE_GEODATABUILDING_H
7 #define MARBLE_GEODATABUILDING_H
8 
9 #include <QVector>
10 
11 #include "GeoDataGeometry.h"
12 #include "GeoDataCoordinates.h"
13 
14 #include "geodata_export.h"
15 
16 namespace Marble {
17 class GeoDataBuildingPrivate;
18 
19 /*!
20  \class GeoDataBuilding
21  \brief Contains important information about a building and its floors (levels)
22 
23  GeoDataBuilding holds information such as minimum floor, maximum floor,
24  floor data and their respective MultiGeometry and other possible metadata such
25  as the total height of the building, type etc.
26  */
27 
28 class GEODATA_EXPORT GeoDataBuilding : public GeoDataGeometry
29 {
30 public:
31  explicit GeoDataBuilding();
32  explicit GeoDataBuilding(const GeoDataGeometry &other);
33  explicit GeoDataBuilding(const GeoDataBuilding &other);
34 
35  struct NamedEntry {
36  GeoDataCoordinates point;
37  QString label;
38  };
39 
40  GeoDataBuilding& operator=(const GeoDataBuilding &other);
41 
42  const char *nodeType() const override;
43 
44  EnumGeometryId geometryId() const override;
45 
46  GeoDataGeometry *copy() const override;
47 
48  static double parseBuildingHeight(const QString& buildingHeight);
49 
50  /*!
51  Destroys the GeoDataBuilding
52 */
53  ~GeoDataBuilding() override;
54 
55 
56 /*!
57  @return the height of the building
58 */
59  double height() const;
60 
61 
62 /*!
63  Sets the height of the building
64  @param height
65  */
66  void setHeight(double height);
67 
68 
69 /*!
70  @return the minimum level
71  */
72  int minLevel() const;
73 
74 
75 /*!
76  Sets the minimum level of the building
77  @param minLevel
78  */
79  void setMinLevel(int minLevel);
80 
81 
82 /*!
83  @return the maximum level of the building
84  */
85  int maxLevel() const;
86 
87 
88 /*!
89  Sets the maximum level of the building
90  @param maxLevel
91  */
92  void setMaxLevel(int maxLevel);
93 
94 
95 /*!
96  @return the non existent levels in the building
97  */
98  QVector<int> nonExistentLevels() const;
99 
100 
101 /*!
102  Sets the non existent levels of the building
103  @param nonExistentLevels
104  */
105  void setNonExistentLevels(const QVector<int>& nonExistentLevels);
106 
107 
108 /*!
109  @return the multigeometry associated with the building
110  */
111  GeoDataMultiGeometry* multiGeometry() const;
112 
113 
114 /*!
115  @return the latlonaltbox for the contained multigeometry
116  */
117  const GeoDataLatLonAltBox& latLonAltBox() const override;
118 
119 
120 /*!
121  @return the name of the building
122  */
123  QString name() const;
124 
125 
126 /*!
127  Sets the name of the building
128  @param name
129  */
130  void setName(const QString& name);
131 
132  QVector<NamedEntry> entries() const;
133 
134  void setEntries(const QVector<NamedEntry>& entries);
135 
136 private:
137  GeoDataBuildingPrivate* const d;
138 };
139 
140 }
141 
142 #endif
A 3d point representation.
A class that defines a 3D bounding box for geographic data.
A base class for all geodata features.
Binds a QML item to a specific geodetic location in screen coordinates.
A class that can contain other GeoDataGeometry objects.
Contains important information about a building and its floors (levels)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:26 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.