def _createTab(self, details): # Create a new RRQTab tab = RRQTab(self, details) path = os.path.join(self.resourcesPath, RRQTab.RESOURCE_NAME) uic.loadUi(path, baseinstance=tab) tab.show() self.tabs.append(tab) self.tabWidget.insertTab(0, tab, tab.getName()) self.tabWidget.setCurrentIndex(0) self._startQReader() self._checkMenu()
def _checkPyrq(self): try: self.pushButton_Test.setText("testing") details = self._getDetails() iface = RRQTab.staticConnect(self.debugger, details, PING()) except Exception, e: reason = e.message if (reason==None) or (reason==""): reason = str(e) self.state = PyRQSelectorDialog.STATE_FAIL self.pushButton_Test.setText("FAIL - retest")
def _doActionCallIface(self, postDelay, **kwargs): # Inspect the method signature for 'action' from the Iface and # extract the given args from 'config' and populate the callable kwargs["_executing_"] = ExecutionState.RUNNING details = kwargs["_details_"] namespace = kwargs.get("namespace", None) iface = RRQTab.staticGetIface(details, namespace=namespace) action = kwargs["action"] method = getattr(iface, action) (methodArgs, methodKwargs) = self._getMethodDetails(method) newArgs = [self._workId, kwargs["uId"], method, postDelay] newKwargs = {} # Create the method args dependent on the method signature: # args: for argName in methodArgs: try: newArgs.append(kwargs[argName]) except Exception, _e: print "Unable to locate arg: <%(A)s> in: <%(K)s>." % {"A": argName, "K": kwargs}