Class: QgsCoordinateOperationWidget

class qgis.gui.QgsCoordinateOperationWidget(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QWidget

Constructor for QgsCoordinateOperationWidget.

A widget for selecting the coordinate operation to use when transforming between a source and destination coordinate reference system.

New in version 3.12.

Parameters

parent

class OperationDetails

Bases: sip.wrapper

QgsCoordinateOperationWidget.OperationDetails(QgsCoordinateOperationWidget.OperationDetails)

allowFallback
destinationTransformId
isAvailable
proj
sourceTransformId
actionEvent()
availableOperations(self) → List[QgsCoordinateOperationWidget.OperationDetails]

Returns a list of the available operations shown in the widget.

Return type

List[QgsCoordinateOperationWidget.OperationDetails]

changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
defaultOperation(self) → QgsCoordinateOperationWidget.OperationDetails

Returns the details of the default operation suggested by the widget.

Return type

QgsCoordinateOperationWidget.OperationDetails

destinationCrs(self)QgsCoordinateReferenceSystem

Returns the destination CRS for the operations shown in the widget.

See also

sourceCrs()

Return type

QgsCoordinateReferenceSystem

destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hasSelection(self) → bool

Returns True if there is a valid selection in the widget.

Return type

bool

hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
makeDefaultSelected(self) → bool

Returns True if the “make default” option is selected.

Return type

bool

metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
operationChanged

Emitted when the operation selected in the dialog is changed. [signal]

operationDoubleClicked

Emitted when an operation is double-clicked in the widget. [signal]

paintEvent()
receivers()
resizeEvent()
selectedOperation(self) → QgsCoordinateOperationWidget.OperationDetails

Returns the details of the operation currently selected within the widget.

Return type

QgsCoordinateOperationWidget.OperationDetails

sender()
senderSignalIndex()
setDestinationCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the destination crs for the operations shown in the widget.

See also

destinationCrs()

See also

setSourceCrs()

Parameters

crs (QgsCoordinateReferenceSystem) –

setMapCanvas(self, canvas: QgsMapCanvas)

Sets a map canvas to link to the widget, which allows the widget’s choices to reflect the current canvas state.

Parameters

canvas (QgsMapCanvas) –

setSelectedOperation(self, operation: QgsCoordinateOperationWidget.OperationDetails)

Sets the details of the operation currently selected within the widget.

Parameters

operation (QgsCoordinateOperationWidget.OperationDetails) –

setSelectedOperationUsingContext(self, context: QgsCoordinateTransformContext)

Automatically sets the selected operation using the settings encapsulated in a transform context.

If no matching operations are found within the context then the defaultOperation() will be selected.

Parameters

context (QgsCoordinateTransformContext) –

setShowFallbackOption(self, visible: bool)

Sets whether the “allow fallback” operations option is visible.

New in version 3.12.

Parameters

visible (bool) –

setShowMakeDefault(self, show: bool)

Sets whether the “make default” checkbox should be shown.

Parameters

show (bool) –

setSourceCrs(self, crs: QgsCoordinateReferenceSystem)

Sets the source crs for the operations shown in the widget.

See also

sourceCrs()

Parameters

crs (QgsCoordinateReferenceSystem) –

sharedPainter()
showEvent()
sourceCrs(self)QgsCoordinateReferenceSystem

Returns the source CRS for the operations shown in the widget.

See also

setSourceCrs()

See also

destinationCrs()

Return type

QgsCoordinateReferenceSystem

tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()