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 feature
parent (QWidget = None) – A parent widget for the dialog
showDialogButtons (bool = True) – True: Show the dialog buttons accept/cancel
context (
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
()¶
-
attributeForm
(self) → QgsAttributeForm¶ - Return type
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
editable
(self) → bool¶ Is this dialog editable?
- Return type
bool
- Returns
returns true, if this dialog was created in an editable manner.
-
enterEvent
()¶
-
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
()¶
-
feature
(self) → QgsFeature¶ - Return type
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
()¶
-
receivers
()¶
-
reject
(self)¶
-
resizeEvent
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
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
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶