QStringList DMXUSB::outputs() { QStringList list; int i = 1; for (int w = 0; w < m_outputs.count();) { DMXUSBWidget* widget = m_outputs.at(w); foreach(QString name, widget->outputNames()) list << QString("%1: %2").arg(i++).arg(name); w += widget->outputsNumber(); } return list; }
void DMXUSB::closeInput(quint32 input) { if (input < quint32(m_inputs.size())) { DMXUSBWidget *widget = m_inputs.at(input); widget->close(input, true); if (widget->type() == DMXUSBWidget::ProRXTX || widget->type() == DMXUSBWidget::ProMk2 || widget->type() == DMXUSBWidget::UltraPro) { EnttecDMXUSBPro* pro = (EnttecDMXUSBPro*) widget; disconnect(pro, SIGNAL(valueChanged(quint32,quint32,quint32,uchar)), this, SIGNAL(valueChanged(quint32,quint32,quint32,uchar))); } } }
bool DMXUSB::openInput(quint32 input) { if (input < quint32(m_inputs.size())) { DMXUSBWidget *widget = m_inputs.at(input); if (widget->type() == DMXUSBWidget::ProRXTX || widget->type() == DMXUSBWidget::ProMk2 || widget->type() == DMXUSBWidget::UltraPro) { EnttecDMXUSBPro* pro = (EnttecDMXUSBPro*) widget; connect(pro, SIGNAL(valueChanged(quint32,quint32,quint32,uchar)), this, SIGNAL(valueChanged(quint32,quint32,quint32,uchar))); } return widget->open(input, true); } return false; }
bool DMXUSB::openInput(quint32 input, quint32 universe) { if (input < quint32(m_inputs.size())) { DMXUSBWidget *widget = m_inputs.at(input); if (widget->type() == DMXUSBWidget::ProRXTX || widget->type() == DMXUSBWidget::ProMk2 || widget->type() == DMXUSBWidget::UltraPro) { EnttecDMXUSBPro *pro = static_cast<EnttecDMXUSBPro*>(widget); connect(pro, SIGNAL(valueChanged(quint32,quint32,quint32,uchar)), this, SIGNAL(valueChanged(quint32,quint32,quint32,uchar))); } addToMap(universe, input, Input); return widget->open(input, true); } return false; }