qgeocoordinate.sip 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. // qgeocoordinate.sip generated by MetaSIP
  2. //
  3. // This file is part of the QtPositioning Python extension module.
  4. //
  5. // Copyright (c) 2026 Riverbank Computing Limited <info@riverbankcomputing.com>
  6. //
  7. // This file is part of PyQt6.
  8. //
  9. // This file may be used under the terms of the GNU General Public License
  10. // version 3.0 as published by the Free Software Foundation and appearing in
  11. // the file LICENSE included in the packaging of this file. Please review the
  12. // following information to ensure the GNU General Public License version 3.0
  13. // requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  14. //
  15. // If you do not wish to use this file under the terms of the GPL version 3.0
  16. // then you may purchase a commercial license. For more information contact
  17. // info@riverbankcomputing.com.
  18. //
  19. // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
  20. // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  21. %If (Qt_6_2_0 -)
  22. class QGeoCoordinate
  23. {
  24. %TypeHeaderCode
  25. #include <qgeocoordinate.h>
  26. %End
  27. public:
  28. enum CoordinateType
  29. {
  30. InvalidCoordinate,
  31. Coordinate2D,
  32. Coordinate3D,
  33. };
  34. enum CoordinateFormat
  35. {
  36. Degrees,
  37. DegreesWithHemisphere,
  38. DegreesMinutes,
  39. DegreesMinutesWithHemisphere,
  40. DegreesMinutesSeconds,
  41. DegreesMinutesSecondsWithHemisphere,
  42. };
  43. QGeoCoordinate();
  44. QGeoCoordinate(double latitude, double longitude);
  45. QGeoCoordinate(double latitude, double longitude, double altitude);
  46. QGeoCoordinate(const QGeoCoordinate &other);
  47. ~QGeoCoordinate();
  48. bool isValid() const;
  49. QGeoCoordinate::CoordinateType type() const;
  50. void setLatitude(double latitude);
  51. double latitude() const;
  52. void setLongitude(double longitude);
  53. double longitude() const;
  54. void setAltitude(double altitude);
  55. double altitude() const;
  56. qreal distanceTo(const QGeoCoordinate &other) const;
  57. qreal azimuthTo(const QGeoCoordinate &other) const;
  58. QGeoCoordinate atDistanceAndAzimuth(qreal distance, qreal azimuth, qreal distanceUp = 0.) const;
  59. QString toString(QGeoCoordinate::CoordinateFormat format = QGeoCoordinate::DegreesMinutesSecondsWithHemisphere) const;
  60. void swap(QGeoCoordinate &other /Constrained/);
  61. Py_hash_t __hash__() const;
  62. %MethodCode
  63. sipRes = qHash(*sipCpp);
  64. %End
  65. };
  66. %End
  67. %If (Qt_6_2_0 -)
  68. QDataStream &operator<<(QDataStream &stream, const QGeoCoordinate &coordinate);
  69. %End
  70. %If (Qt_6_2_0 -)
  71. QDataStream &operator>>(QDataStream &stream, QGeoCoordinate &coordinate /Constrained/);
  72. %End
  73. %If (Qt_6_2_0 -)
  74. bool operator==(const QGeoCoordinate &lhs, const QGeoCoordinate &rhs);
  75. %End
  76. %If (Qt_6_2_0 -)
  77. bool operator!=(const QGeoCoordinate &lhs, const QGeoCoordinate &rhs);
  78. %End