QGIS API Documentation  3.4.15-Madeira (e83d02e274)
Signals | Public Member Functions | List of all members
QgsLegendFilterButton Class Reference

A tool button that allows enabling or disabling legend filter by contents of the map. More...

#include <qgslegendfilterbutton.h>

Inheritance diagram for QgsLegendFilterButton:
Inheritance graph
[legend]

Signals

void expressionTextChanged ()
 Emitted when the expression text changes. More...
 

Public Member Functions

 QgsLegendFilterButton (QWidget *parent=nullptr)
 Construct a new filter legend button. More...
 
QString expressionText () const
 Returns the current text used as filter expression. More...
 
void setExpressionText (const QString &expression)
 Sets the current text used as filter expression. More...
 
void setVectorLayer (QgsVectorLayer *layer)
 Sets the associated vectorLayer May be null. More...
 
QgsVectorLayervectorLayer () const
 Returns the current associated vectorLayer May be null. More...
 

Detailed Description

A tool button that allows enabling or disabling legend filter by contents of the map.

An additional pop down menu allows defining a boolean expression to refine the filtering.

Since
QGIS 2.14

Definition at line 31 of file qgslegendfilterbutton.h.

Constructor & Destructor Documentation

QgsLegendFilterButton::QgsLegendFilterButton ( QWidget *  parent = nullptr)

Construct a new filter legend button.

Parameters
parentThe parent QWidget

Definition at line 24 of file qgslegendfilterbutton.cpp.

Member Function Documentation

QString QgsLegendFilterButton::expressionText ( ) const

Returns the current text used as filter expression.

Definition at line 104 of file qgslegendfilterbutton.cpp.

void QgsLegendFilterButton::expressionTextChanged ( )
signal

Emitted when the expression text changes.

void QgsLegendFilterButton::setExpressionText ( const QString &  expression)

Sets the current text used as filter expression.

This will update the menu

Definition at line 109 of file qgslegendfilterbutton.cpp.

void QgsLegendFilterButton::setVectorLayer ( QgsVectorLayer layer)

Sets the associated vectorLayer May be null.

Definition at line 120 of file qgslegendfilterbutton.cpp.

QgsVectorLayer * QgsLegendFilterButton::vectorLayer ( ) const

Returns the current associated vectorLayer May be null.

Definition at line 115 of file qgslegendfilterbutton.cpp.


The documentation for this class was generated from the following files: