Geen omschrijving

country.h 1.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. #ifndef COUNTRY_H
  2. #define COUNTRY_H
  3. #include <doublepoint.h>
  4. #include <city.h>
  5. #include <QMap>
  6. /// 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,City*> 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 topLeft(QString &st, DoublePoint &p );
  32. /// \~English
  33. /// \brief ??
  34. /// \param ??
  35. /// \~Spanish
  36. /// \brief ??
  37. /// \param ??
  38. ///
  39. void topLeft(QString &st, DoublePoint &p );
  40. /// \fn void limits();
  41. /// \~English
  42. /// \brief ??
  43. /// \param ??
  44. /// \~Spanish
  45. /// \brief ??
  46. /// \param ??
  47. ///
  48. void limits();
  49. /// \fn QMap<QString,City*> getCities()
  50. /// \~English
  51. /// \brief gets the Cities map structure.
  52. /// \~Spanish
  53. /// \brief consigue la estructura de mapa de Cities.
  54. ///
  55. QMap<QString,City*> getCities() { return Cities;}
  56. //~Country() { delete Cities; }
  57. };
  58. #endif // COUNTRY_H