Subgroup: Search
Class: QgsSearchWidgetWrapper¶
-
class
qgis.gui.
QgsSearchWidgetWrapper
¶ Bases:
qgis._gui.QgsWidgetWrapper
Shows a search widget on a filter form.
Methods
aggregate
If in AggregateSearch mode, which aggregate should be used to construct the filter expression. applyDirectly
If this is true, then this search widget should take effect directly blockSignals
childEvent
children
clearExpression
clears the expression to search for all features clearWidget
Clears the widget’s current value and resets it back to the default state config
Use this inside your overridden classes to access the configuration. connectNotify
context
Returns information about the context in which this widget is shown createExpression
createFieldIdentifier
Get a field name or expression to use as field comparison. createWidget
customEvent
dataDefinedProperties
Returns a reference to the editor widget’s property collection, used for data defined overrides. defaultFlags
Returns the filter flags which should be set by default for the search widget. deleteLater
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
exclusiveFilterFlags
Returns a list of exclusive filter flags, which cannot be combined with other flags (e.g., EqualTo/NotEqualTo) expression
Will be used to access the widget’s value. findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] fromWidget
Will return a wrapper for a given widget inherits
initWidget
installEventFilter
isSignalConnected
isWidgetType
isWindowType
killTimer
layer
Access the QgsVectorLayer
, you are working onmetaObject
moveToThread
nonExclusiveFilterFlags
Returns a list of non-exclusive filter flags, which can be combined with other flags (e.g., CaseInsensitive) objectName
parent
property
propertyDefinitions
Returns the editor widget property definitions. pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeEventFilter
sender
senderSignalIndex
setAggregate
If in AggregateSearch mode, which aggregate should be used to construct the filter expression. setConfig
Will set the config of this wrapper to the specified config. setContext
Set the context in which this widget is shown setDataDefinedProperties
Sets the editor widget’s property collection, used for data defined overrides. setEnabled
Toggles whether the search widget is enabled or disabled. setExpression
Set the expression
which is currently used as filter for this widget.setFeature
setObjectName
setParent
setProperty
signalsBlocked
startTimer
supportedFlags
Returns filter flags supported by the search widget. thread
timerEvent
toString
Returns a translated string representing a filter flag. tr
valid
Return true if the widget has been properly initialized. widget
Access the widget managed by this wrapper Attributes
Between
CaseInsensitive
Contains
DocumentViewerContent
DoesNotContain
EndsWith
EqualTo
GreaterThan
GreaterThanOrEqualTo
IsNotBetween
IsNotNull
IsNull
LessThan
LessThanOrEqualTo
NotEqualTo
RootPath
StartsWith
destroyed
destroyed(self, QObject = None) [signal] expressionChanged
Emitted whenever the expression changes objectNameChanged
objectNameChanged(self, str) [signal] staticMetaObject
valueChanged
Emitted when a user changes the value of the search widget. valueCleared
Emitted when a user changes the value of the search widget back to an empty, default state. -
Between
= 128¶
-
CaseInsensitive
= 256¶
-
Contains
= 512¶
-
DoesNotContain
= 1024¶
-
EndsWith
= 32768¶
-
EqualTo
= 2¶
-
class
FilterFlag
¶ Bases:
int
-
class
FilterFlags
¶ Bases:
sip.wrapper
QgsSearchWidgetWrapper.FilterFlags(Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag]) QgsSearchWidgetWrapper.FilterFlags(QgsSearchWidgetWrapper.FilterFlags)
-
GreaterThan
= 8¶
-
GreaterThanOrEqualTo
= 32¶
-
IsNotBetween
= 4096¶
-
IsNotNull
= 8192¶
-
IsNull
= 2048¶
-
LessThan
= 16¶
-
LessThanOrEqualTo
= 64¶
-
NotEqualTo
= 4¶
-
StartsWith
= 16384¶
-
aggregate
(self) → str¶ If in AggregateSearch mode, which aggregate should be used to construct the filter expression. Is a Null String if none.
New in version 3.0.
-
applyDirectly
(self) → bool¶ If this is true, then this search widget should take effect directly when its expression changes
-
childEvent
()¶
-
clearExpression
(self)¶ clears the expression to search for all features
-
clearWidget
(self)¶ Clears the widget’s current value and resets it back to the default state
New in version 2.16.
-
connectNotify
()¶
-
createExpression
(self, flags: Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag]) → str¶
-
createFieldIdentifier
(self) → str¶ Get a field name or expression to use as field comparison. If in SearchMode returns a quoted field identifier. If in AggregateSearchMode returns an appropriate aggregate expression.
New in version 3.0.
-
createWidget
()¶
-
customEvent
()¶
-
defaultFlags
(self) → QgsSearchWidgetWrapper.FilterFlags¶ Returns the filter flags which should be set by default for the search widget.
New in version 2.16.
See also
-
disconnectNotify
()¶
-
exclusiveFilterFlags
() → object¶ Returns a list of exclusive filter flags, which cannot be combined with other flags (e.g., EqualTo/NotEqualTo)
New in version 2.16.
See also
-
expression
(self) → str¶ Will be used to access the widget’s value. Read the value from the widget and return it properly formatted to be saved in the attribute.
If an invalid variant is returned this will be interpreted as no change. Be sure to return a NULL QVariant if it should be set to NULL.
Returns: The current value the widget represents
-
expressionChanged
¶ Emitted whenever the expression changes
Parameters: exp – The new search expression [signal]
-
initWidget
()¶
-
isSignalConnected
()¶
-
nonExclusiveFilterFlags
() → object¶ Returns a list of non-exclusive filter flags, which can be combined with other flags (e.g., CaseInsensitive)
New in version 2.16.
See also
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setAggregate
(self, aggregate: str)¶ If in AggregateSearch mode, which aggregate should be used to construct the filter expression. Is a Null String if none.
New in version 3.0.
-
setEnabled
(self, enabled: bool)¶ Toggles whether the search widget is enabled or disabled.
Parameters: enabled – set to true to enable widget
-
setExpression
(self, expression: str)¶ Set the
expression
which is currently used as filter for this widget.
-
setFeature
(self, feature: QgsFeature)¶
-
supportedFlags
(self) → QgsSearchWidgetWrapper.FilterFlags¶ Returns filter flags supported by the search widget.
New in version 2.16.
See also
-
timerEvent
()¶
-
toString
(flag: QgsSearchWidgetWrapper.FilterFlag) → str¶ Returns a translated string representing a filter flag.
Parameters: flag – flag to convert to string New in version 2.16.
-
valueChanged
¶ Emitted when a user changes the value of the search widget.
New in version 2.16: [signal]
-
valueCleared
¶ Emitted when a user changes the value of the search widget back to an empty, default state.
New in version 2.16: [signal]
-