Class: QgsNewMemoryLayerDialog

class qgis.gui.QgsNewMemoryLayerDialog(parent: QWidget = None, fl: Union[Qt.WindowFlags, Qt.WindowType] = QgsGuiUtils.ModalDialogFlags)

Bases: PyQt5.QtWidgets.QDialog

New dialog constructor.

Parameters
  • parent (QWidget = None) –

  • fl

actionEvent()
changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
crs(self) → QgsCoordinateReferenceSystem

Returns the selected CRS for the new layer.

See also

setCrs()

Return type

QgsCoordinateReferenceSystem

customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
enterEvent()
event()
eventFilter()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
layerName(self) → str

Returns the layer name

Return type

str

leaveEvent()
metric()
mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
runAndCreateLayer(parent: QWidget = None, defaultCrs: QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem()) → QgsVectorLayer

Runs the dialog and creates a new memory layer

Parameters
  • parent (QWidget = None) – parent widget

  • defaultCrs (QgsCoordinateReferenceSystem = QgsCoordinateReferenceSystem()) – default layer CRS to show in dialog

Return type

QgsVectorLayer

Returns

new memory layer

selectedType(self) → QgsWkbTypes.Type

Returns the selected geometry type

Return type

QgsWkbTypes.Type

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

Sets the crs value for the new layer in the dialog.

See also

crs()

New in version 3.0.

Parameters

crs (QgsCoordinateReferenceSystem) –

sharedPainter()
showEvent()
tabletEvent()
timerEvent()
updateMicroFocus()
wheelEvent()