MauiKit Image Tools

modules/geolocation/city.cpp
1//
2// Created by gabridc on 5/6/21.
3//
4#include "city.h"
5
6City::City(const QString &cityID, const QString &name, const QString &continent, const QString &country, const double &latitude, const double &longitude, QObject *parent) : QObject(parent)
7, m_cityID(cityID)
8, m_name(name)
9, m_continent(continent)
10, m_country(country)
11, m_latitude(latitude)
12, m_longitude(longitude)
13
14{
15
16}
17
18City::City(QObject* parent) : QObject(parent)
19{
20}
21
22QString City::id() const
23{
24 return m_cityID;
25}
26
27QString City::name() const
28{
29 return m_name;
30}
31
32QString City::continent() const
33{
34 return m_continent;
35}
36
37QString City::country() const
38{
39 return m_country;
40}
41
42bool City::isValid() const
43{
44return !m_cityID.isEmpty();
45}
46
47bool City::match(double latitude, double longitude)
48{
49 if(m_latitude == latitude && m_longitude == longitude)
50 {
51 return true;
52 }
53
54 return false;
55}
QString name(StandardAction id)
KI18NLOCALEDATA_EXPORT KCountry country(const char *ianaId)
bool isEmpty() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:11:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.