Skip to content

Class QfMapToScreen

ClassList > QfMapToScreen

The QfMapToScreen class transform a map point to screen coordinates. The map point CRS is the one from the map settings. Screen point will be automatically updated on map extent changes.

  • #include <qfmaptoscreen.h>

Inherits the following classes: QObject

Public Properties

Type Name
property double mapDistance
the distance in map unit
property QgsPoint mapPoint
the point in map coordinates
property QgsQuickMapSettings * mapSettings
Map settings is used to define the map canvas CRS and detect any extent change.
property double screenDistance
the distance in screen coordinates (read-only)
property QPointF screenPoint
the point in screen coordinates (read-only)

Public Signals

Type Name
signal void mapDistanceChanged
the distance in map unit
signal void mapPointChanged
the point in map coordinates
signal void mapSettingsChanged
Map settings is used to define the map canvas CRS and detect any extent change.
signal void screenDistanceChanged
the distance in screen coordinates (read-only)
signal void screenPointChanged
the point in screen coordinates (read-only)

Public Functions

Type Name
QfMapToScreen (QObject * parent=nullptr)
double mapDistance () const
the distance in map unit
QgsPoint mapPoint () const
the point in map coordinates
QgsQuickMapSettings * mapSettings () const
Map settings is used to define the map canvas CRS and detect any extent change.
double screenDistance () const
the distance in screen coordinates (read-only)
QPointF screenPoint () const
the point in screen coordinates (read-only)
void setMapDistance (const double distance)
the distance in map unit
void setMapPoint (const QgsPoint & point)
the point in map coordinates
void setMapSettings (QgsQuickMapSettings * mapSettings)
Map settings is used to define the map canvas CRS and detect any extent change.

Public Properties Documentation

property mapDistance [1/2]

the distance in map unit

double QfMapToScreen::mapDistance;


property mapPoint [1/2]

the point in map coordinates

QgsPoint QfMapToScreen::mapPoint;


property mapSettings [1/2]

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

QgsQuickMapSettings * QfMapToScreen::mapSettings;


property screenDistance [1/2]

the distance in screen coordinates (read-only)

double QfMapToScreen::screenDistance;


property screenPoint [1/2]

the point in screen coordinates (read-only)

QPointF QfMapToScreen::screenPoint;


Public Signals Documentation

signal mapDistanceChanged

the distance in map unit

void QfMapToScreen::mapDistanceChanged;


signal mapPointChanged

the point in map coordinates

void QfMapToScreen::mapPointChanged;


signal mapSettingsChanged

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

void QfMapToScreen::mapSettingsChanged;


signal screenDistanceChanged

the distance in screen coordinates (read-only)

void QfMapToScreen::screenDistanceChanged;


signal screenPointChanged

the point in screen coordinates (read-only)

void QfMapToScreen::screenPointChanged;


Public Functions Documentation

function QfMapToScreen

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

function mapDistance [2/2]

the distance in map unit

double QfMapToScreen::mapDistance () const


function mapPoint [2/2]

the point in map coordinates

QgsPoint QfMapToScreen::mapPoint () const


function mapSettings [2/2]

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

QgsQuickMapSettings * QfMapToScreen::mapSettings () const


function screenDistance [2/2]

the distance in screen coordinates (read-only)

double QfMapToScreen::screenDistance () const


function screenPoint [2/2]

the point in screen coordinates (read-only)

QPointF QfMapToScreen::screenPoint () const


function setMapDistance

the distance in map unit

void QfMapToScreen::setMapDistance (
    const double distance
) 


function setMapPoint

the point in map coordinates

void QfMapToScreen::setMapPoint (
    const QgsPoint & point
) 


function setMapSettings

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

void QfMapToScreen::setMapSettings (
    QgsQuickMapSettings * mapSettings
) 



The documentation for this class was generated from the following file src/core/qfmaptoscreen.h