6#ifndef MARBLE_DECLARATIVE_GEOPOLYLINEITEM_H
7#define MARBLE_DECLARATIVE_GEOPOLYLINEITEM_H
9#include "GeoDataCoordinates.h"
10#include "GeoDataLineString.h"
27 Q_PROPERTY(qreal x READ readonlyX NOTIFY readonlyXChanged)
28 Q_PROPERTY(qreal y READ readonlyY NOTIFY readonlyYChanged)
29 Q_PROPERTY(qreal width READ readonlyWidth NOTIFY readonlyWidthChanged)
30 Q_PROPERTY(qreal height READ readonlyHeight NOTIFY readonlyHeightChanged)
32 Q_PROPERTY(Marble::MarbleQuickItem *map READ map WRITE setMap NOTIFY mapChanged)
34 Q_PROPERTY(QVariantList geoCoordinates READ geoCoordinates WRITE setGeoCoordinates NOTIFY geoCoordinatesChanged)
35 Q_PROPERTY(QVariantList screenCoordinates READ screenCoordinates NOTIFY screenCoordinatesChanged)
36 Q_PROPERTY(
bool observable READ observable NOTIFY observableChanged)
37 Q_PROPERTY(
bool tessellate READ tessellate WRITE setTessellate NOTIFY tessellateChanged)
38 Q_PROPERTY(
QColor lineColor READ lineColor WRITE setLineColor NOTIFY lineColorChanged)
39 Q_PROPERTY(qreal lineWidth READ lineWidth WRITE setLineWidth NOTIFY lineWidthChanged)
43 Q_PROPERTY(
bool clipScreenCoordinates READ clipScreenCoordinates WRITE setClipScreenCoordinates NOTIFY clipScreenCoordinatesChanged)
49 MarbleQuickItem *map()
const;
51 void setMap(MarbleQuickItem *map);
53 bool observable()
const;
55 QVariantList geoCoordinates()
const;
57 void setGeoCoordinates(
const QVariantList &geoCoordinates);
59 QVariantList screenCoordinates()
const;
62 qreal lineWidth()
const;
63 bool tessellate()
const;
64 bool clipScreenCoordinates()
const;
66 void setLineColor(
const QColor &lineColor);
67 void setLineWidth(
const qreal lineWidth);
68 void setTessellate(
bool tessellate);
69 void setClipScreenCoordinates(
bool clipped);
71 qreal readonlyX()
const;
73 qreal readonlyY()
const;
75 qreal readonlyWidth()
const;
77 qreal readonlyHeight()
const;
80 void mapChanged(MarbleQuickItem *map);
81 void observableChanged(
bool observable);
82 void geoCoordinatesChanged();
83 void screenCoordinatesChanged();
84 void lineColorChanged(
QColor lineColor);
85 void lineWidthChanged(qreal lineWidth);
87 void tessellateChanged(
bool tessellate);
88 void clipScreenCoordinatesChanged(
bool enabled);
90 void readonlyXChanged();
91 void readonlyYChanged();
92 void readonlyWidthChanged();
93 void readonlyHeightChanged();
96 QSGNode *updatePaintNode(
QSGNode *oldNode, UpdatePaintNodeData *)
override;
99 MarbleQuickItem *m_map =
nullptr;
101 GeoDataLineString m_lineString;
102 QVariantList m_geoCoordinates;
104 QVariantList m_screenCoordinates;
108 bool m_clipScreenCoordinates;
110 void updateScreenPositions();
Binds a QML item to a specific geodetic location in screen coordinates.