QGIS API Documentation 3.39.0-Master (be2050b798e)
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 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 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: