KContacts::Geo

Search for usage in LXR

KContacts::Geo Class Reference

#include <geo.h>

Inheritance diagram for KContacts::Geo:

Properties

bool isValid
 
float latitude
 
float longitude
 

Public Member Functions

 Geo ()
 
 Geo (const Geo &other)
 
 Geo (float latitude, float longitude)
 
 ~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
 

Detailed Description

Geographic position.

This class represents a geographic position.

Definition at line 24 of file geo.h.

Property Documentation

◆ isValid

bool KContacts::Geo::isValid
read

Definition at line 32 of file geo.h.

◆ latitude

float KContacts::Geo::latitude
readwrite

Definition at line 30 of file geo.h.

◆ longitude

float KContacts::Geo::longitude
readwrite

Definition at line 31 of file geo.h.

Constructor & Destructor Documentation

◆ Geo() [1/3]

Geo::Geo ( )

Creates an invalid geographics position object.

Definition at line 42 of file geo.cpp.

◆ Geo() [2/3]

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() [3/3]

Geo::Geo ( const Geo & other)

Copy constructor.

Definition at line 54 of file geo.cpp.

◆ ~Geo()

Geo::~Geo ( )

Destroys the geographics position object.

Definition at line 59 of file geo.cpp.

Member Function Documentation

◆ clear()

void Geo::clear ( )

Clears the class, marking it as invalid.

Since
5.6

Definition at line 142 of file geo.cpp.

◆ isValid()

bool Geo::isValid ( ) const

Returns, whether this object contains a valid geographical position.

Definition at line 95 of file geo.cpp.

◆ latitude()

float Geo::latitude ( ) const

Returns the latitude.

Definition at line 74 of file geo.cpp.

◆ longitude()

float Geo::longitude ( ) const

Returns the longitude.

Definition at line 90 of file geo.cpp.

◆ operator!=()

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

Not-Equal operator.

Definition at line 117 of file geo.cpp.

◆ operator=()

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

Assignment operator.

Parameters
otherThe Geo instance to assign to this

Definition at line 122 of file geo.cpp.

◆ operator==()

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.

◆ setLatitude()

void Geo::setLatitude ( float latitude)

Sets the latitude.

Parameters
latitudeThe location's latitude coordinate

Definition at line 63 of file geo.cpp.

◆ setLongitude()

void Geo::setLongitude ( float longitude)

Sets the longitude.

Parameters
longitudeThe location's longitude coordinate

Definition at line 79 of file geo.cpp.

◆ toString()

QString Geo::toString ( ) const

Returns string representation of geographical position.

Definition at line 131 of file geo.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 Tue Mar 26 2024 11:14:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.