28 ui->m_PortType->clear();
31 ui->m_SerialPortBaud->clear();
32 ui->m_SerialPortBaud->addItems(
m_CommPort->commPortBaudRates());
34 ui->m_SerialPortDataBits->clear();
35 ui->m_SerialPortDataBits->addItems(
m_CommPort->commPortDataBits());
37 ui->m_SerialPortFlowControl->clear();
38 ui->m_SerialPortFlowControl->addItems(
m_CommPort->commPortFlowControls());
40 ui->m_SerialPortParity->clear();
41 ui->m_SerialPortParity->addItems(
m_CommPort->commPortParitys());
43 ui->m_SerialPortStopBits->clear();
44 ui->m_SerialPortStopBits->addItems(
m_CommPort->commPortStopBits());
46 connect(
ui->m_PortType, SIGNAL(currentIndexChanged(
int)),
this, SLOT(
onPortTypeChanged(
int)));
50 QList<QextPortInfo> ports = QextSerialEnumerator::getPorts();
52 QString portName =
m_CommPort->get_SerialPortName();
54 for (
int i=0; i<ports.count(); i++) {
55 QextPortInfo port = ports.value(i);
57 QString aPortName = port.portName;
59 ui->m_SerialPortName->addItem(aPortName);
61 if (portName == aPortName) {
62 ui->m_SerialPortName->setCurrentIndex(i);
66 ui->m_SerialPortBaud->setCurrentIndex(
m_CommPort->get_SerialPortBaud());
67 ui->m_SerialPortDataBits->setCurrentIndex(
m_CommPort->get_SerialPortBits());
68 ui->m_SerialPortFlowControl->setCurrentIndex(
m_CommPort->get_SerialPortFlowControl());
69 ui->m_SerialPortParity->setCurrentIndex(
m_CommPort->get_SerialPortParity());
70 ui->m_SerialPortStopBits->setCurrentIndex(
m_CommPort->get_SerialPortStopBits());
72 ui->m_SocketHostAddress->setText(
m_CommPort->get_SocketHostAddress());
73 ui->m_SocketPortNumber->setValue(
m_CommPort->get_SocketPortNumber());
75 ui->m_EpicsPVName->setText(
m_CommPort->get_EpicsPVName());
QPidCommPortPtr m_CommPort
void onPortTypeChanged(int newType)
Ui::QPidCommPortSelector * ui