QgsExpressionPreviewWidget is a widget to preview an expression result.
More...
#include <qgsexpressionpreviewwidget.h>
QgsExpressionPreviewWidget is a widget to preview an expression result.
If the layer is set, one can browse across features to see the different outputs.
- Since
- QGIS 3.14
Definition at line 35 of file qgsexpressionpreviewwidget.h.
◆ QgsExpressionPreviewWidget()
QgsExpressionPreviewWidget::QgsExpressionPreviewWidget |
( |
QWidget * |
parent = nullptr | ) |
|
|
explicit |
◆ evalError()
bool QgsExpressionPreviewWidget::evalError |
( |
| ) |
const |
◆ evalErrorChanged
void QgsExpressionPreviewWidget::evalErrorChanged |
( |
| ) |
|
|
signal |
Will be set to true
if the current expression text reported an eval error with the context.
◆ expressionContext()
Returns the expression context for the widget.
The context is used for the expression preview result and for populating the list of available functions and variables.
- See also
- setExpressionContext
Definition at line 53 of file qgsexpressionpreviewwidget.h.
◆ expressionParsed
void QgsExpressionPreviewWidget::expressionParsed |
( |
bool |
isValid | ) |
|
|
signal |
Emitted when the user changes the expression in the widget.
Users of this widget should connect to this signal to decide if to let the user continue.
- Parameters
-
isValid | Is true if the expression the user has typed is valid. |
◆ parserError()
bool QgsExpressionPreviewWidget::parserError |
( |
| ) |
const |
◆ parserErrorChanged
void QgsExpressionPreviewWidget::parserErrorChanged |
( |
| ) |
|
|
signal |
Will be set to true
if the current expression text reported a parser error with the context.
◆ parserErrors()
◆ rootNode()
◆ setCurrentFeature
void QgsExpressionPreviewWidget::setCurrentFeature |
( |
const QgsFeature & |
feature | ) |
|
|
slot |
◆ setExpressionContext()
Sets the expression context for the widget.
The context is used for the expression preview result and to populate the list of available functions and variables.
- Parameters
-
context | expression context |
Definition at line 68 of file qgsexpressionpreviewwidget.cpp.
◆ setExpressionText()
void QgsExpressionPreviewWidget::setExpressionText |
( |
const QString & |
expression | ) |
|
◆ setGeomCalculator()
void QgsExpressionPreviewWidget::setGeomCalculator |
( |
const QgsDistanceArea & |
da | ) |
|
◆ setLayer()
◆ toolTipChanged
void QgsExpressionPreviewWidget::toolTipChanged |
( |
const QString & |
toolTip | ) |
|
|
signal |
Emitted whenever the tool tip changed.
The documentation for this class was generated from the following files: