A reusable widget that can be used to build a expression string.
More...
#include <qgsexpressionbuilderwidget.h>
Signals |
void | expressionParsed (bool isValid) |
| Emitted when the user changes the expression in the widget.
|
Detailed Description
A reusable widget that can be used to build a expression string.
See QgsExpressionBuilderDialog for exmaple of usage.
Constructor & Destructor Documentation
QgsExpressionBuilderWidget::QgsExpressionBuilderWidget |
( |
QWidget * |
parent | ) |
|
QgsExpressionBuilderWidget::~QgsExpressionBuilderWidget |
( |
| ) |
|
Member Function Documentation
void QgsExpressionBuilderWidget::currentChanged |
( |
const QModelIndex & |
index, |
|
|
const QModelIndex & |
|
|
) |
| |
|
slot |
void QgsExpressionBuilderWidget::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. |
QString QgsExpressionBuilderWidget::expressionText |
( |
| ) |
|
Gets the expression string that has been set in the expression area.
- Returns
- The expression as a string.
bool QgsExpressionBuilderWidget::isExpressionValid |
( |
| ) |
|
void QgsExpressionBuilderWidget::loadAllValues |
( |
| ) |
|
|
slot |
void QgsExpressionBuilderWidget::loadFieldNames |
( |
| ) |
|
Loads all the field names from the layer.
void QgsExpressionBuilderWidget::loadFieldNames |
( |
const QgsFields & |
fields | ) |
|
void QgsExpressionBuilderWidget::loadRecent |
( |
QString |
key | ) |
|
void QgsExpressionBuilderWidget::loadSampleValues |
( |
| ) |
|
|
slot |
void QgsExpressionBuilderWidget::on_expressionTree_doubleClicked |
( |
const QModelIndex & |
index | ) |
|
|
slot |
void QgsExpressionBuilderWidget::on_lblPreview_linkActivated |
( |
QString |
link | ) |
|
|
slot |
void QgsExpressionBuilderWidget::on_mValueListWidget_itemDoubleClicked |
( |
QListWidgetItem * |
item | ) |
|
|
slot |
void QgsExpressionBuilderWidget::on_txtExpressionString_textChanged |
( |
| ) |
|
|
slot |
void QgsExpressionBuilderWidget::on_txtSearchEdit_textChanged |
( |
| ) |
|
|
slot |
void QgsExpressionBuilderWidget::operatorButtonClicked |
( |
| ) |
|
|
slot |
Registers a node item for the expression builder.
- Parameters
-
group | The group the item will be show in the tree view. If the group doesn't exsit it will be created. |
label | The label that is show to the user for the item in the tree. |
expressionText | The text that is inserted into the expression area when the user double clicks on the item. |
helpText | The help text that the user will see when item is selected. |
type | The type of the expression item. |
void QgsExpressionBuilderWidget::saveToRecent |
( |
QString |
key | ) |
|
void QgsExpressionBuilderWidget::setExpressionText |
( |
const QString & |
expression | ) |
|
Sets the expression string for the widget.
void QgsExpressionBuilderWidget::setGeomCalculator |
( |
const QgsDistanceArea & |
da | ) |
|
Sets geometry calculator used in distance/area calculations.
Sets layer in order to get the fields and values.
- Note
- this needs to be called before calling loadFieldNames().
void QgsExpressionBuilderWidget::showContextMenu |
( |
const QPoint & |
pt | ) |
|
|
slot |
The documentation for this class was generated from the following files: