qTbot
0.89.ee6949a
qTbot is base back end library for your c++ Qt projects.
telegramlocation.cpp
Go to the documentation of this file.
1
//#
2
//# Copyright (C) 2023-2024 QuasarApp.
3
//# Distributed under the GPLv3 software license, see the accompanying
4
//# Everyone is permitted to copy and distribute verbatim copies
5
//# of this license document, but changing it is not allowed.
6
//#
7
8
#include "
telegramlocation.h
"
9
#include "qpoint.h"
10
11
namespace
qTbot
{
12
13
TelegramLocation::TelegramLocation
()
14
{
15
16
}
17
18
TelegramLocation::TelegramLocation
(
const
QJsonObject &jsonObject):
19
IJsonBasedObject
(jsonObject) {
20
21
}
22
23
double
TelegramLocation::latitude
()
const
{
24
return
rawJson
()[
"latitude"
].toDouble();
25
26
}
27
28
double
TelegramLocation::longitude
()
const
{
29
return
rawJson
()[
"longitude"
].toDouble();
30
31
}
32
33
QPointF
TelegramLocation::toQPoint
()
const
{
34
return
QPointF(
latitude
(),
longitude
());
35
}
36
}
qTbot::IJsonBasedObject
The IJsonBasedObject class This is base interface for all json base objects.
Definition
ijsonbasedobject.h:20
qTbot::IJsonBasedObject::rawJson
const QJsonObject & rawJson() const
rawJson Telegram use rest api with json objects. So all received messages will be parsed in to jsobje...
Definition
ijsonbasedobject.cpp:21
qTbot::TelegramLocation::latitude
double latitude() const
latitude is float value of latitude
Definition
telegramlocation.cpp:23
qTbot::TelegramLocation::TelegramLocation
TelegramLocation()
Definition
telegramlocation.cpp:13
qTbot::TelegramLocation::toQPoint
QPointF toQPoint() const
toQPoint This method convert location data to general qt class.
Definition
telegramlocation.cpp:33
qTbot::TelegramLocation::longitude
double longitude() const
longitude is float value of longitude
Definition
telegramlocation.cpp:28
qTbot
Definition
telegramdeletemessage.cpp:8
telegramlocation.h
src
qTbot
src
public
qTbot
messages
telegramlocation.cpp
Generated by
1.9.8