Class: QgsValueMapSearchWidgetWrapper

class qgis.gui.QgsValueMapSearchWidgetWrapper

Bases: QgsSearchWidgetWrapper

Wraps a value map search widget. This widget will offer a combobox with values from another layer referenced by a foreign key (a constraint may be set but is not required on data level). It will be used as a search widget and produces expression to look for in the layer.

QgsValueMapSearchWidgetWrapper(vl: QgsVectorLayer, fieldIdx: int, parent: QWidget = None) Constructor for QgsValueMapSearchWidgetWrapper

Methods

applyDirectly

rtype

bool

childEvent

clearExpression

clears the expression to search for all features

clearWidget

connectNotify

createExpression

param flags

createWidget

param parent

customEvent

defaultFlags

rtype

QgsSearchWidgetWrapper.FilterFlags

disconnectNotify

expression

rtype

str

initWidget

param editor

isSignalConnected

receivers

sender

senderSignalIndex

setEnabled

param enabled

setExpression

param exp

setFeature

supportedFlags

rtype

QgsSearchWidgetWrapper.FilterFlags

timerEvent

valid

rtype

bool

applyDirectly(self)bool
Return type

bool

childEvent(self, QChildEvent)
clearExpression(self)

clears the expression to search for all features

clearWidget(self)
connectNotify(self, QMetaMethod)
createExpression(self, flags: Union[QgsSearchWidgetWrapper.FilterFlags, QgsSearchWidgetWrapper.FilterFlag])str
Parameters

flags (Union[QgsSearchWidgetWrapper.FilterFlags) –

Return type

str

createWidget(self, parent: QWidget)QWidget
Parameters

parent (QWidget) –

Return type

QWidget

customEvent(self, QEvent)
defaultFlags(self)QgsSearchWidgetWrapper.FilterFlags
Return type

QgsSearchWidgetWrapper.FilterFlags

disconnectNotify(self, QMetaMethod)
expression(self)str
Return type

str

initWidget(self, editor: QWidget)
Parameters

editor (QWidget) –

isSignalConnected(self, QMetaMethod)bool
receivers(self, PYQT_SIGNAL)int
sender(self)QObject
senderSignalIndex(self)int
setEnabled(self, enabled: bool)
Parameters

enabled (bool) –

setExpression(self, exp: str)
Parameters

exp (str) –

setFeature(self, feature: QgsFeature)
supportedFlags(self)QgsSearchWidgetWrapper.FilterFlags
Return type

QgsSearchWidgetWrapper.FilterFlags

timerEvent(self, QTimerEvent)
valid(self)bool
Return type

bool