18#include <QtPositioning/private/qpositioningglobal_p.h>
22#include <QtPositioning/qgeopath.h>
23#include <QtCore/QList>
28 double &m_minX,
double &m_maxX,
double &m_minLati,
double &m_maxLati,
41 m_minLati = m_maxLati = m_path.
at(0).latitude();
45 m_deltaXs[0] = m_minX = m_maxX = 0.0;
52 double deltaLongi = longiTo - longiFrom;
53 if (
qAbs(deltaLongi) > 180.0) {
58 deltaLongi = longiTo - longiFrom;
60 m_deltaXs[
i] = m_deltaXs[
i-1] + deltaLongi;
61 if (m_deltaXs[
i] < m_minX) {
62 m_minX = m_deltaXs[
i];
65 if (m_deltaXs[
i] > m_maxX) {
66 m_maxX = m_deltaXs[
i];
80 double &m_minX,
double &m_maxX,
double &m_minLati,
double &m_maxLati,
91 }
else if (m_path.
size() == 1) {
93 m_deltaXs[0] = m_minX = m_maxX = 0.0;
94 m_minLati = m_maxLati = m_path.
at(0).latitude();
98 }
else if ( m_path.
size() != m_deltaXs.
size() + 1 ) {
99 computeBBox(m_path, m_deltaXs, m_minX, m_maxX, m_minLati, m_maxLati, m_bbox);
107 double deltaLongi = longiTo - longiFrom;
108 if (
qAbs(deltaLongi) > 180.0) {
113 deltaLongi = longiTo - longiFrom;
119 if (m_deltaXs.
last() < m_minX) {
120 m_minX = m_deltaXs.
last();
123 if (m_deltaXs.
last() > m_maxX) {
124 m_maxX = m_deltaXs.
last();
145 virtual bool isValid()
const override;
146 virtual bool isEmpty()
const override;
151 size_t hash(
size_t seed)
const override;
155 virtual bool lineContains(
const QGeoCoordinate &coordinate)
const;
160 virtual bool containsCoordinate(
const QGeoCoordinate &coordinate)
const;
163 virtual void translate(
double degreesLatitude,
double degreesLongitude);
165 virtual void clearPath();
171 virtual void computeBoundingBox();
172 virtual void markDirty();
179 bool m_bboxDirty =
false;
191 virtual void translate(
double degreesLatitude,
double degreesLongitude)
override;
194 virtual void markDirty()
override;
195 virtual void addCoordinate(
const QGeoCoordinate &coordinate)
override;
205 double m_minLati = 0;
206 double m_maxLati = 0;
double longitude
This property holds the longitude in decimal degrees.
double latitude
This property holds the latitude in decimal degrees.
virtual void computeBoundingBox() override
QList< double > m_deltaXs
QList< QGeoCoordinate > m_path
double m_leftBoundWrapped
QGeoCoordinate topLeft
This property holds the top left coordinate of this geo rectangle.
QGeoCoordinate bottomRight
This property holds the bottom right coordinate of this geo rectangle.
virtual QGeoShapePrivate * clone() const =0
virtual bool operator==(const QGeoShapePrivate &other) const
virtual QGeoCoordinate center() const =0
virtual QGeoRectangle boundingGeoRectangle() const =0
virtual bool isValid() const =0
virtual bool isEmpty() const =0
virtual bool contains(const QGeoCoordinate &coordinate) const =0
qsizetype size() const noexcept
bool isEmpty() const noexcept
void push_back(parameter_type t)
const_reference at(qsizetype i) const noexcept
void resize(qsizetype size)
QHash< int, QWidget * > hash
[35multi]
Combined button and popup list for selecting options.
static void updateBBox(const QList< QGeoCoordinate > &m_path, QList< double > &m_deltaXs, double &m_minX, double &m_maxX, double &m_minLati, double &m_maxLati, QGeoRectangle &m_bbox)
static QT_BEGIN_NAMESPACE void computeBBox(const QList< QGeoCoordinate > &m_path, QList< double > &m_deltaXs, double &m_minX, double &m_maxX, double &m_minLati, double &m_maxLati, QGeoRectangle &m_bbox)
constexpr T qAbs(const T &t)
Q_CORE_EXPORT Q_DECL_CONST_FUNCTION double qInf()
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLsizei const GLchar *const * path
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
static bool translate(xcb_connection_t *connection, xcb_window_t child, xcb_window_t parent, int *x, int *y)