QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
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. 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... | |
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 38 of file qgssearchwidgettoolbutton.h.
|
explicit |
Constructor for QgsSearchWidgetToolButton.
parent | parent object |
Definition at line 20 of file qgssearchwidgettoolbutton.cpp.
|
inline |
Returns the active filter flags shown in the widget.
Definition at line 114 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 84 of file qgssearchwidgettoolbutton.h.
bool QgsSearchWidgetToolButton::isActive | ( | ) | const |
Returns true
if the widget is set to be included in the search.
Definition at line 116 of file qgssearchwidgettoolbutton.cpp.
|
slot |
Sets the search widget as active by selecting the first available search type.
Definition at line 211 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 51 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 38 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 46 of file qgssearchwidgettoolbutton.cpp.
|
slot |
Sets the search widget as inactive, ie do not search the corresponding field.
Definition at line 194 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 89 of file qgssearchwidgettoolbutton.cpp.