File indexing completed on 2025-01-26 04:25:01

0001 //
0002 // Created by gabridc on 5/6/21.
0003 //
0004 
0005 #pragma once
0006 
0007 #include <QObject>
0008 #include <QString>
0009 
0010 #include "imagetools_export.h"
0011 
0012 class IMAGETOOLS_EXPORT City : public QObject
0013 {
0014     Q_OBJECT
0015     
0016 public:
0017     explicit City(const QString &cityID, const QString &name, const QString &continent, const QString &country, const double &latitude, const double &longitude, QObject *parent = nullptr);
0018     
0019     explicit City(QObject *parent = nullptr);
0020     City(const City &other, QObject *parent = nullptr);
0021     
0022     bool match(double latitude, double longitude);
0023     
0024     int operator==(City c)
0025     {
0026         if(m_cityID == c.m_cityID)
0027             return 1;
0028         else
0029             return 0;
0030     }
0031     
0032     QString id() const;
0033     QString name() const;
0034     QString country() const;
0035     QString continent() const;
0036     double latitude() const;
0037     double longitude() const;
0038     
0039     bool isValid() const;
0040     
0041 private:
0042     QString m_cityID;
0043     QString m_name;
0044     QString m_continent;
0045     QString m_country;
0046     double m_latitude;
0047     double m_longitude;
0048 };
0049