Class: QgsExpressionBuilderDialog¶
- class qgis.gui.QgsExpressionBuilderDialog¶
Bases:
PyQt5.QtWidgets.QDialog
A generic dialog for building expression strings @remarks This class also shows an example on how to use
QgsExpressionBuilderWidget
Methods
Allow accepting invalid expressions.
Is called when the dialog get accepted or rejected Used to save geometry
Returns the expected format string, which is shown in the dialog.
The builder widget that is used by the dialog
Returns the expression context for the dialog.
- rtype:
str
Allow accepting expressions with evaluation errors.
Set the
expected
format string, which is shown in the dialog.Sets the expression context for the dialog.
- param text:
Sets geometry calculator used in distance/area calculations.
Signals
pyqtSignal(*types, name: str = ..., revision: int = ..., arguments: Sequence = ...) -> PYQT_SIGNAL
- accept(self)¶
- actionEvent(self, QActionEvent)¶
- allowEvalErrors(self) bool ¶
Allow accepting invalid expressions. This can be useful when we are not able to provide an expression context of which we are sure it’s completely populated.
- Return type:
bool
- allowEvalErrorsChanged¶
pyqtSignal(*types, name: str = …, revision: int = …, arguments: Sequence = …) -> PYQT_SIGNAL
types is normally a sequence of individual types. Each type is either a type object or a string that is the name of a C++ type. Alternatively each type could itself be a sequence of types each describing a different overloaded signal. name is the optional C++ name of the signal. If it is not specified then the name of the class attribute that is bound to the signal is used. revision is the optional revision of the signal that is exported to QML. If it is not specified then 0 is used. arguments is the optional sequence of the names of the signal’s arguments.
- Parameters:
name (str = ...) –
revision (int = ...) –
arguments (Sequence = ...) –
- Return type:
PYQT_SIGNAL
- changeEvent(self, QEvent)¶
- childEvent(self, QChildEvent)¶
- closeEvent(self, QCloseEvent)¶
- connectNotify(self, QMetaMethod)¶
- contextMenuEvent(self, QContextMenuEvent)¶
- create(self, window: PyQt5.sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)¶
- customEvent(self, QEvent)¶
- destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)¶
- disconnectNotify(self, QMetaMethod)¶
- done(self, r: int)¶
Is called when the dialog get accepted or rejected Used to save geometry
- Parameters:
r (int) – result value (unused)
- dragEnterEvent(self, QDragEnterEvent)¶
- dragLeaveEvent(self, QDragLeaveEvent)¶
- dragMoveEvent(self, QDragMoveEvent)¶
- dropEvent(self, QDropEvent)¶
- enterEvent(self, QEvent)¶
- event(self, QEvent) bool ¶
- eventFilter(self, QObject, QEvent) bool ¶
- expectedOutputFormat(self) str ¶
Returns the expected format string, which is shown in the dialog. This is purely a text format and no expression validation is done against it.
See also
- Return type:
str
- expressionBuilder(self) QgsExpressionBuilderWidget ¶
The builder widget that is used by the dialog
- Return type:
- expressionContext(self) QgsExpressionContext ¶
Returns the expression context for the dialog. The context is used for the expression preview result and for populating the list of available functions and variables.
See also
- Return type:
- expressionText(self) str ¶
- Return type:
str
- 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], PyQt5.sip.voidptr) Tuple[bool, int] ¶
- paintEvent(self, QPaintEvent)¶
- receivers(self, PYQT_SIGNAL) int ¶
- reject(self)¶
- resizeEvent(self, QResizeEvent)¶
- sender(self) QObject ¶
- senderSignalIndex(self) int ¶
- setAllowEvalErrors(self, allowEvalErrors: bool)¶
Allow accepting expressions with evaluation errors. This can be useful when we are not able to provide an expression context of which we are sure it’s completely populated.
- Parameters:
allowEvalErrors (bool) –
- setExpectedOutputFormat(self, expected: str)¶
Set the
expected
format string, which is shown in the dialog. This is purely a text format and no expression validation is done against it.See also
- Parameters:
expected (str) –
- setExpressionContext(self, context: QgsExpressionContext)¶
Sets the expression context for the dialog. The context is used for the expression preview result and for populating the list of available functions and variables.
- Parameters:
context (QgsExpressionContext) – expression context
See also
- setExpressionText(self, text: str)¶
- Parameters:
text (str) –
- setGeomCalculator(self, da: QgsDistanceArea)¶
Sets geometry calculator used in distance/area calculations.
- Parameters:
da (QgsDistanceArea) –
- showEvent(self, QShowEvent)¶
- tabletEvent(self, QTabletEvent)¶
- timerEvent(self, QTimerEvent)¶
- updateMicroFocus(self)¶
- wheelEvent(self, QWheelEvent)¶