Class: QgsPropertyAssistantWidget¶
- class qgis.gui.QgsPropertyAssistantWidget(parent: QWidget = None, definition: QgsPropertyDefinition = QgsPropertyDefinition(), initialState: QgsProperty = QgsProperty(), layer: QgsVectorLayer = None)¶
Bases:
QgsPanelWidget
Constructor for
QgsPropertyAssistantWidget
. Aside from aparent
widget, the constructor accepts a corresponding propertydefinition
from which it customizes the displayed options (eg a color based property definition will show an assistant to allow creation of color based properties). TheinitialState
dictates the initial state to show in the widget. A correspondinglayer
can also be set to allow population of GUI widgets such as field selectors.Shows a user-friendly assistant guiding users through the creation of
QgsProperty
overrides.Methods
Overridden key press event to handle the esc event on the widget.
Register an expression context generator class that will be used to retrieve an expression context for the button when required.
- param dockMode
Updates a
property
in place to corresponding to the current settings shown in the widget.- 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)¶
- 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¶
- hideEvent(self, QHideEvent)¶
- initPainter(self, QPainter)¶
- inputMethodEvent(self, QInputMethodEvent)¶
- isSignalConnected(self, QMetaMethod) → bool¶
- keyPressEvent(self, event: QKeyEvent)¶
Overridden key press event to handle the esc event on the widget.
- Parameters
event – The key event
- 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¶
- registerExpressionContextGenerator(self, generator: QgsExpressionContextGenerator)¶
Register an expression context generator class that will be used to retrieve an expression context for the button when required.
- Parameters
generator (QgsExpressionContextGenerator) –
- resizeEvent(self, QResizeEvent)¶
- sender(self) → QObject¶
- senderSignalIndex(self) → int¶
- setDockMode(self, dockMode: bool)¶
- Parameters
dockMode (bool) –
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- updateProperty(self, property: QgsProperty)¶
Updates a
property
in place to corresponding to the current settings shown in the widget.- Parameters
property (QgsProperty) –
- wheelEvent(self, QWheelEvent)¶