/
qgslegendfilterbutton.sip
50 lines (44 loc) · 1.17 KB
/
qgslegendfilterbutton.sip
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/** \ingroup gui
* \class QgsFilterLegendButton
* A tool button that allows to enable or disable legend filter by contents of the map.
* An additional pop down menu allows to define a boolean expression to refine the filtering.
* @note added in 2.14
*/
class QgsLegendFilterButton: public QToolButton
{
%TypeHeaderCode
#include <qgslegendfilterbutton.h>
%End
public:
/**
* Construct a new filter legend button
*
* @param parent The parent QWidget
*/
QgsLegendFilterButton( QWidget* parent = 0 );
~QgsLegendFilterButton();
/**
* Returns the current text used as filter expression
*/
QString expressionText() const;
/**
* Sets the current text used as filter expression.
* This will update the menu
*/
void setExpressionText( const QString& expression );
/**
* Returns the current associated vectorLayer
* May be null
*/
QgsVectorLayer* vectorLayer() const;
/**
* Sets the associated vectorLayer
* May be null
*/
void setVectorLayer( QgsVectorLayer* layer );
signals:
/**
* Emitted when the expression text changes
*/
void expressionTextChanged();
};