QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsquickcoordinatetransformer.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsquickcoordinatetransformer.h
3 --------------------------------------
4 Date : 1.6.2017
5 Copyright : (C) 2017 by Matthias Kuhn
6 Email : matthias (at) opengis.ch
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSQUICKCOORDINATETRANSFORMER_H
17#define QGSQUICKCOORDINATETRANSFORMER_H
18
19#include "qgis_quick.h"
23#include "qgspoint.h"
24
25#include <QObject>
26
38class QUICK_EXPORT QgsQuickCoordinateTransformer : public QObject
39{
40 Q_OBJECT
41
44
45
47
50
53
56
57 public:
59 explicit QgsQuickCoordinateTransformer( QObject *parent = nullptr );
60
63
66
69
72
75
78
81
84
87
88 signals:
91
94
97
100
103
104 private:
105 void updatePosition();
106
107 QgsPoint mProjectedPosition;
108 QgsPoint mSourcePosition;
109 QgsCoordinateTransform mCoordinateTransform;
110};
111
112#endif // QGSQUICKCOORDINATETRANSFORMER_H
Represents a coordinate reference system (CRS).
Contains information about the context in which a coordinate transform is executed.
Handles coordinate transforms between two coordinate systems.
Point geometry type, with support for z-dimension and m-values.
Definition qgspoint.h:49
QgsCoordinateReferenceSystem sourceCrs
Source CRS, default 4326.
QgsCoordinateReferenceSystem destinationCrs
Destination CRS.
void transformContextChanged()
Transformation context, can be set from QgsQuickMapSettings::transformContext().
void projectedPositionChanged()
Projected (destination) position (in destination CRS).
void sourcePositionChanged()
Source position (in source CRS).
void setTransformContext(const QgsCoordinateTransformContext &context)
Transformation context, can be set from QgsQuickMapSettings::transformContext().
QgsCoordinateTransformContext transformContext
Transformation context, can be set from QgsQuickMapSettings::transformContext().
QgsQuickCoordinateTransformer(QObject *parent=nullptr)
Creates new coordinate transformer.
void sourceCrsChanged()
Source CRS, default 4326.
void setSourceCrs(const QgsCoordinateReferenceSystem &sourceCrs)
Source CRS, default 4326.
QgsPoint projectedPosition
Projected (destination) position (in destination CRS).
QgsPoint sourcePosition
Source position (in source CRS).
void destinationCrsChanged()
Destination CRS.
void setSourcePosition(const QgsPoint &sourcePosition)
Source position (in source CRS).
void setDestinationCrs(const QgsCoordinateReferenceSystem &destinationCrs)
Destination CRS.