QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
Loading...
Searching...
No Matches
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.
 
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.
 
QgsQuickMapSettingsmapSettings () 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.
 
QgsQuickMapSettingsmapSettings
 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)
 

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 20 of file qgsquickmaptoscreen.cpp.

Member Function Documentation

◆ mapDistance()

double QgsQuickMapToScreen::mapDistance ( ) const

Distance in map unit.

Definition at line 97 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 64 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 49 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 102 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 69 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 87 of file qgsquickmaptoscreen.cpp.

◆ setMapPoint()

void QgsQuickMapToScreen::setMapPoint ( const QgsPoint point)

Point in map coordinates.

Definition at line 54 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 25 of file qgsquickmaptoscreen.cpp.

Property Documentation

◆ mapDistance

double QgsQuickMapToScreen::mapDistance
readwrite

Distance in map unit.

Definition at line 47 of file qgsquickmaptoscreen.h.

◆ mapPoint

QgsPoint QgsQuickMapToScreen::mapPoint
readwrite

Point in map coordinates.

Definition at line 42 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 39 of file qgsquickmaptoscreen.h.

◆ screenDistance

double QgsQuickMapToScreen::screenDistance
read

Distance in screen coordinates (read-only)

Definition at line 49 of file qgsquickmaptoscreen.h.

◆ screenPoint

QPointF QgsQuickMapToScreen::screenPoint
read

Point in screen coordinates (read-only)

Definition at line 44 of file qgsquickmaptoscreen.h.


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