parameters: (self, options=None)
docstring: options: name, valType, label, defaultValue
docstring_summary: options: name, valType, label, defaultValue
docstring_tokens: options : name valType label defaultValue
function: def setup(self, options=None):
          """ options: name, valType, label, defaultValue """
          options = options or {}
          valType = options.get("valType", WVT.SIZE)
  
          if valType == self.valType:
              val = self.widget.expression.expression()
          else:
              val = str(options.get("defVal", 0))
              self.valType = valType
  
          WidgetFuncBase.setup(self, editLabel=options.get("name", ""), lineEdit=val)
  
          self.widget.comboBox.clear()
          self.widget.comboBox.addItem("Expression")
  
          self.widget.expression.setFilters(QgsFieldProxyModel.Numeric)
          self.widget.expression.setLayer(self.mapLayer)
function_tokens: def setup ( self , options = None ) : options = options or { } valType = options . get ( "valType" , WVT . SIZE ) if valType == self . valType : val = self . widget . expression . expression ( ) else : val = str ( options . get ( "defVal" , 0 ) ) self . valType = valType WidgetFuncBase . setup ( self , editLabel = options . get ( "name" , "" ) , lineEdit = val ) self . widget . comboBox . clear ( ) self . widget . comboBox . addItem ( "Expression" ) self . widget . expression . setFilters ( QgsFieldProxyModel . Numeric ) self . widget . expression . setLayer ( self . mapLayer )