Class: QgsProjectionSelectionTreeWidget¶
- class qgis.gui.QgsProjectionSelectionTreeWidget(parent: QWidget = None)¶
Bases:
PyQt5.QtWidgets.QWidget
Constructor for QgsProjectionSelectionTreeWidget.
A widget for selecting a coordinate reference system from a tree.
This widget implements a tree view of projections, as seen in the
QgsProjectionSelectionDialog
dialog. In most cases it is more suitable to use the compactQgsProjectionSelectionWidget
widget.See also
See also
New in version 3.0:
Methods
Returns the CRS currently selected in the widget.
Returns
True
if the current selection in the widget is a valid choice.The initial "preview" rectangle for the bounds overview map.
Marks the current selected projection for push to front of recent projections list.
- param event
Sets the initial
crs
to show within the dialog.Sets the text to show for the not set option.
filters this widget by the given CRSs
Sets the initial "preview" rectangle for the bounds overview map.
Sets whether to show the bounnds preview map.
Sets whether a "no/invalid" projection option should be shown.
Returns whether the bounds preview map is shown.
- param event
Returns whether the "no/invalid" projection option is shown.
Signals
Emitted when a projection is selected in the widget.
Notifies others that the widget is now fully initialized, including deferred selection of projection.
Emitted when a projection is double clicked in the list.
- actionEvent(self, QActionEvent)¶
- 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)¶
- crs(self) QgsCoordinateReferenceSystem ¶
Returns the CRS currently selected in the widget.
See also
New in version 3.0.
- Return type
- crsSelected¶
Emitted when a projection is selected in the widget. [signal]
- customEvent(self, QEvent)¶
- 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 ¶
- hasValidSelection(self) bool ¶
Returns
True
if the current selection in the widget is a valid choice. Valid selections include any projection and also the “no/invalid projection” option (ifsetShowNoProjection()
was called). Invalid selections are the group headers (such as “Geographic Coordinate Systems”)- Return type
bool
- hideEvent(self, QHideEvent)¶
- initPainter(self, QPainter)¶
- initialized¶
Notifies others that the widget is now fully initialized, including deferred selection of projection.
New in version 2.4: [signal]
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) bool ¶
- keyPressEvent(self, QKeyEvent)¶
- keyReleaseEvent(self, QKeyEvent)¶
- leaveEvent(self, QEvent)¶
- 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] ¶
- paintEvent(self, QPaintEvent)¶
- previewRect(self) QgsRectangle ¶
The initial “preview” rectangle for the bounds overview map.
See also
New in version 3.0.
- Return type
- projectionDoubleClicked¶
Emitted when a projection is double clicked in the list.
New in version 2.14: [signal]
- pushProjectionToFront(self)¶
Marks the current selected projection for push to front of recent projections list.
- receivers(self, PYQT_SIGNAL) int ¶
- resizeEvent(self, event: QResizeEvent)¶
- Parameters
event (QResizeEvent) –
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setCrs(self, crs: QgsCoordinateReferenceSystem)¶
Sets the initial
crs
to show within the dialog.See also
New in version 3.0.
- Parameters
crs (QgsCoordinateReferenceSystem) –
- setNotSetText(self, text: str)¶
Sets the text to show for the not set option. Note that this option is not shown by default and must be set visible by calling
setShowNoProjection()
.New in version 3.16.
- Parameters
text (str) –
- setOgcWmsCrsFilter(self, crsFilter: Iterable[str])¶
filters this widget by the given CRSs
Sets this widget to filter the available projections to those listed by the given Coordinate Reference Systems.
- Parameters
crsFilter (Iterable[str]) – a list of OGC Coordinate Reference Systems to filter the list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support.
Warning
This function’s behavior is undefined if it is called after the widget is shown.
- setPreviewRect(self, rect: QgsRectangle)¶
Sets the initial “preview” rectangle for the bounds overview map.
See also
New in version 3.0.
- Parameters
rect (QgsRectangle) –
- setShowBoundsMap(self, show: bool)¶
Sets whether to show the bounnds preview map.
See also
New in version 3.0.
- Parameters
show (bool) –
- setShowNoProjection(self, show: bool)¶
Sets whether a “no/invalid” projection option should be shown. If this option is selected, calling
crs()
will return an invalidQgsCoordinateReferenceSystem
.See also
New in version 3.0.
- Parameters
show (bool) –
- showBoundsMap(self) bool ¶
Returns whether the bounds preview map is shown.
See also
New in version 3.0.
- Return type
bool
- showEvent(self, event: QShowEvent)¶
- Parameters
event (QShowEvent) –
- showNoProjection(self) bool ¶
Returns whether the “no/invalid” projection option is shown. If this option is selected, calling
crs()
will return an invalidQgsCoordinateReferenceSystem
.See also
New in version 3.0.
- Return type
bool
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶