+ serial_devices_.setEnabled(false);
+
+ tcp_config_ = new QWidget();
+ QHBoxLayout *tcp_config_layout = new QHBoxLayout(tcp_config_);
+ tcp_host_ = new QLineEdit;
+ tcp_host_->setText("192.168.1.100");
+ tcp_config_layout->addWidget(tcp_host_);
+ tcp_config_layout->addWidget(new QLabel(":"));
+ tcp_port_ = new QSpinBox;
+ tcp_port_->setRange(1, 65535);
+ tcp_port_->setValue(5555);
+ tcp_config_layout->addWidget(tcp_port_);
+
+ tcp_config_layout->addSpacing(30);
+ tcp_config_layout->addWidget(new QLabel(tr("Protocol:")));
+ tcp_protocol_ = new QComboBox();
+ tcp_protocol_->addItem("Raw TCP", QVariant("tcp-raw/%1/%2"));
+ tcp_protocol_->addItem("VXI", QVariant("vxi/%1/%2"));
+ tcp_config_layout->addWidget(tcp_protocol_);
+ tcp_config_layout->setContentsMargins(0, 0, 0, 0);
+ tcp_config_->setEnabled(false);
+
+ // Let the device list occupy only the minimum space needed
+ device_list_.setMaximumHeight(device_list_.minimumSizeHint().height());
+
+ QVBoxLayout *vbox_if = new QVBoxLayout;
+ vbox_if->addWidget(radiobtn_usb);
+ vbox_if->addWidget(radiobtn_serial);
+ vbox_if->addWidget(&serial_devices_);
+ vbox_if->addWidget(radiobtn_tcp);
+ vbox_if->addWidget(tcp_config_);
+
+ QGroupBox *groupbox_if = new QGroupBox(tr("Step 2: Choose the interface"));
+ groupbox_if->setLayout(vbox_if);
+ form_layout_.addRow(groupbox_if);
+
+ QVBoxLayout *vbox_scan = new QVBoxLayout;
+ vbox_scan->addWidget(&scan_button_);
+ QGroupBox *groupbox_scan = new QGroupBox(tr("Step 3: Scan for devices"));
+ groupbox_scan->setLayout(vbox_scan);
+ form_layout_.addRow(groupbox_scan);
+
+ QVBoxLayout *vbox_select = new QVBoxLayout;
+ vbox_select->addWidget(&device_list_);
+ QGroupBox *groupbox_select = new QGroupBox(tr("Step 4: Select the device"));
+ groupbox_select->setLayout(vbox_select);
+ form_layout_.addRow(groupbox_select);