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

marble

  • Marble
  • GeoDataPlacemark
Public Member Functions | List of all members
Marble::GeoDataPlacemark Class Reference

#include <GeoDataPlacemark.h>

Inheritance diagram for Marble::GeoDataPlacemark:
Inheritance graph
[legend]

Public Member Functions

 GeoDataPlacemark ()
 
 GeoDataPlacemark (const GeoDataPlacemark &placemark)
 
 GeoDataPlacemark (const QString &name)
 
 ~GeoDataPlacemark ()
 
qreal area () const
 
GeoDataCoordinates coordinate (const QDateTime &dateTime=QDateTime(), bool *iconAtCoordinates=0) const
 
void coordinate (qreal &longitude, qreal &latitude, qreal &altitude) const
 
const QString countryCode () const
 
GeoDataGeometry * geometry ()
 
const GeoDataGeometry * geometry () const
 
bool isBalloonVisible () const
 
const GeoDataLookAt * lookAt () const
 
GeoDataLookAt * lookAt ()
 
 MARBLE_DEPRECATED (void setCoordinate(const GeoDataPoint &point))
 
bool operator!= (const GeoDataPlacemark &other) const
 
virtual QXmlStreamWriter & operator<< (QXmlStreamWriter &stream) const
 
bool operator== (const GeoDataPlacemark &other) const
 
virtual void pack (QDataStream &stream) const
 
virtual QXmlStreamWriter & pack (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 setPopulation (qint64 population)
 
void setState (const QString &state)
 
const QString state () const
 
virtual void unpack (QDataStream &stream)
 
- Public Member Functions inherited from Marble::GeoDataFeature
 GeoDataFeature ()
 
 GeoDataFeature (const QString &name)
 
 GeoDataFeature (const GeoDataFeature &other)
 
virtual ~GeoDataFeature ()
 
const GeoDataAbstractView * abstractView () const
 
GeoDataAbstractView * abstractView ()
 
QString address () const
 
const GeoDataStyle * customStyle () const
 
QString description () const
 
bool descriptionIsCDATA () const
 
virtual void detach ()
 
GeoDataExtendedData & extendedData () const
 
EnumFeatureId featureId () const
 
bool isGloballyVisible () const
 
bool isVisible () const
 
QString name () const
 
virtual const char * nodeType () const
 
GeoDataFeature & operator= (const GeoDataFeature &other)
 
QString phoneNumber () const
 
qint64 popularity () const
 
GeoDataRegion & region () const
 
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 (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 setVisualCategory (GeoDataVisualCategory category)
 
void setZoomLevel (int index)
 
GeoDataSnippet snippet () const
 
const GeoDataStyle * style () const
 
const GeoDataStyleMap * styleMap () const
 
QString styleUrl () const
 
const GeoDataTimeSpan & timeSpan () const
 
GeoDataTimeSpan & timeSpan ()
 
const GeoDataTimeStamp & timeStamp () const
 
GeoDataTimeStamp & timeStamp ()
 
GeoDataVisualCategory visualCategory () const
 
int zoomLevel () const
 
- Public Member Functions inherited from Marble::GeoDataObject
 GeoDataObject ()
 
 GeoDataObject (const GeoDataObject &)
 
virtual ~GeoDataObject ()
 
QString id () const
 
GeoDataObject & operator= (const GeoDataObject &)
 
virtual GeoDataObject * parent () const
 
QString resolvePath (const QString &relativePath) const
 
void setId (const QString &value)
 
virtual void setParent (GeoDataObject *parent)
 
void setTargetId (const QString &value)
 
QString targetId () const
 
- Public Member Functions inherited from Marble::GeoNode
 GeoNode ()
 
virtual ~GeoNode ()
 
- Public Member Functions inherited from Marble::Serializable
virtual ~Serializable ()
 

Additional Inherited Members

- Public Types inherited from Marble::GeoDataFeature
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, Wikipedia, OsmSite,
  Coordinate, MannedLandingSite, RoboticRover, UnmannedSoftLandingSite,
  UnmannedHardLandingSite, Folder, Bookmark, NaturalWater,
  NaturalWood, HighwaySteps, HighwayUnknown, HighwayPath,
  HighwayTrack, HighwayPedestrian, HighwayService, HighwayRoad,
  HighwayTertiaryLink, HighwayTertiary, HighwaySecondaryLink, HighwaySecondary,
  HighwayPrimaryLink, HighwayPrimary, HighwayTrunkLink, HighwayTrunk,
  HighwayMotorwayLink, HighwayMotorway, Building, AccomodationCamping,
  AccomodationHostel, AccomodationHotel, AccomodationMotel, AccomodationYouthHostel,
  AmenityLibrary, EducationCollege, EducationSchool, EducationUniversity,
  FoodBar, FoodBiergarten, FoodCafe, FoodFastFood,
  FoodPub, FoodRestaurant, HealthDoctors, HealthHospital,
  HealthPharmacy, MoneyAtm, MoneyBank, ShoppingBeverages,
  ShoppingHifi, ShoppingSupermarket, TouristAttraction, TouristCastle,
  TouristCinema, TouristMonument, TouristMuseum, TouristRuin,
  TouristTheatre, TouristThemePark, TouristViewPoint, TouristZoo,
  TransportAerodrome, TransportAirportTerminal, TransportBusStation, TransportBusStop,
  TransportCarShare, TransportFuel, TransportParking, TransportRentalBicycle,
  TransportRentalCar, TransportTaxiRank, TransportTrainStation, TransportTramStop,
  ReligionPlaceOfWorship, ReligionBahai, ReligionBuddhist, ReligionChristian,
  ReligionHindu, ReligionJain, ReligionJewish, ReligionShinto,
  ReligionSikh, LeisurePark, LanduseAllotments, LanduseBasin,
  LanduseCemetery, LanduseCommercial, LanduseConstruction, LanduseFarmland,
  LanduseFarmyard, LanduseGarages, LanduseGrass, LanduseIndustrial,
  LanduseLandfill, LanduseMeadow, LanduseMilitary, LanduseQuarry,
  LanduseRailway, LanduseReservoir, LanduseResidential, LanduseRetail,
  RailwayRail, RailwayTram, RailwayLightRail, RailwayAbandoned,
  RailwaySubway, RailwayPreserved, RailwayMiniature, RailwayConstruction,
  RailwayMonorail, RailwayFunicular, Satellite, LastIndex
}
 
- Static Public Member Functions inherited from Marble::GeoDataFeature
static QFont defaultFont ()
 
static QColor defaultLabelColor ()
 
static GeoDataVisualCategory OsmVisualCategory (const QString &keyValue)
 
static void resetDefaultStyles ()
 
static void setDefaultFont (const QFont &font)
 
static void setDefaultLabelColor (const QColor &color)
 
- Protected Member Functions inherited from Marble::GeoDataFeature
 GeoDataFeature (GeoDataFeaturePrivate *priv)
 
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 * d
 

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 54 of file GeoDataPlacemark.h.

Constructor & Destructor Documentation

Marble::GeoDataPlacemark::GeoDataPlacemark ( )

Create a new placemark.

Definition at line 31 of file GeoDataPlacemark.cpp.

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

Create a new placemark from existing placemark placemark.

Definition at line 37 of file GeoDataPlacemark.cpp.

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

Create a new placemark with the given name.

Definition at line 44 of file GeoDataPlacemark.cpp.

Marble::GeoDataPlacemark::~GeoDataPlacemark ( )

Delete the placemark.

Definition at line 51 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 238 of file GeoDataPlacemark.cpp.

GeoDataCoordinates Marble::GeoDataPlacemark::coordinate ( const QDateTime &  dateTime = QDateTime(),
bool *  iconAtCoordinates = 0 
) 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 172 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 210 of file GeoDataPlacemark.cpp.

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

Return the country code of the placemark.

Definition at line 271 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 152 of file GeoDataPlacemark.cpp.

const GeoDataGeometry * Marble::GeoDataPlacemark::geometry ( ) const

Definition at line 157 of file GeoDataPlacemark.cpp.

bool Marble::GeoDataPlacemark::isBalloonVisible ( ) const

Returns whether balloon is visible or not.

Definition at line 282 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 162 of file GeoDataPlacemark.cpp.

GeoDataLookAt * Marble::GeoDataPlacemark::lookAt ( )

Definition at line 167 of file GeoDataPlacemark.cpp.

Marble::GeoDataPlacemark::MARBLE_DEPRECATED ( void   setCoordinateconst GeoDataPoint &point)
bool Marble::GeoDataPlacemark::operator!= ( const GeoDataPlacemark &  other) const

Definition at line 137 of file GeoDataPlacemark.cpp.

QXmlStreamWriter & Marble::GeoDataPlacemark::operator<< ( QXmlStreamWriter &  stream) const
virtual

Definition at line 319 of file GeoDataPlacemark.cpp.

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

Equality operators.

Definition at line 55 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::pack ( QDataStream &  stream) const
virtual

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.

Reimplemented from Marble::GeoDataFeature.

Definition at line 293 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 311 of file GeoDataPlacemark.cpp.

qint64 Marble::GeoDataPlacemark::population ( ) const

Return the population of the placemark.

Definition at line 249 of file GeoDataPlacemark.cpp.

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

Set the area size of the feature in square km.

Definition at line 243 of file GeoDataPlacemark.cpp.

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

Set visibility of the balloon.

Definition at line 287 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 215 of file GeoDataPlacemark.cpp.

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

Set the coordinate of the placemark with an GeoDataPoint.

Definition at line 220 of file GeoDataPlacemark.cpp.

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

Set the country code of the placemark.

Definition at line 276 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 230 of file GeoDataPlacemark.cpp.

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

Sets the population of the placemark.

Parameters
populationthe new population value

Definition at line 254 of file GeoDataPlacemark.cpp.

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

Set the state state of the placemark.

Definition at line 265 of file GeoDataPlacemark.cpp.

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

Return the state of the placemark.

Definition at line 260 of file GeoDataPlacemark.cpp.

void Marble::GeoDataPlacemark::unpack ( QDataStream &  stream)
virtual

Deserialize the Placemark from a data stream.

This has the opposite effect from

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

Reimplemented from Marble::GeoDataFeature.

Definition at line 325 of file GeoDataPlacemark.cpp.


The documentation for this class was generated from the following files:
  • GeoDataPlacemark.h
  • GeoDataPlacemark.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:45 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