QGIS API Documentation 3.37.0-Master (fdefdf9c27f)
Signals | Public Member Functions | Properties | List of all members
QgsQuickMapToScreen Class Reference

The QgsQuickMapToScreen class transform map points to screen coordinates as well as distances from map to screen units. More...

#include <qgsquickmaptoscreen.h>

Inheritance diagram for QgsQuickMapToScreen:
Inheritance graph
[legend]

Signals

void mapDistanceChanged ()
 Distance in map unit. More...
 
void mapPointChanged ()
 Point in map coordinates. More...
 
void mapSettingsChanged ()
 Map settings used to define the map canvas CRS and detect any extent change. More...
 
void screenDistanceChanged ()
 Distance in screen coordinates (read-only) More...
 
void screenPointChanged ()
 Point in screen coordinates (read-only) More...
 

Public Member Functions

 QgsQuickMapToScreen (QObject *parent=nullptr)
 Creates a map to screen object. More...
 
double mapDistance () const
 Distance in map unit. More...
 
QgsPoint mapPoint () const
 Point in map coordinates. More...
 
QgsQuickMapSettingsmapSettings () const
 Map settings used to define the map canvas CRS and detect any extent change. More...
 
double screenDistance () const
 Distance in screen coordinates (read-only) More...
 
QPointF screenPoint () const
 Point in screen coordinates (read-only) More...
 
void setMapDistance (const double distance)
 Distance in map unit. More...
 
void setMapPoint (const QgsPoint &point)
 Point in map coordinates. More...
 
void setMapSettings (QgsQuickMapSettings *mapSettings)
 Map settings used to define the map canvas CRS and detect any extent change. More...
 

Properties

double mapDistance
 Distance in map unit. More...
 
QgsPoint mapPoint
 Point in map coordinates. More...
 
QgsQuickMapSettingsmapSettings
 Map settings used to define the map canvas CRS and detect any extent change. More...
 
double screenDistance
 Distance in screen coordinates (read-only) More...
 
QPointF screenPoint
 Point in screen coordinates (read-only) More...
 

Detailed Description

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.

Since
QGIS 3.32

Definition at line 34 of file qgsquickmaptoscreen.h.

Constructor & Destructor Documentation

◆ QgsQuickMapToScreen()

QgsQuickMapToScreen::QgsQuickMapToScreen ( QObject *  parent = nullptr)
explicit

Creates a map to screen object.

Definition at line 19 of file qgsquickmaptoscreen.cpp.

Member Function Documentation

◆ mapDistance()

double QgsQuickMapToScreen::mapDistance ( ) const

Distance in map unit.

Definition at line 96 of file qgsquickmaptoscreen.cpp.

◆ mapDistanceChanged

void QgsQuickMapToScreen::mapDistanceChanged ( )
signal

Distance in map unit.

◆ mapPoint()

QgsPoint QgsQuickMapToScreen::mapPoint ( ) const

Point in map coordinates.

Definition at line 63 of file qgsquickmaptoscreen.cpp.

◆ mapPointChanged

void QgsQuickMapToScreen::mapPointChanged ( )
signal

Point in map coordinates.

◆ mapSettings()

QgsQuickMapSettings * QgsQuickMapToScreen::mapSettings ( ) const

Map settings used to define the map canvas CRS and detect any extent change.

Definition at line 48 of file qgsquickmaptoscreen.cpp.

◆ mapSettingsChanged

void QgsQuickMapToScreen::mapSettingsChanged ( )
signal

Map settings used to define the map canvas CRS and detect any extent change.

◆ screenDistance()

double QgsQuickMapToScreen::screenDistance ( ) const

Distance in screen coordinates (read-only)

Definition at line 101 of file qgsquickmaptoscreen.cpp.

◆ screenDistanceChanged

void QgsQuickMapToScreen::screenDistanceChanged ( )
signal

Distance in screen coordinates (read-only)

◆ screenPoint()

QPointF QgsQuickMapToScreen::screenPoint ( ) const

Point in screen coordinates (read-only)

Definition at line 68 of file qgsquickmaptoscreen.cpp.

◆ screenPointChanged

void QgsQuickMapToScreen::screenPointChanged ( )
signal

Point in screen coordinates (read-only)

◆ setMapDistance()

void QgsQuickMapToScreen::setMapDistance ( const double  distance)

Distance in map unit.

Definition at line 86 of file qgsquickmaptoscreen.cpp.

◆ setMapPoint()

void QgsQuickMapToScreen::setMapPoint ( const QgsPoint point)

Point in map coordinates.

Definition at line 53 of file qgsquickmaptoscreen.cpp.

◆ setMapSettings()

void QgsQuickMapToScreen::setMapSettings ( QgsQuickMapSettings mapSettings)

Map settings used to define the map canvas CRS and detect any extent change.

Definition at line 24 of file qgsquickmaptoscreen.cpp.

Property Documentation

◆ mapDistance

double QgsQuickMapToScreen::mapDistance
readwrite

Distance in map unit.

Definition at line 34 of file qgsquickmaptoscreen.h.

◆ mapPoint

QgsPoint QgsQuickMapToScreen::mapPoint
readwrite

Point in map coordinates.

Definition at line 34 of file qgsquickmaptoscreen.h.

◆ mapSettings

QgsQuickMapSettings * QgsQuickMapToScreen::mapSettings
readwrite

Map settings used to define the map canvas CRS and detect any extent change.

Definition at line 34 of file qgsquickmaptoscreen.h.

◆ screenDistance

double QgsQuickMapToScreen::screenDistance
read

Distance in screen coordinates (read-only)

Definition at line 34 of file qgsquickmaptoscreen.h.

◆ screenPoint

QPointF QgsQuickMapToScreen::screenPoint
read

Point in screen coordinates (read-only)

Definition at line 34 of file qgsquickmaptoscreen.h.


The documentation for this class was generated from the following files: