def getDataForSaving(self): # this method is called when a network is saved and the widget # value needs to be saved cfg = PortWidget.getDescr(self) cfg['name'] = self.widget.name cfg['ramp'] = self.widget.ramp cfg['mini'] = self.widget.mini cfg['maxi'] = self.widget.maxi return cfg
def getDescr(self): cfg = PortWidget.getDescr(self) cfg['width'] = self.widget.width cfg['height'] = self.widget.height cfg['circles'] = self.widget.circles cfg['stripes'] = self.widget.stripes cfg['wheelPad'] = self.widget.wheelPad cfg['immediate'] = self.widget.immediate cfg['wysiwyg'] = self.widget.wysiwyg return cfg
def getDescr(self): cfg = PortWidget.getDescr(self) # the whole colormap is the widget value and # is returned by self.get() ! #cfg['name'] = self.widget.name #cfg['ramp'] = self.widget.ramp #cfg['mini'] = self.widget.mini #cfg['maxi'] = self.widget.maxi return cfg
def getDescr(self): cfg = PortWidget.getDescr(self) for k in self.ownConfigOpts.keys(): if k == 'type': # type has to be handled separately _type = self.widget.type if _type == int: _type = 'int' else: _type = 'float' if _type != self.ownConfigOpts[k]['defaultValue']: cfg[k] = _type continue val = getattr(self.widget, k) if val != self.ownConfigOpts[k]['defaultValue']: cfg[k] = val return cfg
def getConstructorOptions(self): cfg = PortWidget.getConstructorOptions(self) cfg['labcfgX'] = self.widget.thumbx.labcfg cfg['callbackX'] = self.widget.thumbx.myCallback cfg['widthX'] = self.widget.thumbx.width cfg['heightX'] = self.widget.thumbx.height cfg['wheelPadX'] = self.widget.thumbx.wheelPad cfg['labcfgY'] = self.widget.thumby.labcfg cfg['callbackY'] = self.widget.thumby.myCallback cfg['widthY'] = self.widget.thumby.width cfg['heightY'] = self.widget.thumby.height cfg['wheelPadY'] = self.widget.thumby.wheelPad cfg['labcfgZ'] = self.widget.thumbz.labcfg cfg['callbackZ'] = self.widget.thumbz.myCallback cfg['widthZ'] = self.widget.thumbz.width cfg['heightZ'] = self.widget.thumbz.height cfg['wheelPadZ'] = self.widget.thumbz.wheelPad cfg.update(self.configure()) return cfg
def getDescr(self): cfg = PortWidget.getDescr(self) typex = self.widget.thumbx.type if typex == int: cfg['typeX'] = 'int' else: cfg['typeX'] = 'float' typey = self.widget.thumby.type if typey == int: cfg['typeY'] = 'int' else: cfg['typeY'] = 'float' typez = self.widget.thumbz.type if typez == int: cfg['typeZ'] = 'int' else: cfg['typeZ'] = 'float' cfg['continuousX'] = self.widget.thumbx.continuous cfg['continuousY'] = self.widget.thumby.continuous cfg['continuousZ'] = self.widget.thumbz.continuous cfg['precisionX'] = self.widget.thumbx.precision cfg['precisionY'] = self.widget.thumby.precision cfg['precisionZ'] = self.widget.thumbz.precision cfg['minX'] = self.widget.thumbx.min cfg['minY'] = self.widget.thumby.min cfg['minZ'] = self.widget.thumbz.min cfg['maxX'] = self.widget.thumbx.max cfg['maxY'] = self.widget.thumby.max cfg['maxZ'] = self.widget.thumbz.max cfg['oneTurnX'] = self.widget.thumbx.oneTurn cfg['oneTurnY'] = self.widget.thumby.oneTurn cfg['oneTurnZ'] = self.widget.thumbz.oneTurn cfg['showLabelX'] = self.widget.thumbx.showLabel cfg['showLabelY'] = self.widget.thumby.showLabel cfg['showLabelZ'] = self.widget.thumbz.showLabel cfg['incrementX'] = self.widget.thumbx.increment cfg['incrementY'] = self.widget.thumby.increment cfg['incrementZ'] = self.widget.thumbz.increment cfg['vectX'] = self.widget.entryX.point cfg['vectY'] = self.widget.entryY.point cfg['vectZ'] = self.widget.entryZ.point ############################################## cfg['lockTypeX'] = self.widget.thumbx.lockType cfg['lockTypeY'] = self.widget.thumby.lockType cfg['lockTypeZ'] = self.widget.thumbz.lockType cfg['lockMinX'] = self.widget.thumbx.lockMin cfg['lockMinY'] = self.widget.thumby.lockMin cfg['lockMinZ'] = self.widget.thumbz.lockMin cfg['lockBMinX'] = self.widget.thumbx.lockBMin cfg['lockBMinY'] = self.widget.thumby.lockBMin cfg['lockBMinZ'] = self.widget.thumbz.lockBMin cfg['lockMaxX'] = self.widget.thumbx.lockMax cfg['lockMaxY'] = self.widget.thumby.lockMax cfg['lockMaxZ'] = self.widget.thumbz.lockMax cfg['lockBMaxX'] = self.widget.thumbx.lockBMax cfg['lockBMaxY'] = self.widget.thumby.lockBMax cfg['lockBMaxZ'] = self.widget.thumbz.lockBMax cfg['lockIncrementX'] = self.widget.thumbx.lockIncrement cfg['lockIncrementY'] = self.widget.thumby.lockIncrement cfg['lockIncrementZ'] = self.widget.thumbz.lockIncrement cfg['lockBIncrementX'] = self.widget.thumbx.lockBIncrement cfg['lockBIncrementY'] = self.widget.thumby.lockBIncrement cfg['lockBIncrementZ'] = self.widget.thumbz.lockBIncrement cfg['lockPrecisionX'] = self.widget.thumbx.lockPrecision cfg['lockPrecisionY'] = self.widget.thumby.lockPrecision cfg['lockPrecisionZ'] = self.widget.thumbz.lockPrecision cfg['lockShowLabelX'] = self.widget.thumbx.lockShowLabel cfg['lockShowLabelY'] = self.widget.thumby.lockShowLabel cfg['lockShowLabelZ'] = self.widget.thumbz.lockShowLabel cfg['lockValueX'] = self.widget.thumbx.lockValue cfg['lockValueY'] = self.widget.thumby.lockValue cfg['lockValueZ'] = self.widget.thumbz.lockValue cfg['lockContinuousX'] = self.widget.thumbx.lockContinuous cfg['lockContinuousY'] = self.widget.thumby.lockContinuous cfg['lockContinuousZ'] = self.widget.thumbz.lockContinuous cfg['lockOneTurnX'] = self.widget.thumbx.lockOneTurn cfg['lockOneTurnY'] = self.widget.thumby.lockOneTurn cfg['lockOneTurnZ'] = self.widget.thumbz.lockOneTurn return cfg
def getDescr(self): cfg = PortWidget.getDescr(self) cfg['mode'] = self.widget.mode cfg['immediate'] = self.widget.immediate return cfg