def __init__(self, parent=None): super(RB_MainWindow, self).__init__(parent) self.ctrlQueue = Queue() self.respQueue = Queue() [self.IDLE,self.PLAY,self.PAUSE]=[0,1,2] # Create Com object self.ComHandler = comHandler(self.ctrlQueue,self.respQueue) self.ComHandler.start() self.status = self.IDLE self.setupUi(self) self.timer = QTimer() QObject.connect(self.timer, SIGNAL("timeout()"), self.getFrames) self.timer.start(INTERVAL) self.comboBoxPorts.addItems(self.ComHandler.ports) QObject.connect(self.comboBoxChannel, SIGNAL("currentIndexChanged(QString)"), self.processChannelCmd) self.proxyModel = QSortFilterProxyModel() self.proxyModel.setDynamicSortFilter(False) self.tableView.setAlternatingRowColors(True) self.tableView.setModel(self.proxyModel) self.tableView.setSortingEnabled(False) self.FlashTimer = QTimer(self) self.FlashTimer.timeout.connect(self.flashTimeout) self.channel = '15' self.filterActive = False QObject.connect(self.tableView.selectionModel(), SIGNAL("currentChanged(QModelIndex,QModelIndex)"), self.updateRow) self.comboBoxField.addItems(colNames[1:11])
def __init__(self,ctrlq,respq): self.prompt = "" self.doc_header = "Radio Block available commands (type help <command>):" self.ctrlQ = ctrlq self.respQ = respq self.com_port_active = False cmd.Cmd.__init__(self) self.ComHandler = comHandler(ctrlQueue,respQueue) self.ComHandler.start() #Wait for comport information while respq.empty(): pass self.portinfo = respq.get()['ports']