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
Returns a list of the available operations shown in the widget.
Returns the details of the default operation suggested by the widget.
Returns the destination CRS for the operations shown in the widget.
Returns
True
if there is a valid selection in the widget.Returns
True
if the “make default” option is selected.Returns the details of the operation currently selected within the widget.
Sets the destination
crs
for the operations shown in the widget.Sets a map
canvas
to link to the widget, which allows the widget’s choices to reflect the current canvas state.Sets the details of the
operation
currently selected within the widget.Automatically sets the selected operation using the settings encapsulated in a transform
context
.Sets whether the “allow fallback” operations option is visible.
Sets whether the “make default” checkbox should be shown.
Sets the source
crs
for the operations shown in the widget.Returns the source CRS for the operations shown in the widget.
Signals
Emitted when the operation selected in the dialog is changed.
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
- 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
- destinationCrs(self) → QgsCoordinateReferenceSystem¶
Returns the destination CRS for the operations shown in the widget.
See also
See also
- Return type
- 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.
See also
- Return type
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- setDestinationCrs(self, crs: QgsCoordinateReferenceSystem)¶
Sets the destination
crs
for the operations shown in the widget.See also
See also
- 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.See also
- 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
See also
- Parameters
crs (QgsCoordinateReferenceSystem) –
- showEvent(self, QShowEvent)¶
- sourceCrs(self) → QgsCoordinateReferenceSystem¶
Returns the source CRS for the operations shown in the widget.
See also
See also
- Return type
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶