Marble::GeoDataObject

Search for usage in LXR

Marble::GeoDataObject Class Reference

#include <GeoDataObject.h>

Inheritance diagram for Marble::GeoDataObject:

Public Member Functions

 GeoDataObject (const GeoDataObject &)
 
QString id () const
 
GeoDataObjectoperator= (const GeoDataObject &)
 
void pack (QDataStream &stream) const override
 
GeoDataObjectparent ()
 
const GeoDataObjectparent () const
 
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

virtual bool equals (const GeoDataObject &other) const
 

Detailed Description

A base class for all geodata objects.

GeoDataObject is the base class for all geodata classes. It is never instantiated by itself, but is always used as part of a derived object.

The Geodata objects are all modeled after the Google KML files as defined in https://developers.google.com/kml/documentation/kmlreference.

A GeoDataObject contains 2 properties, both corresponding directly to tags in the KML files: the id, which is a unique identifier of the object, and a targetId which is used to reference other objects that have already been loaded.

The id property must only be set if the Update mechanism of KML is used, which is currently not supported by Marble.

Definition at line 43 of file GeoDataObject.h.

Constructor & Destructor Documentation

◆ GeoDataObject() [1/2]

Marble::GeoDataObject::GeoDataObject ( )

Definition at line 37 of file GeoDataObject.cpp.

◆ GeoDataObject() [2/2]

Marble::GeoDataObject::GeoDataObject ( const GeoDataObject & other)

Definition at line 43 of file GeoDataObject.cpp.

◆ ~GeoDataObject()

Marble::GeoDataObject::~GeoDataObject ( )
override

Definition at line 55 of file GeoDataObject.cpp.

Member Function Documentation

◆ equals()

bool Marble::GeoDataObject::equals ( const GeoDataObject & other) const
protectedvirtual

Compares the value of id and targetId of the two objects.

Returns
true if they these values are equal or false otherwise

Reimplemented in Marble::GeoDataAbstractView, Marble::GeoDataFeature, and Marble::GeoDataGeometry.

Definition at line 126 of file GeoDataObject.cpp.

◆ id()

QString Marble::GeoDataObject::id ( ) const

Get the id of the object.

Definition at line 75 of file GeoDataObject.cpp.

◆ operator=()

GeoDataObject & Marble::GeoDataObject::operator= ( const GeoDataObject & rhs)

Definition at line 49 of file GeoDataObject.cpp.

◆ pack()

void Marble::GeoDataObject::pack ( QDataStream & stream) const
override

Reimplemented from Serializable.

Definition at line 114 of file GeoDataObject.cpp.

◆ parent() [1/2]

GeoDataObject * Marble::GeoDataObject::parent ( )

Definition at line 65 of file GeoDataObject.cpp.

◆ parent() [2/2]

const GeoDataObject * Marble::GeoDataObject::parent ( ) const

Provides the parent of the object in GeoDataContainers.

Definition at line 60 of file GeoDataObject.cpp.

◆ resolvePath()

QString Marble::GeoDataObject::resolvePath ( const QString & relativePath) const

Definition at line 95 of file GeoDataObject.cpp.

◆ setId()

void Marble::GeoDataObject::setId ( const QString & value)

Set the id of the object.

Parameters
valuethe new id value

Definition at line 80 of file GeoDataObject.cpp.

◆ setParent()

void Marble::GeoDataObject::setParent ( GeoDataObject * parent)

Sets the parent of the object.

Definition at line 70 of file GeoDataObject.cpp.

◆ setTargetId()

void Marble::GeoDataObject::setTargetId ( const QString & value)

set a new targetId of this object

Parameters
valuethe new targetId value

Definition at line 90 of file GeoDataObject.cpp.

◆ targetId()

QString Marble::GeoDataObject::targetId ( ) const

Get the targetId of the object to be replaced.

Definition at line 85 of file GeoDataObject.cpp.

◆ unpack()

void Marble::GeoDataObject::unpack ( QDataStream & steam)
override

Reimplemented from Serializable.

Definition at line 120 of file GeoDataObject.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:52:42 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.