Marble::GeoDataPlacemark

#include <GeoDataPlacemark.h>

Inheritance diagram for Marble::GeoDataPlacemark:

Public Types

enum  GeoDataVisualCategory {
  None, Default, Unknown, SmallCity,
  SmallCountyCapital, SmallStateCapital, SmallNationCapital, MediumCity,
  MediumCountyCapital, MediumStateCapital, MediumNationCapital, BigCity,
  BigCountyCapital, BigStateCapital, BigNationCapital, LargeCity,
  LargeCountyCapital, LargeStateCapital, LargeNationCapital, Nation,
  Mountain, Volcano, Mons, Valley,
  Continent, Ocean, OtherTerrain, Crater,
  Mare, GeographicPole, MagneticPole, ShipWreck,
  AirPort, Observatory, MilitaryDangerArea, OsmSite,
  Coordinate, MannedLandingSite, RoboticRover, UnmannedSoftLandingSite,
  UnmannedHardLandingSite, Bookmark, Satellite, PlaceCity,
  PlaceCityCapital, PlaceCityNationalCapital, PlaceSuburb, PlaceHamlet,
  PlaceLocality, PlaceTown, PlaceTownCapital, PlaceTownNationalCapital,
  PlaceVillage, PlaceVillageCapital, PlaceVillageNationalCapital, NaturalWater,
  NaturalReef, NaturalWood, NaturalBeach, NaturalWetland,
  NaturalGlacier, NaturalIceShelf, NaturalScrub, NaturalCliff,
  NaturalHeath, HighwayTrafficSignals, HighwayElevator, HighwaySteps,
  HighwayUnknown, HighwayPath, HighwayFootway, HighwayTrack,
  HighwayPedestrian, HighwayCorridor, HighwayCycleway, HighwayService,
  HighwayRoad, HighwayResidential, HighwayLivingStreet, HighwayUnclassified,
  HighwayTertiaryLink, HighwayTertiary, HighwaySecondaryLink, HighwaySecondary,
  HighwayPrimaryLink, HighwayPrimary, HighwayRaceway, HighwayTrunkLink,
  HighwayTrunk, HighwayMotorwayLink, HighwayMotorway, Building,
  AccomodationCamping, AccomodationHostel, AccomodationHotel, AccomodationMotel,
  AccomodationYouthHostel, AccomodationGuestHouse, EducationCollege, EducationSchool,
  EducationUniversity, FoodBar, FoodBiergarten, FoodCafe,
  FoodFastFood, FoodPub, FoodRestaurant, HealthDentist,
  HealthDoctors, HealthHospital, HealthPharmacy, HealthVeterinary,
  MoneyAtm, MoneyBank, AmenityLibrary, AmenityKindergarten,
  AmenityEmbassy, AmenityEmergencyPhone, AmenityMountainRescue, AmenityCommunityCentre,
  AmenityCinema, AmenityFountain, AmenityNightClub, AmenityBench,
  AmenityCourtHouse, AmenityFireStation, AmenityHuntingStand, AmenityPolice,
  AmenityPostBox, AmenityPostOffice, AmenityPrison, AmenityRecycling,
  AmenityShelter, AmenityTelephone, AmenityTheatre, AmenityToilets,
  AmenityTownHall, AmenityWasteBasket, AmenityDrinkingWater, AmenityGraveyard,
  AmenityChargingStation, AmenityCarWash, AmenitySocialFacility, BarrierCityWall,
  BarrierGate, BarrierLiftGate, BarrierWall, NaturalPeak,
  NaturalVolcano, NaturalTree, NaturalCave, ShopBeverages,
  ShopHifi, ShopSupermarket, ShopAlcohol, ShopBakery,
  ShopButcher, ShopConfectionery, ShopConvenience, ShopGreengrocer,
  ShopSeafood, ShopDepartmentStore, ShopKiosk, ShopBag,
  ShopClothes, ShopFashion, ShopJewelry, ShopShoes,
  ShopVarietyStore, ShopBeauty, ShopChemist, ShopCosmetics,
  ShopHairdresser, ShopOptician, ShopPerfumery, ShopDoitYourself,
  ShopFlorist, ShopHardware, ShopFurniture, ShopElectronics,
  ShopMobilePhone, ShopBicycle, ShopCar, ShopCarRepair,
  ShopCarParts, ShopMotorcycle, ShopOutdoor, ShopSports,
  ShopCopy, ShopArt, ShopMusicalInstrument, ShopPhoto,
  ShopBook, ShopGift, ShopStationery, ShopLaundry,
  ShopPet, ShopToys, ShopTravelAgency, ShopDeli,
  ShopTobacco, ShopTea, ShopComputer, ShopGardenCentre,
  Shop, ManmadeBridge, ManmadeLighthouse, ManmadePier,
  ManmadeWaterTower, ManmadeWindMill, ManmadeCommunicationsTower, TourismArtwork,
  TourismAttraction, TourismInformation, TourismMuseum, TourismThemePark,
  TourismViewPoint, TourismZoo, TourismAlpineHut, TourismWildernessHut,
  HistoricArchaeologicalSite, HistoricCastle, HistoricMemorial, HistoricMonument,
  HistoricRuins, TransportAerodrome, TransportHelipad, TransportAirportTerminal,
  TransportAirportGate, TransportAirportRunway, TransportAirportTaxiway, TransportAirportApron,
  TransportBusStation, TransportBusStop, TransportCarShare, TransportFuel,
  TransportParking, TransportParkingSpace, TransportPlatform, TransportRentalBicycle,
  TransportRentalCar, TransportRentalSki, TransportTaxiRank, TransportTrainStation,
  TransportTramStop, TransportBicycleParking, TransportMotorcycleParking, TransportSubwayEntrance,
  TransportSpeedCamera, ReligionPlaceOfWorship, ReligionBahai, ReligionBuddhist,
  ReligionChristian, ReligionMuslim, ReligionHindu, ReligionJain,
  ReligionJewish, ReligionShinto, ReligionSikh, ReligionTaoist,
  LeisureGolfCourse, LeisureMarina, LeisureWaterPark, LeisurePark,
  LeisurePlayground, LeisurePitch, LeisureSportsCentre, LeisureStadium,
  LeisureTrack, LeisureSwimmingPool, LeisureMinigolfCourse, LanduseAllotments,
  LanduseBasin, LanduseCemetery, LanduseCommercial, LanduseConstruction,
  LanduseFarmland, LanduseFarmyard, LanduseGarages, LanduseGrass,
  LanduseIndustrial, LanduseLandfill, LanduseMeadow, LanduseMilitary,
  LanduseQuarry, LanduseRailway, LanduseReservoir, LanduseResidential,
  LanduseRetail, LanduseOrchard, LanduseVineyard, RailwayRail,
  RailwayNarrowGauge, RailwayTram, RailwayLightRail, RailwayAbandoned,
  RailwaySubway, RailwayPreserved, RailwayMiniature, RailwayConstruction,
  RailwayMonorail, RailwayFunicular, PowerTower, AerialwayStation,
  AerialwayPylon, AerialwayCableCar, AerialwayGondola, AerialwayChairLift,
  AerialwayMixedLift, AerialwayDragLift, AerialwayTBar, AerialwayJBar,
  AerialwayPlatter, AerialwayRopeTow, AerialwayMagicCarpet, AerialwayZipLine,
  AerialwayGoods, PisteDownhill, PisteNordic, PisteSkitour,
  PisteSled, PisteHike, PisteSleigh, PisteIceSkate,
  PisteSnowPark, PistePlayground, PisteSkiJump, WaterwayCanal,
  WaterwayDitch, WaterwayDrain, WaterwayRiver, WaterwayWeir,
  WaterwayStream, CrossingSignals, CrossingIsland, CrossingZebra,
  CrossingRailway, AdminLevel1, AdminLevel2, AdminLevel3,
  AdminLevel4, AdminLevel5, AdminLevel6, AdminLevel7,
  AdminLevel8, AdminLevel9, AdminLevel10, AdminLevel11,
  BoundaryMaritime, IndoorDoor, IndoorWall, IndoorRoom,
  Landmass, UrbanArea, InternationalDateLine, Bathymetry,
  LastIndex
}
 

Public Member Functions

 GeoDataPlacemark ()
 
 GeoDataPlacemark (const GeoDataPlacemark &placemark)
 
 GeoDataPlacemark (const QString &name)
 
 ~GeoDataPlacemark () override
 
qreal area () const
 
QString categoryName () const
 
void clearOsmData ()
 
GeoDataFeatureclone () const override
 
GeoDataCoordinates coordinate (const QDateTime &dateTime=QDateTime(), bool *iconAtCoordinates=nullptr) const
 
void coordinate (qreal &longitude, qreal &latitude, qreal &altitude) const
 
const QString countryCode () const
 
QString displayName () const
 
GeoDataGeometrygeometry ()
 
const GeoDataGeometrygeometry () const
 
bool hasOsmData () const
 
bool isBalloonVisible () const
 
const GeoDataLookAt * lookAt () const
 
GeoDataLookAt * lookAt ()
 
const char * nodeType () const override
 
bool operator!= (const GeoDataPlacemark &other) const
 
virtual QXmlStreamWriteroperator<< (QXmlStreamWriter &stream) const
 
GeoDataPlacemarkoperator= (const GeoDataPlacemark &other)
 
bool operator== (const GeoDataPlacemark &other) const
 
OsmPlacemarkDataosmData ()
 
const OsmPlacemarkDataosmData () const
 
void pack (QDataStream &stream) const override
 
virtual QXmlStreamWriterpack (QXmlStreamWriter &stream) const
 
qint64 population () const
 
void setArea (qreal area)
 
void setBalloonVisible (bool visible)
 
void setCoordinate (qreal longitude, qreal latitude, qreal altitude=0, GeoDataCoordinates::Unit _unit=GeoDataCoordinates::Radian)
 
void setCoordinate (const GeoDataCoordinates &coordinate)
 
void setCountryCode (const QString &code)
 
void setGeometry (GeoDataGeometry *entry)
 
void setOsmData (const OsmPlacemarkData &osmData)
 
void setPopulation (qint64 population)
 
void setState (const QString &state)
 
void setVisualCategory (GeoDataVisualCategory index)
 
const QString state () const
 
void unpack (QDataStream &stream) override
 
GeoDataVisualCategory visualCategory () const
 
- Public Member Functions inherited from Marble::GeoDataFeature
 GeoDataFeature (const QString &name)
 
 GeoDataFeature (const GeoDataFeature &other)
 
const GeoDataAbstractViewabstractView () const
 
GeoDataAbstractViewabstractView ()
 
QString address () const
 
QSharedPointer< const GeoDataStylecustomStyle () const
 
QString description () const
 
bool descriptionIsCDATA () const
 
GeoDataExtendedDataextendedData ()
 
const GeoDataExtendedDataextendedData () const
 
EnumFeatureId featureId () const
 
bool isGloballyVisible () const
 
bool isVisible () const
 
QString name () const
 
bool operator!= (const GeoDataFeature &other) const
 
GeoDataFeatureoperator= (const GeoDataFeature &other)
 
bool operator== (const GeoDataFeature &other) const
 
void pack (QDataStream &stream) const override
 
QString phoneNumber () const
 
qint64 popularity () const
 
const GeoDataRegionregion () const
 
GeoDataRegionregion ()
 
const QString role () const
 
void setAbstractView (GeoDataAbstractView *abstractView)
 
void setAddress (const QString &value)
 
void setDescription (const QString &value)
 
void setDescriptionCDATA (bool cdata)
 
void setExtendedData (const GeoDataExtendedData &extendedData)
 
void setName (const QString &value)
 
void setPhoneNumber (const QString &value)
 
void setPopularity (qint64 popularity)
 
void setRegion (const GeoDataRegion &region)
 
void setRole (const QString &role)
 
void setSnippet (const GeoDataSnippet &value)
 
void setStyle (const QSharedPointer< GeoDataStyle > &style)
 
void setStyleMap (const GeoDataStyleMap *map)
 
void setStyleUrl (const QString &value)
 
void setTimeSpan (const GeoDataTimeSpan &timeSpan)
 
void setTimeStamp (const GeoDataTimeStamp &timeStamp)
 
void setVisible (bool value)
 
void setZoomLevel (int index)
 
GeoDataSnippet snippet () const
 
QSharedPointer< const GeoDataStylestyle () const
 
const GeoDataStyleMapstyleMap () const
 
QString styleUrl () const
 
const GeoDataTimeSpan & timeSpan () const
 
GeoDataTimeSpan & timeSpan ()
 
const GeoDataTimeStamp & timeStamp () const
 
GeoDataTimeStamp & timeStamp ()
 
void unpack (QDataStream &stream) override
 
int zoomLevel () const
 
- Public Member Functions inherited from Marble::GeoDataObject
 GeoDataObject (const GeoDataObject &)
 
QString id () const
 
GeoDataObjectoperator= (const GeoDataObject &)
 
void pack (QDataStream &stream) const override
 
const GeoDataObjectparent () const
 
GeoDataObjectparent ()
 
QString resolvePath (const QString &relativePath) const
 
void setId (const QString &value)
 
void setParent (GeoDataObject *parent)
 
void setTargetId (const QString &value)
 
QString targetId () const
 
void unpack (QDataStream &steam) override
 

Static Public Member Functions

static bool placemarkLayoutOrderCompare (const GeoDataPlacemark *a, const GeoDataPlacemark *b)
 

Additional Inherited Members

- Protected Member Functions inherited from Marble::GeoDataFeature
 GeoDataFeature (GeoDataFeaturePrivate *dd)
 
 GeoDataFeature (const GeoDataFeature &other, GeoDataFeaturePrivate *dd)
 
bool equals (const GeoDataFeature &other) const
 
- Protected Member Functions inherited from Marble::GeoDataObject
virtual bool equals (const GeoDataObject &other) const
 
- Protected Attributes inherited from Marble::GeoDataFeature
GeoDataFeaturePrivate *const d_ptr
 

Detailed Description

a class representing a point of interest on the map

This class represents a point of interest, e.g. a city or a mountain. It is filled with data by the KML or GPX loader and the PlacemarkModel makes use of it.

A Placemark can have an associated geometry which will be rendered to the map along with the placemark's point icon. If you would like to render more than one geometry for any one placemark than use

See also
setGeometry() to set add a
MultiGeometry.

This is more or less only a GeoDataFeature with a geographic position and a country code attached to it. The country code is not provided in a KML file.

Definition at line 53 of file GeoDataPlacemark.h.

Member Enumeration Documentation

A categorization of a placemark as defined by ...FIXME.

There is an additional osm tag mapping to GeoDataVisualCategory in OsmPlacemarkData

Enumerator
AmenityKindergarten 
Since
0.26.0
AmenityShelter 
Since
0.26.0
TransportAirportGate 
Since
0.26.0
TransportAirportRunway 
Since
0.26.0
TransportAirportTaxiway 
Since
0.26.0
TransportAirportApron 
Since
0.26.0
LeisureMarina 
Since
0.26.0
Bathymetry 
Since
0.26.0

Definition at line 93 of file GeoDataPlacemark.h.

Constructor & Destructor Documentation

Marble::GeoDataPlacemark::GeoDataPlacemark ( )

Create a new placemark.

Definition at line 40 of file GeoDataPlacemark.cpp.

Marble::GeoDataPlacemark::GeoDataPlacemark ( const GeoDataPlacemark placemark)

Create a new placemark from existing placemark placemark.

Definition at line 48 of file GeoDataPlacemark.cpp.

Marble::GeoDataPlacemark::GeoDataPlacemark ( const QString name)
explicit

Create a new placemark with the given name.

Definition at line 57 of file GeoDataPlacemark.cpp.

Marble::GeoDataPlacemark::~GeoDataPlacemark ( )
override

Delete the placemark.

Definition at line 65 of file GeoDataPlacemark.cpp.

Member Function Documentation

qreal Marble::GeoDataPlacemark::area ( ) const

Return the area size of the feature in square km.

FIXME: Once we make Marble more area-aware we need to move this into the GeoDataArea class which will get inherited from GeoDataPlacemark (or GeoDataFeature).

Definition at line 683 of file GeoDataPlacemark.cpp.

QString Marble::GeoDataPlacemark::categoryName ( ) const
Since
0.26.0

Definition at line 314 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::clearOsmData ( )
Since
0.26.0

Definition at line 187 of file GeoDataPlacemark.cpp.

GeoDataFeature * Marble::GeoDataPlacemark::clone ( ) const
overridevirtual

Duplicate into another equal instance.

Implements Marble::GeoDataFeature.

Definition at line 133 of file GeoDataPlacemark.cpp.

GeoDataCoordinates Marble::GeoDataPlacemark::coordinate ( const QDateTime dateTime = QDateTime(),
bool *  iconAtCoordinates = nullptr 
) const

Return the coordinates of the placemark at time dateTime as a GeoDataCoordinates.

The dateTime parameter should be used if the placemark geometry() is a GeoDataTrack and thus contains several coordinates associated with a date and time.

The iconAtCoordinates boolean is set to true if an icon should be drawn to represent the placemark at these coordinates as described in https://code.google.com/apis/kml/documentation/kmlreference.html#placemark, it is set to false otherwise.

See also
GeoDataTrack::GeoDataTrack

Definition at line 220 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::coordinate ( qreal &  longitude,
qreal &  latitude,
qreal &  altitude 
) const

Return the coordinates of the placemark as longitude, latitude and altitude.

Definition at line 270 of file GeoDataPlacemark.cpp.

const QString Marble::GeoDataPlacemark::countryCode ( ) const

Return the country code of the placemark.

Definition at line 727 of file GeoDataPlacemark.cpp.

QString Marble::GeoDataPlacemark::displayName ( ) const

displays the name of a place in the locale language of the user

Definition at line 294 of file GeoDataPlacemark.cpp.

GeoDataGeometry * Marble::GeoDataPlacemark::geometry ( )

The geometry of the GeoDataPlacemark is to be rendered to the marble map along with the icon at the coordinate associated with this Placemark.

Returns
a pointer to the current Geometry object

Definition at line 151 of file GeoDataPlacemark.cpp.

bool Marble::GeoDataPlacemark::isBalloonVisible ( ) const

Returns whether balloon is visible or not.

Definition at line 743 of file GeoDataPlacemark.cpp.

const GeoDataLookAt * Marble::GeoDataPlacemark::lookAt ( ) const

Returns GeoDataLookAt object if lookAt is setup earlier otherwise It will convert GeoDataCoordinates of Placemark to GeoDataLookAt with range equals to altitude of GeoDataCoordinate.

Definition at line 194 of file GeoDataPlacemark.cpp.

const char * Marble::GeoDataPlacemark::nodeType ( ) const
overridevirtual

Provides type information for downcasting a GeoNode.

Implements Marble::GeoNode.

Definition at line 127 of file GeoDataPlacemark.cpp.

bool Marble::GeoDataPlacemark::operator== ( const GeoDataPlacemark other) const

Equality operators.

Definition at line 83 of file GeoDataPlacemark.cpp.

OsmPlacemarkData & Marble::GeoDataPlacemark::osmData ( )

Quick, safe accessor to the placemark's OsmPlacemarkData stored within it's ExtendedData.

If the extendedData does not contain osmData, the function inserts a default-constructed one, and returns a reference to it.

Definition at line 175 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::pack ( QDataStream stream) const
override

Serialize the Placemark to a data stream.

This is a binary serialisation and is deserialised using

See also
unpack()
Parameters
streamthe QDataStream to serialise object to.

Definition at line 759 of file GeoDataPlacemark.cpp.

QXmlStreamWriter & Marble::GeoDataPlacemark::pack ( QXmlStreamWriter stream) const
virtual

Serialise this Placemark to a XML stream writer.

See also
QXmlStreamWriter in the Qt documentation for more info. This will output the XML representation of this Placemark. The default XML format is KML, to have other formats supported you need to create a subclass and override this method.
Parameters
streamthe XML Stream Reader to output to.

Definition at line 777 of file GeoDataPlacemark.cpp.

qint64 Marble::GeoDataPlacemark::population ( ) const

Return the population of the placemark.

Definition at line 699 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setArea ( qreal  area)

Set the area size of the feature in square km.

Definition at line 689 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setBalloonVisible ( bool  visible)

Set visibility of the balloon.

Definition at line 749 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setCoordinate ( qreal  longitude,
qreal  latitude,
qreal  altitude = 0,
GeoDataCoordinates::Unit  _unit = GeoDataCoordinates::Radian 
)

Set the coordinate of the placemark in longitude and latitude.

Definition at line 275 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setCoordinate ( const GeoDataCoordinates coordinate)

Set the coordinate of the placemark with an GeoDataPoint.

Definition at line 280 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setCountryCode ( const QString code)

Set the country code of the placemark.

Definition at line 733 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setGeometry ( GeoDataGeometry entry)

Sets the current Geometry of this Placemark.

See also
geometry() and the class overview for description of the geometry concept. The geometry can be set to any
GeoDataGeometry like
GeoDataPoint,
GeoDataLineString,
GeoDataLinearRing and
GeoDataMultiGeometry

Definition at line 285 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setPopulation ( qint64  population)

Sets the population of the placemark.

Parameters
populationthe new population value

Definition at line 705 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setState ( const QString state)

Set the state state of the placemark.

Definition at line 717 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::setVisualCategory ( GeoDataPlacemark::GeoDataVisualCategory  index)

Sets the symbol category of the placemark.

Parameters
indexthe new category to be used.

Definition at line 145 of file GeoDataPlacemark.cpp.

const QString Marble::GeoDataPlacemark::state ( ) const

Return the state of the placemark.

Definition at line 711 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::unpack ( QDataStream stream)
override

Deserialize the Placemark from a data stream.

This has the opposite effect from

See also
pack()
Parameters
streamthe QDataStream to deserialise from.

Definition at line 791 of file GeoDataPlacemark.cpp.

GeoDataPlacemark::GeoDataVisualCategory Marble::GeoDataPlacemark::visualCategory ( ) const

Return the symbol index of the placemark.

Definition at line 139 of file GeoDataPlacemark.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Sep 23 2020 23:21:00 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.