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.

Methods

actionEvent

availableOperations

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

changeEvent

childEvent

closeEvent

connectNotify

contextMenuEvent

create

customEvent

defaultOperation

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

destinationCrs

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

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

enterEvent

event

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hasSelection

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

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

makeDefaultSelected

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

metric

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

resizeEvent

selectedOperation

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

sender

senderSignalIndex

setDestinationCrs

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

setMapCanvas

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

setSelectedOperation

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

setSelectedOperationUsingContext

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

setShowFallbackOption

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

setShowMakeDefault

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

setSourceCrs

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

sharedPainter

showEvent

sourceCrs

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

tabletEvent

timerEvent

updateMicroFocus

wheelEvent

Signals

operationChanged

Emitted when the operation selected in the dialog is changed.

operationDoubleClicked

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

class OperationDetails
class OperationDetails(QgsCoordinateOperationWidget.OperationDetails)None

Bases: sip.wrapper

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

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

Return type

List[QgsCoordinateOperationWidget.OperationDetails]

changeEvent(self, QEvent)
childEvent(self, QChildEvent)
closeEvent(self, QCloseEvent)
connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
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(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
enterEvent(self, QEvent)
event(self, QEvent)bool
focusInEvent(self, QFocusEvent)
focusNextChild(self)bool
focusNextPrevChild(self, bool)bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self)bool
hasSelection(self)bool

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

Return type

bool

hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod)bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
makeDefaultSelected(self)bool

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

Return type

bool

metric(self, QPaintDevice.PaintDeviceMetric)int
mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr)Tuple[bool, int]
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(self, QPaintEvent)
receivers(self, PYQT_SIGNAL)int
resizeEvent(self, QResizeEvent)
selectedOperation(self)QgsCoordinateOperationWidget.OperationDetails

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

Return type

QgsCoordinateOperationWidget.OperationDetails

sender(self)QObject
senderSignalIndex(self)int
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(self)QPainter
showEvent(self, QShowEvent)
sourceCrs(self)QgsCoordinateReferenceSystem

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

See also

setSourceCrs()

See also

destinationCrs()

Return type

QgsCoordinateReferenceSystem

tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
updateMicroFocus(self)
wheelEvent(self, QWheelEvent)