def __init__(self, parent=None): """ Constructor """ # QDialog.__init__(self, parent, Qt.FramelessWindowHint) QDialog.__init__(self, parent) self.setupUi(self) self.nerfModel = Model() self.dispView = View(None, VIEWER_REFRESH_RATE, CHIN_PARAM) self.dispView.show() self.data = [] self.isLogData = False # Create float_spin for each input channel self.ctrl_all = [] for (trig_id, name, type, value) in CHOUT_PARAM: exec interp( 'self.ctrl_#{name} = CtrlChannel(hostDialog=self, name=name, id=trig_id, type=type, value=value)' ) exec interp( 'self.connect(self.ctrl_#{name}.doubleSpinBox, SIGNAL("editingFinished()"), self.onNewWireIn)' ) exec interp( 'self.connect(self.ctrl_#{name}.doubleSpinBox, SIGNAL("valueChanged(double)"), self.onNewWireIn)' ) exec interp('self.ctrl_all.append(self.ctrl_#{name})') # Timer for pulling data, separated from timer_display self.timer = QTimer(self) self.connect(self.timer, SIGNAL("timeout()"), self.onSyncData) self.timer.start(VIEWER_REFRESH_RATE) self.on_horizontalSlider_valueChanged(5)
def __init__(self, parent = None): """ Constructor """ # QDialog.__init__(self, parent, Qt.FramelessWindowHint) QDialog.__init__(self, parent) self.setupUi(self) self.nerfModel = Model() self.dispView = View(None, NUM_CHANNEL, DISPLAY_SCALING, VIEWER_REFRESH_RATE, \ CHANNEL_COLOR) self.dispView.show() self.data = [] self.isLogData = False self.connect(self.dispView.timer, SIGNAL("timeout()"), self.onCheckMoney) # self.connect(self, SIGNAL("initRT"), self.on_horizontalSlider_sliderMoved) # self.emit(SIGNAL("initRT"), 1) self.on_horizontalSlider_valueChanged(1) # self.connect(self.doubleSpinBox_0, SIGNAL("editingFinished()"), self.onNewWire00In) # self.connect(self.doubleSpinBox_0, SIGNAL("valueChanged(double)"), self.onNewWire00In) # # self.connect(self.doubleSpinBox_1, SIGNAL("editingFinished()"), self.onNewWire01In) # self.connect(self.doubleSpinBox_1, SIGNAL("valueChanged(double)"), self.onNewWire01In) self.connect(self.doubleSpinBox_2, SIGNAL("editingFinished()"), self.onNewWireIn2) self.connect(self.doubleSpinBox_2, SIGNAL("valueChanged(double)"), self.onNewWireIn2) self.connect(self.doubleSpinBox_3, SIGNAL("editingFinished()"), self.onNewWireIn3) self.connect(self.doubleSpinBox_3, SIGNAL("valueChanged(double)"), self.onNewWireIn3) # self.connect(self.doubleSpinBox_4, SIGNAL("editingFinished()"), self.onNewWireIn4) self.connect(self.doubleSpinBox_4, SIGNAL("valueChanged(double)"), self.onNewWireIn4) self.connect(self.doubleSpinBox_5, SIGNAL("editingFinished()"), self.onNewWireIn5) self.connect(self.doubleSpinBox_5, SIGNAL("valueChanged(double)"), self.onNewWireIn5) self.connect(self.doubleSpinBox_6, SIGNAL("editingFinished()"), self.onNewWireIn6) self.connect(self.doubleSpinBox_6, SIGNAL("valueChanged(double)"), self.onNewWireIn6) # # self.connect(self.doubleSpinBox_7, SIGNAL("editingFinished()"), self.onNewWire07In) # self.connect(self.doubleSpinBox_7, SIGNAL("valueChanged(double)"), self.onNewWire07In) # # self.connect(self.doubleSpinBox_8, SIGNAL("editingFinished()"), self.onNewWire08In) # self.connect(self.doubleSpinBox_8, SIGNAL("valueChanged(double)"), self.onNewWire08In) # # self.connect(self.doubleSpinBox_9, SIGNAL("editingFinished()"), self.onNewWire09In) # self.connect(self.doubleSpinBox_9, SIGNAL("valueChanged(double)"), self.onNewWire09In) self.connect(self.doubleSpinBox_14, SIGNAL("editingFinished()"), self.onNewWireIn14) self.connect(self.doubleSpinBox_14, SIGNAL("valueChanged(double)"), self.onNewWireIn14) self.connect(self.doubleSpinBox_15, SIGNAL("editingFinished()"), self.onNewWireIn15) self.connect(self.doubleSpinBox_15, SIGNAL("valueChanged(double)"), self.onNewWireIn15)