def __init__(self, params, base, scope=None, name=None): debug.mainthreadTest() self.params = params SymmetricMatrixInput.__init__(self, 'C', 6, 6, value=None, scope=scope, name=name) # Block the appropriate ones, and hook up callbacks # to handle the c11/c12/c44 synchronization. for (k, f) in self.floats.items(): if k != (0, 0) and k != (0, 1) and k != (3, 3): f.gtk.set_editable(0) f.gtk.set_sensitive(0) # Callbacks to cross-connect things so that c44 can be # entered, and gets maintained correctly. gtklogger.connect(self.floats[(0, 0)].gtk, "activate", self.new_c11_or_c12, None) gtklogger.connect(self.floats[(0, 0)].gtk, "focus_out_event", self.new_c11_or_c12) # gtklogger.connect(self.floats[(0, 1)].gtk, "activate", self.new_c11_or_c12, None) gtklogger.connect(self.floats[(0, 1)].gtk, "focus_out_event", self.new_c11_or_c12) # gtklogger.connect(self.floats[(3, 3)].gtk, "activate", self.new_c44, None) gtklogger.connect(self.floats[(3, 3)].gtk, "focus_out_event", self.new_c44) self.set_values()
def __init__(self, params, kset, scope=None, name=None): debug.mainthreadTest() self.params = params self.kset = kset SymmetricMatrixInput.__init__(self, 'C', 6, 6, value=None, scope=scope, name=name) # # Make default blocks according to the kset dictionary. for (k, f) in self.floats.items(): if k in self.kset: pass else: f.gtk.set_editable(0) f.gtk.set_sensitive(0) # # Connect the "obvious" callbacks. Child classes may add # additional callbacks. for k in self.kset: # "activate" needs a dummy argument for the "event" slot. gtklogger.connect(self.floats[k].gtk, "activate", self.new_c, None) gtklogger.connect(self.floats[k].gtk, "focus_out_event", self.new_c)
def __init__(self, params, base, scope=None, name=None): debug.mainthreadTest() self.params = params SymmetricMatrixInput.__init__(self, 'C', 6,6, value=None, scope=scope, name=name) # Block the appropriate ones, and hook up callbacks # to handle the c11/c12/c44 synchronization. for (k,f) in self.floats.items(): if k!=(0,0) and k!=(0,1) and k!=(3,3): f.gtk.set_editable(0) f.gtk.set_sensitive(0) # Callbacks to cross-connect things so that c44 can be # entered, and gets maintained correctly. gtklogger.connect(self.floats[(0,0)].gtk, "activate", self.new_c11_or_c12,None) gtklogger.connect(self.floats[(0,0)].gtk, "focus_out_event", self.new_c11_or_c12) # gtklogger.connect(self.floats[(0,1)].gtk, "activate", self.new_c11_or_c12,None) gtklogger.connect(self.floats[(0,1)].gtk, "focus_out_event", self.new_c11_or_c12) # gtklogger.connect(self.floats[(3,3)].gtk, "activate", self.new_c44,None) gtklogger.connect(self.floats[(3,3)].gtk, "focus_out_event", self.new_c44) self.set_values()
def __init__(self, param, scope=None, name=None): debug.mainthreadTest() SymmetricMatrixInput.__init__(self,"",3,3,value=None,scope=scope, name=name) for (k,f) in self.floats.items(): if k not in self.settable: f.gtk.set_editable(0) f.gtk.set_sensitive(0) else: gtklogger.connect(f.gtk, "activate", self.new_value, None) gtklogger.connect(f.gtk, "focus_out_event", self.new_value) self.set_values(param.value)
def __init__(self, param, scope=None, name=None, verbose=False): debug.mainthreadTest() SymmetricMatrixInput.__init__(self,"",3,3,value=None,scope=scope, name=name, verbose=verbose) for (k,f) in self.floats.items(): if k not in self.settable: f.gtk.set_editable(0) f.gtk.set_sensitive(0) else: gtklogger.connect(f.gtk, "activate", self.new_value, None) gtklogger.connect(f.gtk, "focus_out_event", self.new_value) self.set_values(param.value)
def __init__(self, params, kset, scope=None, name=None): debug.mainthreadTest() self.params = params self.kset = kset SymmetricMatrixInput.__init__(self, 'C', 6,6, value=None, scope=scope, name=name) # # Make default blocks according to the kset dictionary. for (k,f) in self.floats.items(): if k in self.kset: pass else: f.gtk.set_editable(0) f.gtk.set_sensitive(0) # # Connect the "obvious" callbacks. Child classes may add # additional callbacks. for k in self.kset: # "activate" needs a dummy argument for the "event" slot. gtklogger.connect(self.floats[k].gtk, "activate",self.new_c,None) gtklogger.connect(self.floats[k].gtk, "focus_out_event",self.new_c)