MauiKit Image Tools

modules/geolocation/city.h
1//
2// Created by gabridc on 5/6/21.
3//
4
5#pragma once
6#include <QObject>
7#include <QString>
8
9#include "imagetools_export.h"
10
11/**
12 * @brief A class for representing the GPS coordinates and information of a city.
13 */
14class IMAGETOOLS_EXPORT City : public QObject
15{
16 Q_OBJECT
17
18public:
19 explicit City(const QString &cityID, const QString &name, const QString &continent, const QString &country, const double &latitude, const double &longitude, QObject *parent = nullptr);
20
21 explicit City(QObject *parent = nullptr);
22
23 bool match(double latitude, double longitude);
24
25 int operator==(City c)
26 {
27 if(m_cityID == c.m_cityID)
28 return 1;
29 else
30 return 0;
31 }
32
33 QString id() const;
34 QString name() const;
35 QString country() const;
36 QString continent() const;
37
38 bool isValid() const;
39
40private:
41 QString m_cityID;
42 QString m_name;
43 QString m_continent;
44 QString m_country;
45 double m_latitude;
46 double m_longitude;
47};
A class for representing the GPS coordinates and information of a city.
KCOREADDONS_EXPORT Result match(QStringView pattern, QStringView str)
QString name(GameStandardAction id)
KIOCORE_EXPORT bool operator==(const UDSEntry &entry, const UDSEntry &other)
QStringView country(QStringView ifopt)
bool isValid(QStringView ifopt)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:32:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.