QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
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>
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. | |
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.
|
explicit |
Constructor for QgsSearchWidgetToolButton.
parent | parent object |
Definition at line 21 of file qgssearchwidgettoolbutton.cpp.
|
inline |
Returns the active filter flags shown in the widget.
Definition at line 113 of file qgssearchwidgettoolbutton.h.
|
signal |
Emitted when the active flags selected in the widget is changed.
flags | active flags |
|
inline |
Returns the available filter flags shown in the widget.
Definition at line 83 of file qgssearchwidgettoolbutton.h.
bool QgsSearchWidgetToolButton::isActive | ( | ) | const |
Returns true
if the widget is set to be included in the search.
Definition at line 117 of file qgssearchwidgettoolbutton.cpp.
|
slot |
Sets the search widget as active by selecting the first available search type.
Definition at line 212 of file qgssearchwidgettoolbutton.cpp.
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.
flags | active flags to show in widget |
Definition at line 52 of file qgssearchwidgettoolbutton.cpp.
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;
flags | available flags to show in widget |
Definition at line 39 of file qgssearchwidgettoolbutton.cpp.
void QgsSearchWidgetToolButton::setDefaultFlags | ( | QgsSearchWidgetWrapper::FilterFlags | flags | ) |
Sets the default filter flags to show in the widget.
flags | default flags to show in widget |
Definition at line 47 of file qgssearchwidgettoolbutton.cpp.
|
slot |
Sets the search widget as inactive, ie do not search the corresponding field.
Definition at line 195 of file qgssearchwidgettoolbutton.cpp.
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.
flag | flag to toggle |
Definition at line 90 of file qgssearchwidgettoolbutton.cpp.