Class: QgsCoordinateOperationWidget¶
- class qgis.gui.QgsCoordinateOperationWidget¶
Bases:
PyQt5.QtWidgets.QWidget
A widget for selecting the coordinate operation to use when transforming between a source and destination coordinate reference system.
New in version 3.12.
QgsCoordinateOperationWidget(parent: QWidget = None) Constructor for QgsCoordinateOperationWidget.
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
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- class OperationDetails¶
- class OperationDetails(QgsCoordinateOperationWidget.OperationDetails)
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: PyQt5.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], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- operationChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- operationDoubleClicked¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_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)¶