Example #1
0
    def optsChanged(self, param, opts):
        """Called when any options are changed that are not
        name, value, default, or limits"""
        #print "opts changed:", opts
        ParameterItem.optsChanged(self, param, opts)

        if 'readonly' in opts:
            self.updateDefaultBtn()

        ## If widget is a SpinBox, pass options straight through
        if isinstance(self.widget, SpinBox):
            if 'units' in opts and 'suffix' not in opts:
                opts['suffix'] = opts['units']
            self.widget.setOpts(**opts)
            self.updateDisplayLabel()
Example #2
0
 def optsChanged(self, param, opts):
     """Called when any options are changed that are not
     name, value, default, or limits"""
     #print "opts changed:", opts
     ParameterItem.optsChanged(self, param, opts)
     
     if 'readonly' in opts:
         self.updateDefaultBtn()
     
     ## If widget is a SpinBox, pass options straight through
     if isinstance(self.widget, SpinBox):
         if 'units' in opts and 'suffix' not in opts:
             opts['suffix'] = opts['units']
         self.widget.setOpts(**opts)
         self.updateDisplayLabel()