KContacts::Geo

KContacts::Geo Class Reference

#include <geo.h>

Inheritance diagram for KContacts::Geo:

Properties

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
 

Friends

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

Detailed Description

Geographic position.

This class represents a geographic position.

Definition at line 23 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.

Parameters
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.

Since
5.6

Definition at line 143 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.

Parameters
otherThe Geo instance to assign to this

Definition at line 122 of file geo.cpp.

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

Equality operator.

Note
Two invalid Geo instance will return true

Definition at line 100 of file geo.cpp.

void Geo::setLatitude ( float  latitude)

Sets the latitude.

Parameters
latitudeThe location's latitude coordinate

Definition at line 63 of file geo.cpp.

void Geo::setLongitude ( float  longitude)

Sets the longitude.

Parameters
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  
)
friend

Serializes the geographical position object into the stream.

KCONTACTS_EXPORT QDataStream& operator>> ( QDataStream ,
Geo  
)
friend

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-2020 The KDE developers.
Generated on Sun Jul 5 2020 22:54:57 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.