Class: QgsAttributeDialog¶
-
class
qgis.gui.
QgsAttributeDialog
(vl: QgsVectorLayer, thepFeature: QgsFeature, featureOwner: bool, parent: QWidget = None, showDialogButtons: bool = True, context: QgsAttributeEditorContext = QgsAttributeEditorContext())¶ Bases:
PyQt5.QtWidgets.QDialog
Create an attribute dialog for a given layer and feature
- Parameters
vl (QgsVectorLayer) – The layer for which the dialog will be generated
thepFeature (QgsFeature) – A feature for which the dialog will be generated
featureOwner (bool) – Set to
True
, if the dialog should take ownership of the featureparent (QWidget = None) – A parent widget for the dialog
showDialogButtons (bool = True) –
True
: Show the dialog buttons accept/cancelcontext (
QgsAttributeEditorContext
= QgsAttributeEditorContext()) –The context in which this dialog is created
Methods
- rtype
QgsAttributeForm
Is this dialog editable?
Intercept window activate/deactivate events to show/hide the highlighted feature.
- rtype
QgsFeature
Sets the edit command message (Undo) that will be used when the dialog is accepted
setHighlight
Toggles the form mode.
Show the dialog non-blocking.
-
accept
(self)¶
-
actionEvent
(self, QActionEvent)¶
-
attributeForm
(self) → QgsAttributeForm¶ - 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)¶
-
destroy
(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
-
disconnectNotify
(self, QMetaMethod)¶
-
dragEnterEvent
(self, QDragEnterEvent)¶
-
dragLeaveEvent
(self, QDragLeaveEvent)¶
-
dragMoveEvent
(self, QDragMoveEvent)¶
-
dropEvent
(self, QDropEvent)¶
-
editable
(self) → bool¶ Is this dialog editable?
- Return type
bool
- Returns
returns
True
, if this dialog was created in an editable manner.
-
enterEvent
(self, QEvent)¶
-
event
(self, e: QEvent) → bool¶ Intercept window activate/deactivate events to show/hide the highlighted feature.
- Parameters
e (QEvent) – The event
- Return type
bool
- Returns
The same as the parent QDialog
-
eventFilter
(self, QObject, QEvent) → bool¶
-
feature
(self) → QgsFeature¶ - Return type
-
focusInEvent
(self, QFocusEvent)¶
-
focusNextChild
(self) → bool¶
-
focusNextPrevChild
(self, bool) → bool¶
-
focusOutEvent
(self, QFocusEvent)¶
-
focusPreviousChild
(self) → bool¶
-
hideEvent
(self, QHideEvent)¶
-
initPainter
(self, QPainter)¶
-
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)¶
-
receivers
(self, PYQT_SIGNAL) → int¶
-
reject
(self)¶
-
resizeEvent
(self, QResizeEvent)¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
setEditCommandMessage
(self, message: str)¶ Sets the edit command message (Undo) that will be used when the dialog is accepted
- Parameters
message (str) – The message
-
setHighlight
(self, h: QgsHighlight)¶ setHighlight
- Parameters
h (QgsHighlight) – The highlight. Ownership is taken.
-
setMode
(self, mode: QgsAttributeEditorContext.Mode)¶ Toggles the form mode.
- Parameters
mode (QgsAttributeEditorContext.Mode) – form mode. For example, if set to QgsAttributeEditorContext.AddFeatureMode, the dialog will be editable even with an invalid feature and will add a new feature when the form is accepted.
-
show
(self)¶ Show the dialog non-blocking. Reparents this dialog to be a child of the dialog form
-
showEvent
(self, QShowEvent)¶
-
tabletEvent
(self, QTabletEvent)¶
-
timerEvent
(self, QTimerEvent)¶
-
updateMicroFocus
(self)¶
-
wheelEvent
(self, QWheelEvent)¶