QgsLegendFilterButton class
A tool button that allows enabling or disabling legend filter by contents of the map.
Contents
An additional pop down menu allows defining a boolean expression to refine the filtering.
Constructors, destructors, conversion operators
- QgsLegendFilterButton(QWidget* parent = nullptr)
- Construct a new filter legend button.
Public functions
- auto expressionText() const -> QString
- Returns the current text used as filter expression.
- void setExpressionText(const QString& expression)
- Sets the current text used as filter expression.
- void setVectorLayer(QgsVectorLayer* layer)
- Sets the associated vectorLayer May be null.
- auto vectorLayer() const -> QgsVectorLayer*
- Returns the current associated vectorLayer May be null.
Signals
- void expressionTextChanged()
- Emitted when the expression text changes.
Function documentation
QgsLegendFilterButton:: QgsLegendFilterButton(QWidget* parent = nullptr)
Construct a new filter legend button.
| Parameters | |
|---|---|
| parent | The parent QWidget |
void QgsLegendFilterButton:: setExpressionText(const QString& expression)
Sets the current text used as filter expression.
This will update the menu