QGIS API Documentation  3.10.0-A Coruña (6c816b4204)
Public Slots | Signals | Public Member Functions | List of all members
QgsSearchWidgetToolButton Class Reference

A tool button widget which is displayed next to search widgets in forms, and allows for controlling how the widget behaves and how the filtering/searching operates. More...

#include <qgssearchwidgettoolbutton.h>

Inheritance diagram for QgsSearchWidgetToolButton:
Inheritance graph
[legend]

Public Slots

void setActive ()
 Sets the search widget as active by selecting the first available search type. More...
 
void setInactive ()
 Sets the search widget as inactive, ie do not search the corresponding field. More...
 

Signals

void activeFlagsChanged (QgsSearchWidgetWrapper::FilterFlags flags)
 Emitted when the active flags selected in the widget is changed. More...
 

Public Member Functions

 QgsSearchWidgetToolButton (QWidget *parent=nullptr)
 Constructor for QgsSearchWidgetToolButton. More...
 
QgsSearchWidgetWrapper::FilterFlags activeFlags () const
 Returns the active filter flags shown in the widget. More...
 
QgsSearchWidgetWrapper::FilterFlags availableFlags () const
 Returns the available filter flags shown in the widget. More...
 
bool isActive () const
 Returns true if the widget is set to be included in the search. More...
 
void setActiveFlags (QgsSearchWidgetWrapper::FilterFlags flags)
 Sets the current active filter flags for the widget. More...
 
void setAvailableFlags (QgsSearchWidgetWrapper::FilterFlags flags)
 Sets the available filter flags to show in the widget. More...
 
void setDefaultFlags (QgsSearchWidgetWrapper::FilterFlags flags)
 Sets the default filter flags to show in the widget. More...
 
void toggleFlag (QgsSearchWidgetWrapper::FilterFlag flag)
 Toggles an individual active filter flag for the widget. More...
 

Detailed Description

A tool button widget which is displayed next to search widgets in forms, and allows for controlling how the widget behaves and how the filtering/searching operates.

Since
QGIS 2.16

Definition at line 38 of file qgssearchwidgettoolbutton.h.

Constructor & Destructor Documentation

◆ QgsSearchWidgetToolButton()

QgsSearchWidgetToolButton::QgsSearchWidgetToolButton ( QWidget *  parent = nullptr)
explicit

Constructor for QgsSearchWidgetToolButton.

Parameters
parentparent object

Definition at line 20 of file qgssearchwidgettoolbutton.cpp.

Member Function Documentation

◆ activeFlags()

QgsSearchWidgetWrapper::FilterFlags QgsSearchWidgetToolButton::activeFlags ( ) const
inline

Returns the active filter flags shown in the widget.

See also
setActiveFlags()
toggleFlag()
availableFlags()

Definition at line 114 of file qgssearchwidgettoolbutton.h.

◆ activeFlagsChanged

void QgsSearchWidgetToolButton::activeFlagsChanged ( QgsSearchWidgetWrapper::FilterFlags  flags)
signal

Emitted when the active flags selected in the widget is changed.

Parameters
flagsactive flags

◆ availableFlags()

QgsSearchWidgetWrapper::FilterFlags QgsSearchWidgetToolButton::availableFlags ( ) const
inline

Returns the available filter flags shown in the widget.

See also
setAvailableFlags()
activeFlags()

Definition at line 84 of file qgssearchwidgettoolbutton.h.

◆ isActive()

bool QgsSearchWidgetToolButton::isActive ( ) const

Returns true if the widget is set to be included in the search.

See also
setInactive()
setActive()

Definition at line 116 of file qgssearchwidgettoolbutton.cpp.

◆ setActive

void QgsSearchWidgetToolButton::setActive ( )
slot

Sets the search widget as active by selecting the first available search type.

See also
isActive()
setInactive()

Definition at line 211 of file qgssearchwidgettoolbutton.cpp.

◆ setActiveFlags()

void QgsSearchWidgetToolButton::setActiveFlags ( QgsSearchWidgetWrapper::FilterFlags  flags)

Sets the current active filter flags for the widget.

Any flags which are not present in the available filter flags (see availableFlags()) will not be set.

Parameters
flagsactive flags to show in widget
See also
toggleFlag()
activeFlags()
setAvailableFlags()

Definition at line 51 of file qgssearchwidgettoolbutton.cpp.

◆ setAvailableFlags()

void QgsSearchWidgetToolButton::setAvailableFlags ( QgsSearchWidgetWrapper::FilterFlags  flags)

Sets the available filter flags to show in the widget.

Any active flags (see activeFlags()) which are not present in the new available filter flags will be cleared;

Parameters
flagsavailable flags to show in widget
See also
availableFlags()
setActiveFlags()
setDefaultFlags()

Definition at line 38 of file qgssearchwidgettoolbutton.cpp.

◆ setDefaultFlags()

void QgsSearchWidgetToolButton::setDefaultFlags ( QgsSearchWidgetWrapper::FilterFlags  flags)

Sets the default filter flags to show in the widget.

Parameters
flagsdefault flags to show in widget
See also
setAvailableFlags()
setActiveFlags()

Definition at line 46 of file qgssearchwidgettoolbutton.cpp.

◆ setInactive

void QgsSearchWidgetToolButton::setInactive ( )
slot

Sets the search widget as inactive, ie do not search the corresponding field.

See also
isActive()
setActive()

Definition at line 194 of file qgssearchwidgettoolbutton.cpp.

◆ toggleFlag()

void QgsSearchWidgetToolButton::toggleFlag ( QgsSearchWidgetWrapper::FilterFlag  flag)

Toggles an individual active filter flag for the widget.

Any flags which are not present in the available filter flags (see availableFlags()) will be ignore. Other flags may be cleared if they conflict with the newly toggled flag.

Parameters
flagflag to toggle
See also
setActiveFlags()
activeFlags()

Definition at line 89 of file qgssearchwidgettoolbutton.cpp.


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