qTbot 0.2.123.6f57966
qTbot is base back end library for your c++ Qt projects.
qTbot::TelegramLocation Class Reference

The TelegramLocation class is a simple struct with latitude and longitude. More...

#include <telegramlocation.h>

Inheritance diagram for qTbot::TelegramLocation:
Inheritance graph
Collaboration diagram for qTbot::TelegramLocation:
Collaboration graph

Public Member Functions

 TelegramLocation ()
 TelegramLocation default constructor.
 TelegramLocation (const QJsonObject &jsonObject)
 Constructs a location object from a JSON object.
double latitude () const
 latitude This is the float value of the latitude.
double longitude () const
 longitude This is the float value of the longitude.
QPointF toQPoint () const
 toQPoint This method converts the location data to the general qt class.
Public Member Functions inherited from qTbot::IJsonBasedObject
 IJsonBasedObject ()
 IJsonBasedObject default constructor.
 IJsonBasedObject (const QJsonObject &newRawJson)
 IJsonBasedObject constructs the object from a raw json value.
const QJsonObject & rawJson () const
 rawJson Telegram uses a rest api with json objects. So all received messages are parsed into a json object.
virtual void setRawJson (const QJsonObject &newRawJson)
 setRawJson This method sets a new raw json data of the object.

Detailed Description

The TelegramLocation class is a simple struct with latitude and longitude.

Definition at line 19 of file telegramlocation.h.

Constructor & Destructor Documentation

◆ TelegramLocation() [1/2]

qTbot::TelegramLocation::TelegramLocation ( )

TelegramLocation default constructor.

Definition at line 13 of file telegramlocation.cpp.

◆ TelegramLocation() [2/2]

qTbot::TelegramLocation::TelegramLocation ( const QJsonObject & jsonObject)

Constructs a location object from a JSON object.

Parameters
jsonObjectThe JSON object containing location data.

Definition at line 18 of file telegramlocation.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ latitude()

double qTbot::TelegramLocation::latitude ( ) const

latitude This is the float value of the latitude.

Returns
float value of the latitude

Definition at line 23 of file telegramlocation.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ longitude()

double qTbot::TelegramLocation::longitude ( ) const

longitude This is the float value of the longitude.

Returns
float value of the longitude

Definition at line 28 of file telegramlocation.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ toQPoint()

QPointF qTbot::TelegramLocation::toQPoint ( ) const

toQPoint This method converts the location data to the general qt class.

Returns
location as a qt point

Definition at line 33 of file telegramlocation.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: