Marble::GeoDataFeature

Search for usage in LXR

#include <GeoDataFeature.h>

Inheritance diagram for Marble::GeoDataFeature:

Public Member Functions

 GeoDataFeature (const QString &name)
 
 GeoDataFeature (const GeoDataFeature &other)
 
const GeoDataAbstractViewabstractView () const
 
GeoDataAbstractViewabstractView ()
 
QString address () const
 
virtual GeoDataFeatureclone () const =0
 
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
 
- Public Member Functions inherited from Marble::GeoNode
virtual const char * nodeType () const =0
 

Protected Member Functions

 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

GeoDataFeaturePrivate *const d_ptr
 

Detailed Description

A base class for all geodata features.

GeoDataFeature is the base class for most geodata classes that correspond to places on a map. It is never instantiated by itself, but is always used as part of a derived class.

See also
GeoDataPlacemark
GeoDataContainer

Definition at line 44 of file GeoDataFeature.h.

Constructor & Destructor Documentation

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

Create a new GeoDataFeature with name as its name.

Definition at line 49 of file GeoDataFeature.cpp.

Member Function Documentation

const GeoDataAbstractView * Marble::GeoDataFeature::abstractView ( ) const

Get the Abstract view of the feature.

Definition at line 285 of file GeoDataFeature.cpp.

QString Marble::GeoDataFeature::address ( ) const

Return the address of the feature.

Definition at line 209 of file GeoDataFeature.cpp.

virtual GeoDataFeature* Marble::GeoDataFeature::clone ( ) const
pure virtual

Duplicate into another equal instance.

Implemented in Marble::GeoDataPlacemark, Marble::GeoDataDocument, and Marble::GeoDataFolder.

GeoDataStyle::ConstPtr Marble::GeoDataFeature::customStyle ( ) const

Return the style assigned to the placemark with setStyle (can be 0)

Definition at line 425 of file GeoDataFeature.cpp.

QString Marble::GeoDataFeature::description ( ) const

Return the text description of the feature.

Definition at line 249 of file GeoDataFeature.cpp.

bool Marble::GeoDataFeature::descriptionIsCDATA ( ) const

test if the description is CDATA or not CDATA allows for special characters to be included in XML and also allows for other XML formats to be embedded in the XML without interfering with parser namespace.

Returns
true if the description should be treated as CDATA false if the description is a plain string

Definition at line 269 of file GeoDataFeature.cpp.

GeoDataExtendedData & Marble::GeoDataFeature::extendedData ( )

Return the ExtendedData assigned to the feature.

Definition at line 439 of file GeoDataFeature.cpp.

bool Marble::GeoDataFeature::isGloballyVisible ( ) const

Return whether this feature is visible or not in the context of its parenting.

Definition at line 362 of file GeoDataFeature.cpp.

bool Marble::GeoDataFeature::isVisible ( ) const

Return whether this feature is visible or not.

Definition at line 350 of file GeoDataFeature.cpp.

QString Marble::GeoDataFeature::name ( ) const

The name of the feature.

The name of the feature should be a short string. It is often shown directly on the map and need therefore not take up much space.

Returns
The name of this feature

Definition at line 185 of file GeoDataFeature.cpp.

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

Serialize the contents of the feature to stream.

Definition at line 517 of file GeoDataFeature.cpp.

QString Marble::GeoDataFeature::phoneNumber ( ) const

Return the phone number of the feature.

Definition at line 229 of file GeoDataFeature.cpp.

qint64 Marble::GeoDataFeature::popularity ( ) const

Return the popularity of the feature.

Definition at line 505 of file GeoDataFeature.cpp.

const GeoDataRegion & Marble::GeoDataFeature::region ( ) const

Return the region assigned to the placemark.

Definition at line 451 of file GeoDataFeature.cpp.

const QString Marble::GeoDataFeature::role ( ) const

Return the role of the placemark.

FIXME: describe roles here!

Definition at line 469 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setAbstractView ( GeoDataAbstractView abstractView)

Set the abstract view of the feature.

Definition at line 305 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setAddress ( const QString value)

Set the address of this feature to value.

Definition at line 219 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setDescription ( const QString value)

Set the description of this feature to value.

Definition at line 259 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setDescriptionCDATA ( bool  cdata)

Set the description to be CDATA See:

See also
descriptionIsCDATA()

Definition at line 279 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setExtendedData ( const GeoDataExtendedData extendedData)

Sets the ExtendedData of the feature.

Parameters
extendedDatathe new ExtendedData to be used.

Definition at line 445 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setName ( const QString value)

Set a new name for this feature.

Parameters
valuethe new name

Definition at line 191 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setPhoneNumber ( const QString value)

Set the phone number of this feature to value.

Definition at line 239 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setPopularity ( qint64  popularity)

Sets the popularity of the feature.

Parameters
popularitythe new popularity value

Definition at line 511 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setRegion ( const GeoDataRegion region)

Sets the region of the placemark.

Parameters
regionnew value for the region

The feature is only shown when the region if active.

Definition at line 463 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setRole ( const QString role)

Sets the role of the placemark.

Parameters
rolethe new role to be used.

Definition at line 475 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setSnippet ( const GeoDataSnippet &  value)

Set a new name for this feature.

Parameters
valuethe new name

Definition at line 203 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setStyle ( const QSharedPointer< GeoDataStyle > &  style)

Sets the style of the placemark.

Parameters
stylethe new style to be used.

Definition at line 431 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setStyleMap ( const GeoDataStyleMap map)

Sets the styleMap of the feature.

Definition at line 487 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setStyleUrl ( const QString value)

Set the styleUrl of this feature to value.

Definition at line 321 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setTimeSpan ( const GeoDataTimeSpan &  timeSpan)

Set the timespan of the feature.

Parameters
timeSpannew of timespan.

Definition at line 385 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setTimeStamp ( const GeoDataTimeStamp &  timeStamp)

Set the timestamp of the feature.

Parameters
timeStampnew of the timestamp.

Definition at line 403 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setVisible ( bool  value)

Set a new value for visibility.

Parameters
valuenew value for the visibility

This function sets the visibility, i.e. whether this feature should be shown or not. This can be changed either from a GUI or through some action of the program.

Definition at line 356 of file GeoDataFeature.cpp.

void Marble::GeoDataFeature::setZoomLevel ( int  index)

Sets the popularity index of the placemark.

Parameters
indexthe new index to be used.

Definition at line 499 of file GeoDataFeature.cpp.

GeoDataSnippet Marble::GeoDataFeature::snippet ( ) const

A short description of the feature.

HTML markup is not supported.

Todo:
When the Snippet is not supplied, the first lines of description should be used.
Returns
The name of this feature

Definition at line 197 of file GeoDataFeature.cpp.

GeoDataStyle::ConstPtr Marble::GeoDataFeature::style ( ) const

Return the style assigned to the placemark, or a default style if none has been set.

Definition at line 415 of file GeoDataFeature.cpp.

const GeoDataStyleMap * Marble::GeoDataFeature::styleMap ( ) const

Return a pointer to a GeoDataStyleMap object which represents the styleMap of this feature.

A styleMap is simply a QMap<QString,QString> which can connect two styles with a keyword. This can be used to have a highlighted and a normal style.

See also
GeoDataStyleMap

Definition at line 481 of file GeoDataFeature.cpp.

QString Marble::GeoDataFeature::styleUrl ( ) const

Return the styleUrl of the feature.

Definition at line 315 of file GeoDataFeature.cpp.

const GeoDataTimeSpan & Marble::GeoDataFeature::timeSpan ( ) const

Return the timespan of the feature.

Definition at line 373 of file GeoDataFeature.cpp.

const GeoDataTimeStamp & Marble::GeoDataFeature::timeStamp ( ) const

Return the timestamp of the feature.

Definition at line 391 of file GeoDataFeature.cpp.

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

Unserialize the contents of the feature from stream.

Definition at line 534 of file GeoDataFeature.cpp.

int Marble::GeoDataFeature::zoomLevel ( ) const

Return the popularity index of the placemark.

The popularity index is a value which describes at which zoom level the placemark will be shown.

Definition at line 493 of file GeoDataFeature.cpp.


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

KDE's Doxygen guidelines are available online.