QGIS API Documentation 3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
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.
 
void setInactive ()
 Sets the search widget as inactive, ie do not search the corresponding field.
 

Signals

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

Public Member Functions

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

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.

Definition at line 37 of file qgssearchwidgettoolbutton.h.

Constructor & Destructor Documentation

◆ QgsSearchWidgetToolButton()

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

Constructor for QgsSearchWidgetToolButton.

Parameters
parentparent object

Definition at line 21 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 113 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 83 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 117 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 212 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 52 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 39 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 47 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 195 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 90 of file qgssearchwidgettoolbutton.cpp.


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