/*! A report that a new connection to the LabTool Hardware has been made. The \a newComm instance is sent to the \ref LabToolCaptureDevice and \ref LabToolGeneratorDevice after updating all signal connections. */ void LabToolDevice::handleNewConnection(LabToolDeviceComm *newComm) { if (mDeviceComm != NULL) { mDeviceComm->disconnect(); delete mDeviceComm; } mDeviceComm = newComm; /* Handle signals related to connection status */ QObject::connect(mDeviceComm, SIGNAL(connectionStatus(bool)), this, SLOT(handleConnectedStatus(bool))); /* Handle signals related to capture */ QObject::connect(mDeviceComm, SIGNAL(captureStopped()), mCaptureDevice, SLOT(handleStopped())); QObject::connect(mDeviceComm, SIGNAL(captureReceivedSamples(LabToolDeviceTransfer*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int)), mCaptureDevice, SLOT(handleReceivedSamples(LabToolDeviceTransfer*, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int, unsigned int))); QObject::connect(mDeviceComm, SIGNAL(captureConfigurationDone()), mCaptureDevice, SLOT(handleConfigurationDone())); QObject::connect(mDeviceComm, SIGNAL(captureFailed(const char*)), mCaptureDevice, SLOT(handleFailedCapture(const char*))); QObject::connect(mDeviceComm, SIGNAL(captureConfigurationFailed(const char*)), mCaptureDevice, SLOT(handleConfigurationFailure(const char*))); /* Handle signals related to generator */ QObject::connect(mDeviceComm, SIGNAL(generatorStopped()), mGeneratorDevice, SLOT(handleStopped())); QObject::connect(mDeviceComm, SIGNAL(generatorConfigurationDone()), mGeneratorDevice, SLOT(handleConfigurationDone())); QObject::connect(mDeviceComm, SIGNAL(generatorConfigurationFailed(const char*)), mGeneratorDevice, SLOT(handleConfigurationFailure(const char*))); QObject::connect(mDeviceComm, SIGNAL(generatorRunFailed(const char*)), mGeneratorDevice, SLOT(handleRunningFailure(const char*))); QObject::connect(mDeviceComm, SIGNAL(generatorRunning()), mGeneratorDevice, SLOT(handleRunning())); mCaptureDevice->setDeviceComm(newComm); mGeneratorDevice->setDeviceComm(newComm); handleConnectedStatus(true); }
void GdbDebugger::handleAsyncClass(const QByteArray &asyncClass, const GdbMiValue &result) { m_asyncItem->removeRows(0,m_asyncItem->rowCount()); m_asyncItem->setText(asyncClass); //QStandardItem *item = new QStandardItem(QString(asyncClass)); GdbMiValueToItem(m_asyncItem,result); //m_asyncModel->clear(); //m_asyncModel->appendRow(item); if (asyncClass == "stopped") { handleStopped(result); } else if (asyncClass == "library-loaded") { handleLibrary(result); } emit setExpand(LiteApi::ASYNC_MODEL,m_asyncModel->indexFromItem(m_asyncItem),true); }