Search for usage in LXR

KContacts::Geo Class Reference

#include <geo.h>

Inheritance diagram for KContacts::Geo:


bool isValid
float latitude
float longitude

Public Member Functions

 Geo ()
 Geo (float latitude, float longitude)
 Geo (const Geo &other)
 ~Geo ()
void clear ()
bool isValid () const
float latitude () const
float longitude () const
bool operator!= (const Geo &other) const
Geooperator= (const Geo &other)
bool operator== (const Geo &other) const
void setLatitude (float latitude)
void setLongitude (float longitude)
QString toString () const


KCONTACTS_EXPORT QDataStreamoperator<< (QDataStream &, const Geo &)
KCONTACTS_EXPORT QDataStreamoperator>> (QDataStream &, Geo &)

Detailed Description

Geographic position.

This class represents a geographic position.

Definition at line 24 of file geo.h.

Constructor & Destructor Documentation

Geo::Geo ( )

Creates an invalid geographics position object.

Definition at line 42 of file geo.cpp.

Geo::Geo ( float  latitude,
float  longitude 

Creates a geographics position object.

latitudeGeographical latitude
longitudeGeographical longitude

Definition at line 47 of file geo.cpp.

Geo::Geo ( const Geo other)

Copy constructor.

Definition at line 54 of file geo.cpp.

Geo::~Geo ( )

Destroys the geographics position object.

Definition at line 59 of file geo.cpp.

Member Function Documentation

void Geo::clear ( )

Clears the class, marking it as invalid.


Definition at line 142 of file geo.cpp.

bool KContacts::Geo::isValid ( ) const

Returns, whether this object contains a valid geographical position.

float KContacts::Geo::latitude ( ) const

Returns the latitude.

float KContacts::Geo::longitude ( ) const

Returns the longitude.

bool Geo::operator!= ( const Geo other) const

Not-Equal operator.

Definition at line 117 of file geo.cpp.

Geo & Geo::operator= ( const Geo other)

Assignment operator.

otherThe Geo instance to assign to this

Definition at line 122 of file geo.cpp.

bool Geo::operator== ( const Geo other) const

Equality operator.

Two invalid Geo instance will return true

Definition at line 100 of file geo.cpp.

void Geo::setLatitude ( float  latitude)

Sets the latitude.

latitudeThe location's latitude coordinate

Definition at line 63 of file geo.cpp.

void Geo::setLongitude ( float  longitude)

Sets the longitude.

longitudeThe location's longitude coordinate

Definition at line 79 of file geo.cpp.

QString Geo::toString ( ) const

Returns string representation of geographical position.

Definition at line 131 of file geo.cpp.

Friends And Related Function Documentation

KCONTACTS_EXPORT QDataStream& operator<< ( QDataStream ,
const Geo  

Serializes the geographical position object into the stream.

KCONTACTS_EXPORT QDataStream& operator>> ( QDataStream ,

Initializes the geographical position object from the stream.

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 Sat Oct 23 2021 22:56:52 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.