QGIS API Documentation  3.17.0-Master (df2c9ff931)
Classes | Public Member Functions | Static Public Member Functions | Friends | List of all members
QgsDatumTransformDialog Class Reference

#include <qgsdatumtransformdialog.h>

Inheritance diagram for QgsDatumTransformDialog:
Inheritance graph
[legend]

Classes

struct  TransformInfo
 Dialog transformation entry info. More...
 

Public Member Functions

 QgsDatumTransformDialog (const QgsCoordinateReferenceSystem &sourceCrs=QgsCoordinateReferenceSystem(), const QgsCoordinateReferenceSystem &destinationCrs=QgsCoordinateReferenceSystem(), bool allowCrsChanges=false, bool showMakeDefault=true, bool forceChoice=true, QPair< int, int > selectedDatumTransforms=qMakePair(-1, -1), QWidget *parent=nullptr, Qt::WindowFlags f=Qt::WindowFlags(), const QString &selectedProj=QString(), QgsMapCanvas *mapCanvas=nullptr, bool allowFallback=true)
 Constructor for QgsDatumTransformDialog. More...
 
void accept () override
 
void reject () override
 
TransformInfo selectedDatumTransform ()
 Returns the source and destination transforms, each being a pair of QgsCoordinateReferenceSystems and datum transform code. More...
 

Static Public Member Functions

static bool run (const QgsCoordinateReferenceSystem &sourceCrs=QgsCoordinateReferenceSystem(), const QgsCoordinateReferenceSystem &destinationCrs=QgsCoordinateReferenceSystem(), QWidget *parent=nullptr, QgsMapCanvas *mapCanvas=nullptr, const QString &windowTitle=QString())
 Runs the dialog (if required) prompting for the desired transform to use from sourceCrs to destinationCrs, updating the current project transform context as required based on the results of the run. More...
 

Friends

class TestQgsDatumTransformDialog
 

Detailed Description

Note
not available in Python bindings

Definition at line 34 of file qgsdatumtransformdialog.h.

Constructor & Destructor Documentation

◆ QgsDatumTransformDialog()

QgsDatumTransformDialog::QgsDatumTransformDialog ( const QgsCoordinateReferenceSystem sourceCrs = QgsCoordinateReferenceSystem(),
const QgsCoordinateReferenceSystem destinationCrs = QgsCoordinateReferenceSystem(),
bool  allowCrsChanges = false,
bool  showMakeDefault = true,
bool  forceChoice = true,
QPair< int, int >  selectedDatumTransforms = qMakePair( -1, -1 ),
QWidget *  parent = nullptr,
Qt::WindowFlags  f = Qt::WindowFlags(),
const QString &  selectedProj = QString(),
QgsMapCanvas mapCanvas = nullptr,
bool  allowFallback = true 
)

Constructor for QgsDatumTransformDialog.

Definition at line 76 of file qgsdatumtransformdialog.cpp.

Member Function Documentation

◆ accept()

void QgsDatumTransformDialog::accept ( )
override

Definition at line 171 of file qgsdatumtransformdialog.cpp.

◆ reject()

void QgsDatumTransformDialog::reject ( )
override

Definition at line 200 of file qgsdatumtransformdialog.cpp.

◆ run()

bool QgsDatumTransformDialog::run ( const QgsCoordinateReferenceSystem sourceCrs = QgsCoordinateReferenceSystem(),
const QgsCoordinateReferenceSystem destinationCrs = QgsCoordinateReferenceSystem(),
QWidget *  parent = nullptr,
QgsMapCanvas mapCanvas = nullptr,
const QString &  windowTitle = QString() 
)
static

Runs the dialog (if required) prompting for the desired transform to use from sourceCrs to destinationCrs, updating the current project transform context as required based on the results of the run.

This handles EVERYTHING, including only showing the dialog if multiple choices exist and the user has asked to be prompted, not re-adding transforms already in the current project context, etc.

The optional mapCanvas argument can be used to refine the dialog's display based on the current map canvas extent.

Since
QGIS 3.8

Definition at line 36 of file qgsdatumtransformdialog.cpp.

◆ selectedDatumTransform()

QgsDatumTransformDialog::TransformInfo QgsDatumTransformDialog::selectedDatumTransform ( )

Returns the source and destination transforms, each being a pair of QgsCoordinateReferenceSystems and datum transform code.

Since
3.0

Definition at line 250 of file qgsdatumtransformdialog.cpp.

Friends And Related Function Documentation

◆ TestQgsDatumTransformDialog

friend class TestQgsDatumTransformDialog
friend

Definition at line 150 of file qgsdatumtransformdialog.h.


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