KContacts::Geo Class
class KContacts::GeoGeographic position. More...
Header: | #include <KContacts/Geo> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Contacts) target_link_libraries(mytarget PRIVATE KF6::Contacts) |
In QML: | geo |
Properties
Public Functions
Geo() | |
Geo(float latitude, float longitude) | |
(since 5.6) void | clear() |
bool | isValid() const |
float | latitude() const |
float | longitude() const |
void | setLatitude(float latitude) |
void | setLongitude(float longitude) |
QString | toString() const |
bool | operator!=(const KContacts::Geo &other) const |
KContacts::Geo & | operator=(const KContacts::Geo &other) |
bool | operator==(const KContacts::Geo &other) const |
Related Non-Members
QDataStream & | operator<<(QDataStream &stream, const KContacts::Geo &object) |
QDataStream & | operator>>(QDataStream &stream, KContacts::Geo &object) |
Detailed Description
This class represents a geographic position.
Property Documentation
[read-only]
isValid : const bool
Access functions:
bool | isValid() const |
latitude : float
Access functions:
float | latitude() const |
void | setLatitude(float latitude) |
longitude : float
Access functions:
float | longitude() const |
void | setLongitude(float longitude) |
Member Function Documentation
Geo::Geo()
Creates an invalid geographics position object.
Geo::Geo(float latitude, float longitude)
Creates a geographics position object.
latitude Geographical latitude
longitude Geographical longitude
[since 5.6]
void Geo::clear()
Clears the class, marking it as invalid.
This function was introduced in 5.6.
bool Geo::isValid() const
Returns, whether this object contains a valid geographical position.
Note: Getter function for property isValid.
float Geo::latitude() const
Returns the latitude.
Note: Getter function for property latitude.
See also setLatitude().
float Geo::longitude() const
Returns the longitude.
Note: Getter function for property longitude.
See also setLongitude().
void Geo::setLatitude(float latitude)
Sets the latitude.
latitude The location's latitude coordinate
Note: Setter function for property latitude.
See also latitude().
void Geo::setLongitude(float longitude)
Sets the longitude.
longitude The location's longitude coordinate
Note: Setter function for property longitude.
See also longitude().
QString Geo::toString() const
Returns string representation of geographical position.
bool Geo::operator!=(const KContacts::Geo &other) const
Not-Equal operator.
KContacts::Geo &Geo::operator=(const KContacts::Geo &other)
Assignment operator.
other The Geo instance to assign to this
bool Geo::operator==(const KContacts::Geo &other) const
Equality operator.
Note: Two invalid Geo instance will return true
Related Non-Members
QDataStream &operator<<(QDataStream &stream, const KContacts::Geo &object)
Serializes the geographical position object into the stream.
QDataStream &operator>>(QDataStream &stream, KContacts::Geo &object)
Initializes the geographical position object from the stream.