def __init__(self, style = 'standard', closable = None, **kwds): if closable is None: raise Exceptions.InternalError( "'closable' parameter unspecified in call to generic Window.__init__") Container.__init__(self, **kwds) self._style = style self._dialog_style = style.find('dialog') >= 0 self._closable = closable application()._add_window(self)
def key_down(self, event): #print "GWindow.key_down:", event if self._generic_tabbing and event.char == '\t': #print "GWindow.key_down: doing generic tabbing" if event.shift: self._tab_to_prev() else: self._tab_to_next() else: Container.key_down(self, event)
def key_down(self, event): #print "GWindow.key_down:", event ### if self._generic_tabbing and event.char == '\t': #print "GWindow.key_down: doing generic tabbing" ### if event.shift: self._tab_to_prev() else: self._tab_to_next() else: Container.key_down(self, event)
def init(self): self.initArrays() self.HeatMeter = HeatMeter(self.netconn) self.desiredPower = 0 self.desiredTemp = 0 self.plotType = "Power" self.cropPlotVar = 10 self.cropFlag = False self.table = tc.tableCanvas(self) self.tableWidget.addWidget(self.table) self.tableData = 'resources/tableData.csv' ### MQTT SETUP ### #self.mqttBroker = 'test.mosquitto.org' #self.mqttBroker = '193.196.38.87' self.mqttBroker = brokers[6] self.mqttPort = 1883 #self.mqttPort = 80 self.mqttTopic = '/python/mqtt' self.connectionState = False self.lineEdit_MqttBroker.setText(self.mqttBroker) self.lineEdit_Port.setText(str(self.mqttPort)) self.lineEdit_Topic.setText(self.mqttTopic) self.label_ConnectionState.setText("Not Connected") self.container = Container.Container() self.updateContainer = Container.Container() self.automationStartTime = -1 self.mqttConnectedFlag = False self.loadAutomationData() ### self.TempPID = PID(P=1, D=0.01, I=0.1) #self.TempPID = PID(P=0.6377, D=0.44877, I=0.4263) #self.TempPID = PID(P=0.201713, D=0.0809676, I=0.04764574)#flachNormiert #self.TempPID = PID(P=0.201713, D=0.0809676, I=0.4764574)#flachNormiert #self.TempPID = PID(P=20.1713, D=8.09676, I=4.764574)#flachNormiert #self.TempPID = PID(P=36.67, D=14.72, I=8.66)#temp Normiert #self.TempPID = PID(P=0.226, D=0.09072, I=0.05338) #self.TempPID = PID(P=0.923, D=0.792, I=0.349)#flach #self.TempPID = PID(P=0.226, D=0.09072, I=0.05338)#noormiert auf 14°C #self.TempPID.setSampleTime(parameter.timeTriggerCanvasUpdate) self.FlowPID = PID(P=1, D=0.01, I=0.1) #self.FlowPID = PID(P=0.6377, D=0.44877, I=0.4263) #self.FlowPID = PID(P=0.201713, D=0.0809676, I=0.04764574)#flachNormiert #self.FlowPID = PID(P=0.201713, D=0.0809676, I=0.4764574)#flachNormiert #self.FlowPID = PID(P=0.201713, D=0.0809676, I=0.04764574)#flachNormiert #self.FlowPID = PID(P=3.164, D=1.27, I=0.747)#flach #self.FlowPID = PID(P=0.00077103, D=0.00031752, I=0.00018685)#normiert auf 4000 self.FlowPID.setSampleTime(parameter.timeTriggerCanvasUpdate) #self.TempActor = actuator(32) self.TempActor = actuator(12) #self.FlowActor = actuator(12) self.FlowActor = actuator(18)
def key_down(self, e): #print "GTableView.key_down: %r %r shift=%s" % (e.char, e.key, e.shift) ### c = e.char k = e.key if c == '\x1b': self.cancel_editing() return elif k == 'enter': self.finish_editing() return d = movement_map.get((c or k, e.shift)) if d: self._move_to_adjacent_cell(*d) else: Container.key_down(self, e)
def __init__(self, **kwds): Container.__init__(self, **kwds) ViewBase.__init__(self)
def destroy(self): """Detaches the window from document and application and removes it from the screen.""" self.set_document(None) application()._remove_window(self) Container.destroy(self)
def setup_menus(self, m): Container.setup_menus(self, m) app = application() if self._closable: m.close_cmd.enabled = 1
def setup_menus(self, m): ViewBase.setup_menus(self, m) Container.setup_menus(self, m)
def destroy(self): ViewBase.destroy(self) Container.destroy(self)
def __init__(self, **kwds): Container.__init__(self, **kwds) ViewBase.__init__(self) self._columns_by_id = {}
def __init__(self, **kwargs): Container.__init__(self, **kwargs)