QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
The QgsQuickMapToScreen class transform map points to screen coordinates as well as distances from map to screen units. More...
#include <qgsquickmaptoscreen.h>
Signals | |
void | mapDistanceChanged () |
Distance in map unit. | |
void | mapPointChanged () |
Point in map coordinates. | |
void | mapSettingsChanged () |
Map settings used to define the map canvas CRS and detect any extent change. | |
void | screenDistanceChanged () |
Distance in screen coordinates (read-only) | |
void | screenPointChanged () |
Point in screen coordinates (read-only) | |
Public Member Functions | |
QgsQuickMapToScreen (QObject *parent=nullptr) | |
Creates a map to screen object. | |
double | mapDistance () const |
Distance in map unit. | |
QgsPoint | mapPoint () const |
Point in map coordinates. | |
QgsQuickMapSettings * | mapSettings () const |
Map settings used to define the map canvas CRS and detect any extent change. | |
double | screenDistance () const |
Distance in screen coordinates (read-only) | |
QPointF | screenPoint () const |
Point in screen coordinates (read-only) | |
void | setMapDistance (const double distance) |
Distance in map unit. | |
void | setMapPoint (const QgsPoint &point) |
Point in map coordinates. | |
void | setMapSettings (QgsQuickMapSettings *mapSettings) |
Map settings used to define the map canvas CRS and detect any extent change. | |
Properties | |
double | mapDistance |
Distance in map unit. | |
QgsPoint | mapPoint |
Point in map coordinates. | |
QgsQuickMapSettings * | mapSettings |
Map settings used to define the map canvas CRS and detect any extent change. | |
double | screenDistance |
Distance in screen coordinates (read-only) | |
QPointF | screenPoint |
Point in screen coordinates (read-only) | |
The QgsQuickMapToScreen class transform map points to screen coordinates as well as distances from map to screen units.
Screen points and/or distances will be automatically updated on map extent changes.
Definition at line 34 of file qgsquickmaptoscreen.h.
|
explicit |
Creates a map to screen object.
Definition at line 20 of file qgsquickmaptoscreen.cpp.
double QgsQuickMapToScreen::mapDistance | ( | ) | const |
Distance in map unit.
Definition at line 97 of file qgsquickmaptoscreen.cpp.
|
signal |
Distance in map unit.
QgsPoint QgsQuickMapToScreen::mapPoint | ( | ) | const |
Point in map coordinates.
Definition at line 64 of file qgsquickmaptoscreen.cpp.
|
signal |
Point in map coordinates.
QgsQuickMapSettings * QgsQuickMapToScreen::mapSettings | ( | ) | const |
Map settings used to define the map canvas CRS and detect any extent change.
Definition at line 49 of file qgsquickmaptoscreen.cpp.
|
signal |
Map settings used to define the map canvas CRS and detect any extent change.
double QgsQuickMapToScreen::screenDistance | ( | ) | const |
Distance in screen coordinates (read-only)
Definition at line 102 of file qgsquickmaptoscreen.cpp.
|
signal |
Distance in screen coordinates (read-only)
QPointF QgsQuickMapToScreen::screenPoint | ( | ) | const |
Point in screen coordinates (read-only)
Definition at line 69 of file qgsquickmaptoscreen.cpp.
|
signal |
Point in screen coordinates (read-only)
void QgsQuickMapToScreen::setMapDistance | ( | const double | distance | ) |
Distance in map unit.
Definition at line 87 of file qgsquickmaptoscreen.cpp.
void QgsQuickMapToScreen::setMapPoint | ( | const QgsPoint & | point | ) |
Point in map coordinates.
Definition at line 54 of file qgsquickmaptoscreen.cpp.
void QgsQuickMapToScreen::setMapSettings | ( | QgsQuickMapSettings * | mapSettings | ) |
Map settings used to define the map canvas CRS and detect any extent change.
Definition at line 25 of file qgsquickmaptoscreen.cpp.
|
readwrite |
Distance in map unit.
Definition at line 47 of file qgsquickmaptoscreen.h.
|
readwrite |
Point in map coordinates.
Definition at line 42 of file qgsquickmaptoscreen.h.
|
readwrite |
Map settings used to define the map canvas CRS and detect any extent change.
Definition at line 39 of file qgsquickmaptoscreen.h.
|
read |
Distance in screen coordinates (read-only)
Definition at line 49 of file qgsquickmaptoscreen.h.
|
read |
Point in screen coordinates (read-only)
Definition at line 44 of file qgsquickmaptoscreen.h.