No Description

country.h 1.3KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #ifndef COUNTRY_H
  2. #define COUNTRY_H
  3. #include <QPointF>
  4. #include <QMap>
  5. #include <QPolygonF>
  6. /// \brief A class to display a map of a country, given the coordinates
  7. /// that define its limits.
  8. class Country {
  9. private:
  10. public:
  11. QMap<QString,QPolygonF*> Cities;
  12. double minX, minY, maxX, maxY;
  13. /// \fn Country()
  14. /// \~English
  15. /// \brief default constructor
  16. /// \~Spanish
  17. /// \brief default constructor
  18. ///
  19. Country() {}
  20. /// \fn bool readInfoFromJSON(QString fileName)
  21. /// \~English
  22. /// \brief Reads a json file that contains the polygons for the
  23. /// various parts of the country (e.g., cities)
  24. /// \param fileName name of the json file
  25. /// \~Spanish
  26. /// \brief Lee un archivo en formato json que contiene los polígonos
  27. /// the los componentes del mapa del pais (e.g. las ciuidades)
  28. /// \param fileName nombre del archivo en formato json
  29. ///
  30. bool readInfoFromJSON(const QString &fileName);
  31. /// \fn void limits();
  32. /// \~English
  33. /// \brief Determines the coordinates of the top left and bottom right
  34. /// corners of the map.
  35. /// \~Spanish
  36. /// \brief Determina las coordenadas de las esquinas superior izquierda
  37. /// e inferior derecha del mapa.
  38. ///
  39. void limits();
  40. };
  41. #endif // COUNTRY_H