MauiKit Image Tools

geolocation/city.h
1//
2// Created by gabridc on 5/6/21.
3//
4
5#pragma once
6
7#include <QObject>
8#include <QString>
9
10#include "imagetools_export.h"
11
12class IMAGETOOLS_EXPORT City : public QObject
13{
14 Q_OBJECT
15
16public:
17 explicit City(const QString &cityID, const QString &name, const QString &continent, const QString &country, const double &latitude, const double &longitude, QObject *parent = nullptr);
18
19 explicit City(QObject *parent = nullptr);
20 City(const City &other, QObject *parent = nullptr);
21
22 bool match(double latitude, double longitude);
23
24 int operator==(City c)
25 {
26 if(m_cityID == c.m_cityID)
27 return 1;
28 else
29 return 0;
30 }
31
32 QString id() const;
33 QString name() const;
34 QString country() const;
35 QString continent() const;
36 double latitude() const;
37 double longitude() const;
38
39 bool isValid() const;
40
41private:
42 QString m_cityID;
43 QString m_name;
44 QString m_continent;
45 QString m_country;
46 double m_latitude;
47 double m_longitude;
48};
49
A class for representing the GPS coordinates and information of a city.
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.