Marble

GeoDataPlacemark.cpp
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2004-2007 Torsten Rahn <[email protected]>
4 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
5 // SPDX-FileCopyrightText: 2008-2009 Patrick Spendrin <[email protected]>
6 //
7 
8 
9 // Own
10 #include "GeoDataPlacemark.h"
11 
12 // Private
13 #include "GeoDataPlacemark_p.h"
14 
15 #include "GeoDataMultiGeometry.h"
16 #include "GeoDataLatLonAltBox.h"
17 #include "GeoDataData.h"
18 #include "osm/OsmPlacemarkData.h"
19 
20 // Qt
21 #include <QDataStream>
22 #include "MarbleDebug.h"
23 #include "GeoDataTrack.h"
24 #include "GeoDataModel.h"
25 #include <QString>
26 #include <QXmlStreamWriter>
27 
28 namespace Marble
29 {
30 
31 const OsmPlacemarkData GeoDataPlacemarkPrivate::s_nullOsmPlacemarkData = OsmPlacemarkData();
32 const GeoDataPlacemarkExtendedData GeoDataPlacemarkPrivate::s_nullPlacemarkExtendedData = GeoDataPlacemarkExtendedData();
33 
35  : GeoDataFeature( new GeoDataPlacemarkPrivate )
36 {
38  d->m_geometry->setParent(this);
39 }
40 
41 
43  : GeoDataFeature(other, new GeoDataPlacemarkPrivate(*other.d_func()))
44 {
46  if (d->m_geometry) {
47  d->m_geometry->setParent(this);
48  }
49 }
50 
52  : GeoDataFeature( new GeoDataPlacemarkPrivate )
53 {
55  d->m_name = name;
56  d->m_geometry->setParent(this);
57 }
58 
60 {
61  // nothing to do
62 }
63 
64 GeoDataPlacemark &GeoDataPlacemark::operator=( const GeoDataPlacemark &other )
65 {
66  if (this != &other) {
68  *d = *other.d_func();
69  if (d->m_geometry) {
70  d->m_geometry->setParent(this);
71  }
72  }
73 
74  return *this;
75 }
76 
78 {
79  Q_D(const GeoDataPlacemark);
80  const GeoDataPlacemarkPrivate* const other_d = other.d_func();
81  if (!equals(other) ||
82  d->m_population != other_d->m_population) {
83  return false;
84  }
85 
86  if ((d->m_placemarkExtendedData && !other_d->m_placemarkExtendedData) &&
87  (*d->m_placemarkExtendedData != GeoDataPlacemarkExtendedData())) {
88  return false;
89  }
90 
91  if ((!d->m_placemarkExtendedData && other_d->m_placemarkExtendedData) &&
92  (GeoDataPlacemarkExtendedData() != *other_d->m_placemarkExtendedData)) {
93  return false;
94  }
95 
96  if (d->m_placemarkExtendedData && other_d->m_placemarkExtendedData &&
97  !(*d->m_placemarkExtendedData == *other_d->m_placemarkExtendedData)) {
98  return false;
99  }
100 
101  if (!d->m_geometry && !other_d->m_geometry) {
102  return true;
103  }
104  if ((!d->m_geometry && other_d->m_geometry) ||
105  (d->m_geometry && !other_d->m_geometry)) {
106  return false;
107  }
108 
109  if (*d->m_geometry != *other_d->m_geometry) {
110  return false;
111  }
112 
113  return true;
114 }
115 
116 bool GeoDataPlacemark::operator!=( const GeoDataPlacemark& other ) const
117 {
118  return !this->operator==( other );
119 }
120 
121 const char* GeoDataPlacemark::nodeType() const
122 {
123  return GeoDataTypes::GeoDataPlacemarkType;
124 }
125 
126 
128 {
129  return new GeoDataPlacemark(*this);
130 }
131 
132 
134 {
135  Q_D(const GeoDataPlacemark);
136  return d->m_visualCategory;
137 }
138 
140 {
142  d->m_visualCategory = index;
143 }
144 
146 {
148  return d->m_geometry;
149 }
150 
152 {
153  Q_D(const GeoDataPlacemark);
154  return d->m_geometry;
155 }
156 
158 {
159  Q_D(const GeoDataPlacemark);
160  return d->osmPlacemarkData();
161 }
162 
163 void GeoDataPlacemark::setOsmData( const OsmPlacemarkData &osmData )
164 {
166  d->osmPlacemarkData() = osmData;
167 }
168 
169 OsmPlacemarkData& GeoDataPlacemark::osmData()
170 {
172  return d->osmPlacemarkData();
173 }
174 
175 bool GeoDataPlacemark::hasOsmData() const
176 {
177  Q_D(const GeoDataPlacemark);
178  return d->m_osmPlacemarkData != nullptr;
179 }
180 
182 {
184  delete d->m_osmPlacemarkData;
185  d->m_osmPlacemarkData = nullptr;
186 }
187 
188 const GeoDataLookAt *GeoDataPlacemark::lookAt() const
189 {
190  return dynamic_cast<const GeoDataLookAt*>( abstractView() );
191 }
192 
193 GeoDataLookAt *GeoDataPlacemark::lookAt()
194 {
195  return dynamic_cast<GeoDataLookAt*>( abstractView() );
196 }
197 
198 bool GeoDataPlacemark::placemarkLayoutOrderCompare(const GeoDataPlacemark *left, const GeoDataPlacemark *right)
199 {
200  const GeoDataPlacemarkPrivate * const left_d = left->d_func();
201  const GeoDataPlacemarkPrivate * const right_d = right->d_func();
202 
203  if (left_d->m_zoomLevel != right_d->m_zoomLevel) {
204  return (left_d->m_zoomLevel < right_d->m_zoomLevel); // lower zoom level comes first
205  }
206 
207  if (left_d->m_popularity != right_d->m_popularity) {
208  return (left_d->m_popularity > right_d->m_popularity); // higher popularity comes first
209  }
210 
211  return left < right; // lower pointer value comes first
212 }
213 
214 GeoDataCoordinates GeoDataPlacemark::coordinate( const QDateTime &dateTime, bool *iconAtCoordinates ) const
215 {
216  Q_D(const GeoDataPlacemark);
217  bool hasIcon = false;
218  GeoDataCoordinates coord;
219 
220  if (d->m_geometry) {
221  // Beware: comparison between pointers, not strings.
222  if (geodata_cast<GeoDataPoint>(d->m_geometry)
223  || geodata_cast<GeoDataPolygon>(d->m_geometry)
224  || geodata_cast<GeoDataLinearRing>(d->m_geometry)) {
225  hasIcon = true;
226  coord = d->m_geometry->latLonAltBox().center();
227  } else if (const auto multiGeometry = geodata_cast<GeoDataMultiGeometry>(d->m_geometry)) {
229  QVector<GeoDataGeometry*>::ConstIterator end = multiGeometry->constEnd();
230  for ( ; it != end; ++it ) {
231  if (geodata_cast<GeoDataPoint>(*it)
232  || geodata_cast<GeoDataPolygon>(*it)
233  || geodata_cast<GeoDataLinearRing>(*it)) {
234  hasIcon = true;
235  break;
236  }
237  }
238 
239  coord = d->m_geometry->latLonAltBox().center();
240  } else if (const auto track = geodata_cast<GeoDataTrack>(d->m_geometry)) {
241  hasIcon = track->size() != 0 && track->firstWhen() <= dateTime;
242  coord = track->coordinatesAt( dateTime );
243  } else if (const auto lineString = geodata_cast<GeoDataLineString>(d->m_geometry)) {
244  auto const size = lineString->size();
245  if (size == 0) {
246  return GeoDataCoordinates();
247  } else if (size < 3) {
248  // Approximate center if there are just two coordinates
249  return lineString->latLonAltBox().center();
250  } else {
251  return lineString->at(size / 2);
252  }
253  } else {
254  coord = d->m_geometry->latLonAltBox().center();
255  }
256  }
257 
258  if ( iconAtCoordinates != nullptr ) {
259  *iconAtCoordinates = hasIcon;
260  }
261  return coord;
262 }
263 
264 void GeoDataPlacemark::coordinate( qreal& lon, qreal& lat, qreal& alt ) const
265 {
266  coordinate().geoCoordinates( lon, lat, alt );
267 }
268 
269 void GeoDataPlacemark::setCoordinate( qreal lon, qreal lat, qreal alt, GeoDataPoint::Unit _unit)
270 {
271  setGeometry( new GeoDataPoint(lon, lat, alt, _unit ) );
272 }
273 
275 {
276  setGeometry ( new GeoDataPoint( point ) );
277 }
278 
280 {
282  delete d->m_geometry;
283  d->m_geometry = entry;
284  d->m_geometry->setParent(this);
285 }
286 
287 
289 {
290  if (hasOsmData()) {
291  OsmPlacemarkData const &data = osmData();
292  QStringList const uiLanguages = QLocale::system().uiLanguages();
293  for (const QString &uiLanguage: uiLanguages) {
294  for (auto tagIter = data.tagsBegin(), end = data.tagsEnd(); tagIter != end; ++tagIter) {
295  if (tagIter.key().startsWith(QLatin1String("name:"))) {
296  QStringRef const tagLanguage = tagIter.key().midRef(5);
297  if (tagLanguage == uiLanguage) {
298  return tagIter.value();
299  }
300  }
301  }
302  }
303  }
304 
305  return name();
306 }
307 
309 {
310  Q_D(const GeoDataPlacemark);
311  switch (d->m_visualCategory) {
312  case Valley: return GeoDataPlacemarkPrivate::tr("Valley");
313  case OtherTerrain: return GeoDataPlacemarkPrivate::tr("Terrain");
314  case Crater: return GeoDataPlacemarkPrivate::tr("Crater");
315  case Mare: return GeoDataPlacemarkPrivate::tr("Sea");
316  case MannedLandingSite: return GeoDataPlacemarkPrivate::tr("Manned Landing Site");
317  case RoboticRover: return GeoDataPlacemarkPrivate::tr("Robotic Rover");
318  case UnmannedSoftLandingSite: return GeoDataPlacemarkPrivate::tr("Unmanned Soft Landing Site");
319  case UnmannedHardLandingSite: return GeoDataPlacemarkPrivate::tr("Unmanned Hard Landing Site");
320  case Mons: return GeoDataPlacemarkPrivate::tr("Mountain");
321  case SmallCity: return GeoDataPlacemarkPrivate::tr("City");
322  case SmallCountyCapital: return GeoDataPlacemarkPrivate::tr("County Capital");
323  case SmallStateCapital: return GeoDataPlacemarkPrivate::tr("State Capital");
324  case SmallNationCapital: return GeoDataPlacemarkPrivate::tr("Nation Capital");
325  case MediumCity: return GeoDataPlacemarkPrivate::tr("City");
326  case MediumCountyCapital: return GeoDataPlacemarkPrivate::tr("County Capital");
327  case MediumStateCapital: return GeoDataPlacemarkPrivate::tr("State Capital");
328  case MediumNationCapital: return GeoDataPlacemarkPrivate::tr("Nation Capital");
329  case BigCity: return GeoDataPlacemarkPrivate::tr("City");
330  case BigCountyCapital: return GeoDataPlacemarkPrivate::tr("County Capital");
331  case BigStateCapital: return GeoDataPlacemarkPrivate::tr("State Capital");
332  case BigNationCapital: return GeoDataPlacemarkPrivate::tr("Nation Capital");
333  case LargeCity: return GeoDataPlacemarkPrivate::tr("City");
334  case LargeCountyCapital: return GeoDataPlacemarkPrivate::tr("County Capital");
335  case LargeStateCapital: return GeoDataPlacemarkPrivate::tr("State Capital");
336  case LargeNationCapital: return GeoDataPlacemarkPrivate::tr("Nation Capital");
337  case Nation: return GeoDataPlacemarkPrivate::tr("Nation");
338  case Mountain: return GeoDataPlacemarkPrivate::tr("Mountain");
339  case Volcano: return GeoDataPlacemarkPrivate::tr("Volcano");
340  case Continent: return GeoDataPlacemarkPrivate::tr("Continent");
341  case Ocean: return GeoDataPlacemarkPrivate::tr("Ocean");
342  case GeographicPole: return GeoDataPlacemarkPrivate::tr("Geographic Pole");
343  case MagneticPole: return GeoDataPlacemarkPrivate::tr("Magnetic Pole");
344  case ShipWreck: return GeoDataPlacemarkPrivate::tr("Ship Wreck");
345  case AirPort: return GeoDataPlacemarkPrivate::tr("Air Port");
346  case Observatory: return GeoDataPlacemarkPrivate::tr("Observatory");
347  case MilitaryDangerArea: return GeoDataPlacemarkPrivate::tr("Military Danger Area");
348  case OsmSite: return GeoDataPlacemarkPrivate::tr("OSM Site");
349  case Coordinate: return GeoDataPlacemarkPrivate::tr("Coordinate");
350  case Bookmark: return GeoDataPlacemarkPrivate::tr("Bookmark");
351  case Satellite: return GeoDataPlacemarkPrivate::tr("Satellite");
352 
353  // OpenStreetMap categories
354  case PlaceCity: return GeoDataPlacemarkPrivate::tr("City");
355  case PlaceCityCapital: return GeoDataPlacemarkPrivate::tr("City Capital");
356  case PlaceCityNationalCapital: return GeoDataPlacemarkPrivate::tr("National Capital");
357  case PlaceSuburb: return GeoDataPlacemarkPrivate::tr("Suburb");
358  case PlaceHamlet: return GeoDataPlacemarkPrivate::tr("Hamlet");
359  case PlaceLocality: return GeoDataPlacemarkPrivate::tr("Locality");
360  case PlaceTown: return GeoDataPlacemarkPrivate::tr("Town");
361  case PlaceTownCapital: return GeoDataPlacemarkPrivate::tr("Town Capital");
362  case PlaceTownNationalCapital: return GeoDataPlacemarkPrivate::tr("National Capital");
363  case PlaceVillage: return GeoDataPlacemarkPrivate::tr("Village");
364  case PlaceVillageCapital: return GeoDataPlacemarkPrivate::tr("Village Capital");
365  case PlaceVillageNationalCapital: return GeoDataPlacemarkPrivate::tr("National Capital");
366  case NaturalWater: return GeoDataPlacemarkPrivate::tr("Water");
367  case NaturalReef: return GeoDataPlacemarkPrivate::tr("Reef");
368  case NaturalWood: return GeoDataPlacemarkPrivate::tr("Wood");
369  case NaturalBeach: return GeoDataPlacemarkPrivate::tr("Beach");
370  case NaturalWetland: return GeoDataPlacemarkPrivate::tr("Wetland");
371  case NaturalGlacier: return GeoDataPlacemarkPrivate::tr("Glacier");
372  case NaturalIceShelf: return GeoDataPlacemarkPrivate::tr("Ice Shelf");
373  case NaturalScrub: return GeoDataPlacemarkPrivate::tr("Scrub");
374  case NaturalCliff: return GeoDataPlacemarkPrivate::tr("Cliff");
375  case NaturalHeath: return GeoDataPlacemarkPrivate::tr("Heath");
376  case HighwayTrafficSignals: return GeoDataPlacemarkPrivate::tr("Traffic Signals");
377  case HighwayElevator: return GeoDataPlacemarkPrivate::tr("Elevator");
378  case HighwaySteps: return GeoDataPlacemarkPrivate::tr("Steps");
379  case HighwayUnknown: return GeoDataPlacemarkPrivate::tr("Unknown Road");
380  case HighwayPath: return GeoDataPlacemarkPrivate::tr("Path");
381  case HighwayFootway: return GeoDataPlacemarkPrivate::tr("Footway");
382  case HighwayTrack: return GeoDataPlacemarkPrivate::tr("Track");
383  case HighwayPedestrian: return GeoDataPlacemarkPrivate::tr("Footway");
384  case HighwayCycleway: return GeoDataPlacemarkPrivate::tr("Cycleway");
385  case HighwayService: return GeoDataPlacemarkPrivate::tr("Service Road");
386  case HighwayRoad: return GeoDataPlacemarkPrivate::tr("Road");
387  case HighwayResidential: return GeoDataPlacemarkPrivate::tr("Residential Road");
388  case HighwayLivingStreet: return GeoDataPlacemarkPrivate::tr("Living Street");
389  case HighwayUnclassified: return GeoDataPlacemarkPrivate::tr("Unclassified Road");
390  case HighwayTertiaryLink: return GeoDataPlacemarkPrivate::tr("Tertiary Link Road");
391  case HighwayTertiary: return GeoDataPlacemarkPrivate::tr("Tertiary Road");
392  case HighwaySecondaryLink: return GeoDataPlacemarkPrivate::tr("Secondary Link Road");
393  case HighwaySecondary: return GeoDataPlacemarkPrivate::tr("Secondary Road");
394  case HighwayPrimaryLink: return GeoDataPlacemarkPrivate::tr("Primary Link Road");
395  case HighwayPrimary: return GeoDataPlacemarkPrivate::tr("Primary Road");
396  case HighwayRaceway: return GeoDataPlacemarkPrivate::tr("Raceway");
397  case HighwayTrunkLink: return GeoDataPlacemarkPrivate::tr("Trunk Link Road");
398  case HighwayTrunk: return GeoDataPlacemarkPrivate::tr("Trunk Road");
399  case HighwayMotorwayLink: return GeoDataPlacemarkPrivate::tr("Motorway Link Road");
400  case HighwayMotorway: return GeoDataPlacemarkPrivate::tr("Motorway");
401  case HighwayCorridor: return GeoDataPlacemarkPrivate::tr("Corridor");
402  case Building: return GeoDataPlacemarkPrivate::tr("Building");
403  case AccomodationCamping: return GeoDataPlacemarkPrivate::tr("Camping");
404  case AccomodationHostel: return GeoDataPlacemarkPrivate::tr("Hostel");
405  case AccomodationHotel: return GeoDataPlacemarkPrivate::tr("Hotel");
406  case AccomodationMotel: return GeoDataPlacemarkPrivate::tr("Motel");
407  case AccomodationYouthHostel: return GeoDataPlacemarkPrivate::tr("Youth Hostel");
408  case AccomodationGuestHouse: return GeoDataPlacemarkPrivate::tr("Guest House");
409  case AmenityLibrary: return GeoDataPlacemarkPrivate::tr("Library");
410  case AmenityKindergarten: return GeoDataPlacemarkPrivate::tr("Kindergarten");
411  case EducationCollege: return GeoDataPlacemarkPrivate::tr("College");
412  case EducationSchool: return GeoDataPlacemarkPrivate::tr("School");
413  case EducationUniversity: return GeoDataPlacemarkPrivate::tr("University");
414  case FoodBar: return GeoDataPlacemarkPrivate::tr("Bar");
415  case FoodBiergarten: return GeoDataPlacemarkPrivate::tr("Biergarten");
416  case FoodCafe: return GeoDataPlacemarkPrivate::tr("Cafe");
417  case FoodFastFood: return GeoDataPlacemarkPrivate::tr("Fast Food");
418  case FoodPub: return GeoDataPlacemarkPrivate::tr("Pub");
419  case FoodRestaurant: return GeoDataPlacemarkPrivate::tr("Restaurant");
420  case HealthDentist: return GeoDataPlacemarkPrivate::tr("Dentist");
421  case HealthDoctors: return GeoDataPlacemarkPrivate::tr("Doctors");
422  case HealthHospital: return GeoDataPlacemarkPrivate::tr("Hospital");
423  case HealthPharmacy: return GeoDataPlacemarkPrivate::tr("Pharmacy");
424  case HealthVeterinary: return GeoDataPlacemarkPrivate::tr("Veterinary");
425  case MoneyAtm: return GeoDataPlacemarkPrivate::tr("ATM");
426  case MoneyBank: return GeoDataPlacemarkPrivate::tr("Bank");
427  case HistoricArchaeologicalSite: return GeoDataPlacemarkPrivate::tr("Archaeological Site");
428  case AmenityEmbassy: return GeoDataPlacemarkPrivate::tr("Embassy");
429  case AmenityEmergencyPhone: return GeoDataPlacemarkPrivate::tr("Emergency Phone");
430  case AmenityMountainRescue: return GeoDataPlacemarkPrivate::tr("Mountain Rescue");
431  case LeisureWaterPark: return GeoDataPlacemarkPrivate::tr("Water Park");
432  case AmenityCommunityCentre: return GeoDataPlacemarkPrivate::tr("Community Centre");
433  case AmenityFountain: return GeoDataPlacemarkPrivate::tr("Fountain");
434  case AmenityNightClub: return GeoDataPlacemarkPrivate::tr("Night Club");
435  case AmenityBench: return GeoDataPlacemarkPrivate::tr("Bench");
436  case AmenityCourtHouse: return GeoDataPlacemarkPrivate::tr("Court House");
437  case AmenityFireStation: return GeoDataPlacemarkPrivate::tr("Fire Station");
438  case AmenityHuntingStand: return GeoDataPlacemarkPrivate::tr("Hunting Stand");
439  case AmenityPolice: return GeoDataPlacemarkPrivate::tr("Police");
440  case AmenityPostBox: return GeoDataPlacemarkPrivate::tr("Post Box");
441  case AmenityPostOffice: return GeoDataPlacemarkPrivate::tr("Post Office");
442  case AmenityPrison: return GeoDataPlacemarkPrivate::tr("Prison");
443  case AmenityRecycling: return GeoDataPlacemarkPrivate::tr("Recycling");
444  case AmenityShelter: return GeoDataPlacemarkPrivate::tr("Shelter");
445  case AmenityTelephone: return GeoDataPlacemarkPrivate::tr("Telephone");
446  case AmenityToilets: return GeoDataPlacemarkPrivate::tr("Toilets");
447  case AmenityTownHall: return GeoDataPlacemarkPrivate::tr("Town Hall");
448  case AmenityWasteBasket: return GeoDataPlacemarkPrivate::tr("Waste Basket");
449  case AmenityDrinkingWater: return GeoDataPlacemarkPrivate::tr("Drinking Water");
450  case AmenityGraveyard: return GeoDataPlacemarkPrivate::tr("Graveyard");
451  case AmenityChargingStation: return GeoDataPlacemarkPrivate::tr("Charging Station");
452  case AmenityCarWash: return GeoDataPlacemarkPrivate::tr("Car Wash");
453  case AmenitySocialFacility: return GeoDataPlacemarkPrivate::tr("Social Facility");
454  case BarrierCityWall: return GeoDataPlacemarkPrivate::tr("City Wall");
455  case BarrierGate: return GeoDataPlacemarkPrivate::tr("Gate");
456  case BarrierLiftGate: return GeoDataPlacemarkPrivate::tr("Lift Gate");
457  case BarrierWall: return GeoDataPlacemarkPrivate::tr("Wall");
458  case NaturalVolcano: return GeoDataPlacemarkPrivate::tr("Volcano");
459  case NaturalPeak: return GeoDataPlacemarkPrivate::tr("Peak");
460  case NaturalTree: return GeoDataPlacemarkPrivate::tr("Tree");
461  case NaturalCave: return GeoDataPlacemarkPrivate::tr("Cave Entrance");
462  case ShopBeverages: return GeoDataPlacemarkPrivate::tr("Beverages");
463  case ShopHifi: return GeoDataPlacemarkPrivate::tr("Hifi");
464  case ShopSupermarket: return GeoDataPlacemarkPrivate::tr("Supermarket");
465  case ShopAlcohol: return GeoDataPlacemarkPrivate::tr("Liquor Store");
466  case ShopBakery: return GeoDataPlacemarkPrivate::tr("Bakery");
467  case ShopButcher: return GeoDataPlacemarkPrivate::tr("Butcher");
468  case ShopConfectionery: return GeoDataPlacemarkPrivate::tr("Confectionery");
469  case ShopConvenience: return GeoDataPlacemarkPrivate::tr("Convenience Shop");
470  case ShopGreengrocer: return GeoDataPlacemarkPrivate::tr("Greengrocer");
471  case ShopSeafood: return GeoDataPlacemarkPrivate::tr("Seafood Shop");
472  case ShopDepartmentStore: return GeoDataPlacemarkPrivate::tr("Department Store");
473  case ShopKiosk: return GeoDataPlacemarkPrivate::tr("Kiosk");
474  case ShopBag: return GeoDataPlacemarkPrivate::tr("Bag Shop");
475  case ShopClothes: return GeoDataPlacemarkPrivate::tr("Clothes Shop");
476  case ShopFashion: return GeoDataPlacemarkPrivate::tr("Fashion Shop");
477  case ShopJewelry: return GeoDataPlacemarkPrivate::tr("Jewelry Shop");
478  case ShopShoes: return GeoDataPlacemarkPrivate::tr("Shoe Shop");
479  case ShopVarietyStore: return GeoDataPlacemarkPrivate::tr("Variety Store");
480  case ShopBeauty: return GeoDataPlacemarkPrivate::tr("Beauty Services");
481  case ShopChemist: return GeoDataPlacemarkPrivate::tr("Chemist");
482  case ShopCosmetics: return GeoDataPlacemarkPrivate::tr("Cosmetics");
483  case ShopHairdresser: return GeoDataPlacemarkPrivate::tr("Hairdresser");
484  case ShopOptician: return GeoDataPlacemarkPrivate::tr("Optician");
485  case ShopPerfumery: return GeoDataPlacemarkPrivate::tr("Perfumery");
486  case ShopDoitYourself: return GeoDataPlacemarkPrivate::tr("Hardware Store");
487  case ShopFlorist: return GeoDataPlacemarkPrivate::tr("Florist");
488  case ShopHardware: return GeoDataPlacemarkPrivate::tr("Hardware Store");
489  case ShopFurniture: return GeoDataPlacemarkPrivate::tr("Furniture Store");
490  case ShopElectronics: return GeoDataPlacemarkPrivate::tr("Electronics Shop");
491  case ShopMobilePhone: return GeoDataPlacemarkPrivate::tr("Mobile Phone Shop");
492  case ShopBicycle: return GeoDataPlacemarkPrivate::tr("Bicycle Shop");
493  case ShopCar: return GeoDataPlacemarkPrivate::tr("Car Dealer");
494  case ShopCarRepair: return GeoDataPlacemarkPrivate::tr("Car Repair Shop");
495  case ShopCarParts: return GeoDataPlacemarkPrivate::tr("Car Parts");
496  case ShopMotorcycle: return GeoDataPlacemarkPrivate::tr("Motorcycle Shop");
497  case ShopOutdoor: return GeoDataPlacemarkPrivate::tr("Outdoor Shop");
498  case ShopSports: return GeoDataPlacemarkPrivate::tr("Sports Shop");
499  case ShopCopy: return GeoDataPlacemarkPrivate::tr("Printing Services");
500  case ShopArt: return GeoDataPlacemarkPrivate::tr("Art Shop");
501  case ShopMusicalInstrument: return GeoDataPlacemarkPrivate::tr("Musical Instrument Shop");
502  case ShopPhoto: return GeoDataPlacemarkPrivate::tr("Photo Shop");
503  case ShopBook: return GeoDataPlacemarkPrivate::tr("Bookshop");
504  case ShopGift: return GeoDataPlacemarkPrivate::tr("Gift Shop");
505  case ShopStationery: return GeoDataPlacemarkPrivate::tr("Stationery");
506  case ShopLaundry: return GeoDataPlacemarkPrivate::tr("Laundry");
507  case ShopPet: return GeoDataPlacemarkPrivate::tr("Pet Shop");
508  case ShopToys: return GeoDataPlacemarkPrivate::tr("Toy Store");
509  case ShopTravelAgency: return GeoDataPlacemarkPrivate::tr("Travel Agency");
510  case ShopDeli: return GeoDataPlacemarkPrivate::tr("Deli");
511  case ShopTobacco: return GeoDataPlacemarkPrivate::tr("Tobacco Shop");
512  case ShopTea: return GeoDataPlacemarkPrivate::tr("Tea Shop");
513  case ShopComputer: return GeoDataPlacemarkPrivate::tr("Computer Shop");
514  case ShopGardenCentre: return GeoDataPlacemarkPrivate::tr("Garden Centre");
515  case Shop: return GeoDataPlacemarkPrivate::tr("Shop");
516  case ManmadeBridge: return GeoDataPlacemarkPrivate::tr("Bridge");
517  case ManmadeLighthouse: return GeoDataPlacemarkPrivate::tr("Lighthouse");
518  case ManmadePier: return GeoDataPlacemarkPrivate::tr("Pier");
519  case ManmadeWaterTower: return GeoDataPlacemarkPrivate::tr("Water Tower");
520  case ManmadeWindMill: return GeoDataPlacemarkPrivate::tr("Wind Mill");
521  case ManmadeCommunicationsTower: return GeoDataPlacemarkPrivate::tr("Communications Tower");
522  case TourismAttraction: return GeoDataPlacemarkPrivate::tr("Tourist Attraction");
523  case TourismArtwork: return GeoDataPlacemarkPrivate::tr("Artwork");
524  case HistoricCastle: return GeoDataPlacemarkPrivate::tr("Castle");
525  case AmenityCinema: return GeoDataPlacemarkPrivate::tr("Cinema");
526  case TourismInformation: return GeoDataPlacemarkPrivate::tr("Information");
527  case HistoricMonument: return GeoDataPlacemarkPrivate::tr("Monument");
528  case TourismMuseum: return GeoDataPlacemarkPrivate::tr("Museum");
529  case HistoricRuins: return GeoDataPlacemarkPrivate::tr("Ruin");
530  case AmenityTheatre: return GeoDataPlacemarkPrivate::tr("Theatre");
531  case TourismThemePark: return GeoDataPlacemarkPrivate::tr("Theme Park");
532  case TourismViewPoint: return GeoDataPlacemarkPrivate::tr("View Point");
533  case TourismZoo: return GeoDataPlacemarkPrivate::tr("Zoo");
534  case TourismAlpineHut: return GeoDataPlacemarkPrivate::tr("Alpine Hut");
535  case TourismWildernessHut: return GeoDataPlacemarkPrivate::tr("Wilderness Hut");
536  case HistoricMemorial: return GeoDataPlacemarkPrivate::tr("Memorial");
537  case TransportAerodrome: return GeoDataPlacemarkPrivate::tr("Aerodrome");
538  case TransportHelipad: return GeoDataPlacemarkPrivate::tr("Helipad");
539  case TransportAirportGate: return GeoDataPlacemarkPrivate::tr("Airport Gate");
540  case TransportAirportRunway: return GeoDataPlacemarkPrivate::tr("Airport Runway");
541  case TransportAirportApron: return GeoDataPlacemarkPrivate::tr("Airport Apron");
542  case TransportAirportTaxiway: return GeoDataPlacemarkPrivate::tr("Airport Taxiway");
543  case TransportAirportTerminal: return GeoDataPlacemarkPrivate::tr("Airport Terminal");
544  case TransportBusStation: return GeoDataPlacemarkPrivate::tr("Bus Station");
545  case TransportBusStop: return GeoDataPlacemarkPrivate::tr("Bus Stop");
546  case TransportCarShare: return GeoDataPlacemarkPrivate::tr("Car Sharing");
547  case TransportFuel: return GeoDataPlacemarkPrivate::tr("Gas Station");
548  case TransportParking: return GeoDataPlacemarkPrivate::tr("Parking");
549  case TransportParkingSpace: return GeoDataPlacemarkPrivate::tr("Parking Space");
550  case TransportPlatform: return GeoDataPlacemarkPrivate::tr("Platform");
551  case TransportRentalBicycle: return GeoDataPlacemarkPrivate::tr("Bicycle Rental");
552  case TransportRentalCar: return GeoDataPlacemarkPrivate::tr("Car Rental");
553  case TransportRentalSki: return GeoDataPlacemarkPrivate::tr("Ski Rental");
554  case TransportTaxiRank: return GeoDataPlacemarkPrivate::tr("Taxi Rank");
555  case TransportTrainStation: return GeoDataPlacemarkPrivate::tr("Train Station");
556  case TransportTramStop: return GeoDataPlacemarkPrivate::tr("Tram Stop");
557  case TransportBicycleParking: return GeoDataPlacemarkPrivate::tr("Bicycle Parking");
558  case TransportMotorcycleParking: return GeoDataPlacemarkPrivate::tr("Motorcycle Parking");
559  case TransportSubwayEntrance: return GeoDataPlacemarkPrivate::tr("Subway Entrance");
560  case TransportSpeedCamera: return GeoDataPlacemarkPrivate::tr("Speed Camera");
561  case ReligionPlaceOfWorship: return GeoDataPlacemarkPrivate::tr("Place Of Worship");
562  case ReligionBahai: return GeoDataPlacemarkPrivate::tr("Bahai");
563  case ReligionBuddhist: return GeoDataPlacemarkPrivate::tr("Buddhist");
564  case ReligionChristian: return GeoDataPlacemarkPrivate::tr("Christian");
565  case ReligionMuslim: return GeoDataPlacemarkPrivate::tr("Muslim");
566  case ReligionHindu: return GeoDataPlacemarkPrivate::tr("Hindu");
567  case ReligionJain: return GeoDataPlacemarkPrivate::tr("Jain");
568  case ReligionJewish: return GeoDataPlacemarkPrivate::tr("Jewish");
569  case ReligionShinto: return GeoDataPlacemarkPrivate::tr("Shinto");
570  case ReligionSikh: return GeoDataPlacemarkPrivate::tr("Sikh");
571  case ReligionTaoist: return GeoDataPlacemarkPrivate::tr("Taoist");
572  case LeisureGolfCourse: return GeoDataPlacemarkPrivate::tr("Golf Course");
573  case LeisureMarina: return GeoDataPlacemarkPrivate::tr("Marina");
574  case LeisurePark: return GeoDataPlacemarkPrivate::tr("Park");
575  case LeisurePlayground: return GeoDataPlacemarkPrivate::tr("Playground");
576  case LeisurePitch: return GeoDataPlacemarkPrivate::tr("Pitch");
577  case LeisureSportsCentre: return GeoDataPlacemarkPrivate::tr("Sports Centre");
578  case LeisureStadium: return GeoDataPlacemarkPrivate::tr("Stadium");
579  case LeisureTrack: return GeoDataPlacemarkPrivate::tr("Track");
580  case LeisureSwimmingPool: return GeoDataPlacemarkPrivate::tr("Swimming Pool");
581  case LeisureMinigolfCourse: return GeoDataPlacemarkPrivate::tr("Miniature Golf Course");
582  case LanduseAllotments: return GeoDataPlacemarkPrivate::tr("Allotments");
583  case LanduseBasin: return GeoDataPlacemarkPrivate::tr("Basin");
584  case LanduseCemetery: return GeoDataPlacemarkPrivate::tr("Cemetery");
585  case LanduseCommercial: return GeoDataPlacemarkPrivate::tr("Commercial");
586  case LanduseConstruction: return GeoDataPlacemarkPrivate::tr("Construction");
587  case LanduseFarmland: return GeoDataPlacemarkPrivate::tr("Farmland");
588  case LanduseFarmyard: return GeoDataPlacemarkPrivate::tr("Farmyard");
589  case LanduseGarages: return GeoDataPlacemarkPrivate::tr("Garages");
590  case LanduseGrass: return GeoDataPlacemarkPrivate::tr("Grass");
591  case LanduseIndustrial: return GeoDataPlacemarkPrivate::tr("Industrial");
592  case LanduseLandfill: return GeoDataPlacemarkPrivate::tr("Landfill");
593  case LanduseMeadow: return GeoDataPlacemarkPrivate::tr("Meadow");
594  case LanduseMilitary: return GeoDataPlacemarkPrivate::tr("Military");
595  case LanduseQuarry: return GeoDataPlacemarkPrivate::tr("Quarry");
596  case LanduseRailway: return GeoDataPlacemarkPrivate::tr("Railway");
597  case LanduseReservoir: return GeoDataPlacemarkPrivate::tr("Reservoir");
598  case LanduseResidential: return GeoDataPlacemarkPrivate::tr("Residential");
599  case LanduseRetail: return GeoDataPlacemarkPrivate::tr("Retail");
600  case LanduseOrchard: return GeoDataPlacemarkPrivate::tr("Orchard");
601  case LanduseVineyard: return GeoDataPlacemarkPrivate::tr("Vineyard");
602  case RailwayRail: return GeoDataPlacemarkPrivate::tr("Rail");
603  case RailwayNarrowGauge: return GeoDataPlacemarkPrivate::tr("Narrow Gauge");
604  case RailwayTram: return GeoDataPlacemarkPrivate::tr("Tram");
605  case RailwayLightRail: return GeoDataPlacemarkPrivate::tr("Light Rail");
606  case RailwayAbandoned: return GeoDataPlacemarkPrivate::tr("Abandoned Railway");
607  case RailwaySubway: return GeoDataPlacemarkPrivate::tr("Subway");
608  case RailwayPreserved: return GeoDataPlacemarkPrivate::tr("Preserved Railway");
609  case RailwayMiniature: return GeoDataPlacemarkPrivate::tr("Miniature Railway");
610  case RailwayConstruction: return GeoDataPlacemarkPrivate::tr("Railway Construction");
611  case RailwayMonorail: return GeoDataPlacemarkPrivate::tr("Monorail");
612  case RailwayFunicular: return GeoDataPlacemarkPrivate::tr("Funicular Railway");
613  case PowerTower: return GeoDataPlacemarkPrivate::tr("Power Tower");
614  case AerialwayStation: return GeoDataPlacemarkPrivate::tr("Aerialway Station");
615  case AerialwayPylon: return GeoDataPlacemarkPrivate::tr("Pylon", "A pylon supporting the aerialway cable e.g. on a ski lift");
616  case AerialwayCableCar: return GeoDataPlacemarkPrivate::tr("Cable Car");
617  case AerialwayGondola: return GeoDataPlacemarkPrivate::tr("Gondola");
618  case AerialwayChairLift: return GeoDataPlacemarkPrivate::tr("Chair Lift");
619  case AerialwayMixedLift: return GeoDataPlacemarkPrivate::tr("Mixed Lift");
620  case AerialwayDragLift: return GeoDataPlacemarkPrivate::tr("Drag Lift");
621  case AerialwayTBar: return GeoDataPlacemarkPrivate::tr("T-Bar");
622  case AerialwayJBar: return GeoDataPlacemarkPrivate::tr("J-Bar");
623  case AerialwayPlatter: return GeoDataPlacemarkPrivate::tr("Platter");
624  case AerialwayRopeTow: return GeoDataPlacemarkPrivate::tr("Rope Tow");
625  case AerialwayMagicCarpet: return GeoDataPlacemarkPrivate::tr("Magic Carpet");
626  case AerialwayZipLine: return GeoDataPlacemarkPrivate::tr("Zip Line");
627  case AerialwayGoods: return GeoDataPlacemarkPrivate::tr("Goods");
628  case PisteDownhill: return GeoDataPlacemarkPrivate::tr("Downhill Piste");
629  case PisteNordic: return GeoDataPlacemarkPrivate::tr("Nordic Piste");
630  case PisteSkitour: return GeoDataPlacemarkPrivate::tr("Skitour");
631  case PisteSled: return GeoDataPlacemarkPrivate::tr("Sled Piste");
632  case PisteHike: return GeoDataPlacemarkPrivate::tr("Winter Hike");
633  case PisteSleigh: return GeoDataPlacemarkPrivate::tr("Sleigh Piste");
634  case PisteIceSkate: return GeoDataPlacemarkPrivate::tr("Ice Skate");
635  case PisteSnowPark: return GeoDataPlacemarkPrivate::tr("Snow Park");
636  case PistePlayground: return GeoDataPlacemarkPrivate::tr("Ski Playground");
637  case PisteSkiJump: return GeoDataPlacemarkPrivate::tr("Ski Jump");
638  case AdminLevel1: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 1)");
639  case AdminLevel2: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 2)");
640  case AdminLevel3: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 3)");
641  case AdminLevel4: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 4)");
642  case AdminLevel5: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 5)");
643  case AdminLevel6: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 6)");
644  case AdminLevel7: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 7)");
645  case AdminLevel8: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 8)");
646  case AdminLevel9: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 9)");
647  case AdminLevel10: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 10)");
648  case AdminLevel11: return GeoDataPlacemarkPrivate::tr("Admin Boundary (Level 11)");
649  case BoundaryMaritime: return GeoDataPlacemarkPrivate::tr("Boundary (Maritime)");
650  case Landmass: return GeoDataPlacemarkPrivate::tr("Land Mass");
651  case UrbanArea: return GeoDataPlacemarkPrivate::tr("Urban Area");
652  case InternationalDateLine: return GeoDataPlacemarkPrivate::tr("International Date Line");
653  case Bathymetry: return GeoDataPlacemarkPrivate::tr("Bathymetry");
654  case WaterwayCanal: return GeoDataPlacemarkPrivate::tr("Canal");
655  case WaterwayDrain: return GeoDataPlacemarkPrivate::tr("Drain");
656  case WaterwayDitch: return GeoDataPlacemarkPrivate::tr("Ditch");
657  case WaterwayStream: return GeoDataPlacemarkPrivate::tr("Stream");
658  case WaterwayRiver: return GeoDataPlacemarkPrivate::tr("River");
659  case WaterwayWeir: return GeoDataPlacemarkPrivate::tr("Weir");
660  case CrossingSignals: return GeoDataPlacemarkPrivate::tr("Crosswalk");
661  case CrossingIsland: return GeoDataPlacemarkPrivate::tr("Crosswalk");
662  case CrossingZebra: return GeoDataPlacemarkPrivate::tr("Crosswalk");
663  case CrossingRailway: return GeoDataPlacemarkPrivate::tr("Railway Crossing");
664  case IndoorDoor: return GeoDataPlacemarkPrivate::tr("Door");
665  case IndoorWall: return GeoDataPlacemarkPrivate::tr("Wall");
666  case IndoorRoom: return GeoDataPlacemarkPrivate::tr("Room");
667 
668  case Default:
669  case Unknown:
670  case None:
671  case LastIndex: return QString();
672  }
673 
674  return QString();
675 }
676 
678 {
679  Q_D(const GeoDataPlacemark);
680  return d->m_placemarkExtendedData ? d->m_placemarkExtendedData->m_area : -1.0;
681 }
682 
683 void GeoDataPlacemark::setArea( qreal area )
684 {
685  if (area == -1.0 && !d_func()->m_placemarkExtendedData) {
686  return; // nothing to do
687  }
688 
690  d->placemarkExtendedData().m_area = area;
691 }
692 
694 {
695  Q_D(const GeoDataPlacemark);
696  return d->m_population;
697 }
698 
699 void GeoDataPlacemark::setPopulation( qint64 population )
700 {
702  d->m_population = population;
703 }
704 
706 {
707  Q_D(const GeoDataPlacemark);
708  return d->m_placemarkExtendedData ? d->m_placemarkExtendedData->m_state : QString();
709 }
710 
712 {
713  if (state.isEmpty() && !d_func()->m_placemarkExtendedData) {
714  return; // nothing to do
715  }
716 
718  d->placemarkExtendedData().m_state = state;
719 }
720 
722 {
723  Q_D(const GeoDataPlacemark);
724  return d->m_placemarkExtendedData ? d->m_placemarkExtendedData->m_countrycode : QString();
725 }
726 
727 void GeoDataPlacemark::setCountryCode( const QString &countrycode )
728 {
729  if (countrycode.isEmpty() && !d_func()->m_placemarkExtendedData) {
730  return; // nothing to do
731  }
732 
734  d->placemarkExtendedData().m_countrycode = countrycode;
735 }
736 
738 {
739  Q_D(const GeoDataPlacemark);
740  return d->m_placemarkExtendedData ? d->m_placemarkExtendedData->m_isBalloonVisible : false;
741 }
742 
744 {
745  if (!visible && !d_func()->m_placemarkExtendedData) {
746  return; // nothing to do
747  }
748 
750  d->placemarkExtendedData().m_isBalloonVisible = visible;
751 }
752 
753 void GeoDataPlacemark::pack( QDataStream& stream ) const
754 {
755  Q_D(const GeoDataPlacemark);
756  GeoDataFeature::pack( stream );
757 
758  stream << d->placemarkExtendedData().m_countrycode;
759  stream << d->placemarkExtendedData().m_area;
760  stream << d->m_population;
761  if (d->m_geometry) {
762  stream << d->m_geometry->geometryId();
763  d->m_geometry->pack( stream );
764  }
765  else
766  {
767  stream << InvalidGeometryId;
768  }
769 }
770 
772 {
773  stream.writeStartElement( "placemark" );
774 
775  stream.writeEndElement();
776  return stream;
777 }
778 
779 QXmlStreamWriter& GeoDataPlacemark::operator <<( QXmlStreamWriter& stream ) const
780 {
781  pack( stream );
782  return stream;
783 }
784 
786 {
788  GeoDataFeature::unpack( stream );
789 
790  stream >> d->placemarkExtendedData().m_countrycode;
791  stream >> d->placemarkExtendedData().m_area;
792  stream >> d->m_population;
793  int geometryId;
794  stream >> geometryId;
795  GeoDataGeometry *geometry = nullptr;
796  switch( geometryId ) {
797  case InvalidGeometryId:
798  break;
799  case GeoDataPointId:
800  {
801  GeoDataPoint* point = new GeoDataPoint;
802  point->unpack( stream );
803  geometry = point;
804  }
805  break;
806  case GeoDataLineStringId:
807  {
808  GeoDataLineString* lineString = new GeoDataLineString;
809  lineString->unpack( stream );
810  geometry = lineString;
811  }
812  break;
813  case GeoDataLinearRingId:
814  {
815  GeoDataLinearRing* linearRing = new GeoDataLinearRing;
816  linearRing->unpack( stream );
817  geometry = linearRing;
818  }
819  break;
820  case GeoDataPolygonId:
821  {
822  GeoDataPolygon* polygon = new GeoDataPolygon;
823  polygon->unpack( stream );
824  geometry = polygon;
825  }
826  break;
827  case GeoDataMultiGeometryId:
828  {
829  GeoDataMultiGeometry* multiGeometry = new GeoDataMultiGeometry;
830  multiGeometry->unpack( stream );
831  geometry = multiGeometry;
832  }
833  break;
834  case GeoDataModelId:
835  break;
836  default: break;
837  };
838  if (geometry) {
839  delete d->m_geometry;
840  d->m_geometry = geometry;
841  d->m_geometry->setParent(this);
842  }
843 }
844 
845 }
A 3d point representation.
QTextStream & right(QTextStream &stream)
void setState(const QString &state)
Set the state state of the placemark.
void writeEndElement()
void geoCoordinates(qreal &lon, qreal &lat, GeoDataCoordinates::Unit unit) const
use this function to get the longitude and latitude with one call - use the unit parameter to switch ...
A polygon that can have "holes".
void setBalloonVisible(bool visible)
Set visibility of the balloon.
QTextStream & left(QTextStream &stream)
qint64 population() const
Return the population of the placemark.
A base class for all geodata features.
void setVisualCategory(GeoDataVisualCategory index)
Sets the symbol category of the placemark.
A Geometry object representing a 3d point.
Definition: GeoDataPoint.h:42
GeoDataFeature * clone() const override
Duplicate into another equal instance.
void setArea(qreal area)
Set the area size of the feature in square km.
const QString countryCode() const
Return the country code of the placemark.
void setPopulation(qint64 population)
Sets the population of the placemark.
bool operator==(const GeoDataPlacemark &other) const
Equality operators.
QLocale system()
A LineString that allows to store a contiguous set of line segments.
GeoDataVisualCategory visualCategory() const
Return the symbol index of the placemark.
A base class for all geodata features.
QString name() const
The name of the feature.
void pack(QDataStream &stream) const override
Serialize the contents of the feature to stream.
const GeoDataLookAt * lookAt() const
Returns GeoDataLookAt object if lookAt is setup earlier otherwise It will convert GeoDataCoordinates ...
qreal area() const
Return the area size of the feature in square km.
bool isEmpty() const const
void setParent(GeoDataObject *parent)
Sets the parent of the object.
const QString state() const
Return the state of the placemark.
GeoDataCoordinates coordinate(const QDateTime &dateTime=QDateTime(), bool *iconAtCoordinates=nullptr) const
Return the coordinates of the placemark at time dateTime as a GeoDataCoordinates.
GeoDataVisualCategory
A categorization of a placemark as defined by ...FIXME.
void unpack(QDataStream &stream) override
Unserialize the contents of the feature from stream.
bool isBalloonVisible() const
Returns whether balloon is visible or not.
QHash< QString, QString >::const_iterator tagsBegin() const
iterators for the tags hash.
Binds a QML item to a specific geodetic location in screen coordinates.
This class is used to encapsulate the osm data fields kept within a placemark's extendedData.
void pack(QDataStream &stream) const override
Serialize the Placemark to a data stream.
a class representing a point of interest on the map
const char * nodeType() const override
Provides type information for downcasting a GeoNode.
const GeoDataAbstractView * abstractView() const
Get the Abstract view of the feature.
GeoDataGeometry * geometry()
The geometry of the GeoDataPlacemark is to be rendered to the marble map along with the icon at the c...
Unit
enum used constructor to specify the units used
void unpack(QDataStream &stream) override
Unserialize the LineString from a stream.
QStringList uiLanguages() const const
OsmPlacemarkData & osmData()
Quick, safe accessor to the placemark's OsmPlacemarkData stored within it's ExtendedData.
void setCoordinate(qreal longitude, qreal latitude, qreal altitude=0, GeoDataCoordinates::Unit _unit=GeoDataCoordinates::Radian)
Set the coordinate of the placemark in longitude and latitude.
QString displayName() const
displays the name of a place in the locale language of the user
void unpack(QDataStream &stream) override
Unserialize the Polygon from a stream.
GeoDataPlacemark()
Create a new placemark.
Represents a coordinate with the properties of a name and coordinates.
Definition: Coordinate.h:18
QVector::const_iterator constBegin() const const
void setGeometry(GeoDataGeometry *entry)
Sets the current Geometry of this Placemark.
void writeStartElement(const QString &qualifiedName)
A class that can contain other GeoDataGeometry objects.
A LinearRing that allows to store a closed, contiguous set of line segments.
Q_D(Todo)
void unpack(QDataStream &stream) override
Deserialize the Placemark from a data stream.
~GeoDataPlacemark() override
Delete the placemark.
void setCountryCode(const QString &code)
Set the country code of the placemark.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Feb 7 2023 03:59:08 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.