36 CreateQtPartControl(
this);
45 void QmitkNDIPolarisWidget::CreateQtPartControl(QWidget *parent)
55 void QmitkNDIPolarisWidget::CreateConnections()
64 m_Controls->portTypeLabelPolaris->setVisible(
false);
65 m_Controls->portTypePolaris->setVisible(
false);
68 m_Controls->m_comPortLabelPolaris->setText(
"Port Nr:");
69 m_Controls->m_portSpinBoxPolaris->setPrefix(
"");
76 m_Controls->m_outputTextPolaris->setHtml(
"<body style=\" font-family:\'MS Shell Dlg 2\'; font-size:7pt; font-weight:400; font-style:normal;\" bgcolor=black><span style=\"color:#ffffff;\"><u>output:</u>");
81 m_Controls->m_outputTextPolaris->setHtml(QString(s.c_str()));
82 m_Controls->m_outputTextPolaris->verticalScrollBar()->setValue(
m_Controls->m_outputTextPolaris->verticalScrollBar()->maximum());
91 port =
m_Controls->m_portSpinBoxPolaris->value();
97 tempTrackingDevice->SetPortNumber(static_cast<mitk::SerialCommunication::PortNumber>(port));
100 prefix =
m_Controls->portTypePolaris->currentText();
105 QString portName = prefix + QString::number(port);
107 tempTrackingDevice->SetDeviceName(portName.toStdString());
115 std::string
id =
"org.mitk.modules.igt.ui.trackingdeviceconfigurationwidget";
119 propList->Set(
"PolarisPortWin",
m_Controls->m_portSpinBoxPolaris->value());
120 propList->Set(
"PortTypePolaris",
m_Controls->portTypePolaris->currentIndex());
126 settings.beginGroup(QString::fromStdString(
id));
127 settings.setValue(
"portSpinBoxPolaris", QVariant(
m_Controls->m_portSpinBoxPolaris->value()));
128 settings.setValue(
"portTypePolaris", QVariant(
m_Controls->portTypePolaris->currentIndex()));
136 std::string
id =
"org.mitk.modules.igt.ui.trackingdeviceconfigurationwidget";
141 int polarisFrameRate = 0;
144 if (propList.IsNull())
146 MITK_ERROR <<
"Property list for this UI (" <<
id <<
") is not available, could not load UI settings!";
return;
149 propList->Get(
"PolarisPortWin", port);
150 propList->Get(
"PortTypePolaris", portType);
151 propList->Get(
"PolarisFrameRate", polarisFrameRate);
154 m_Controls->m_frameRateComboBoxPolaris->setCurrentIndex((
int)(polarisFrameRate / 30));
160 settings.beginGroup(QString::fromStdString(
id));
162 m_Controls->m_portSpinBoxPolaris->setValue(settings.value(
"portSpinBoxPolaris", 0).toInt());
163 m_Controls->portTypePolaris->setCurrentIndex(settings.value(
"portTypePolaris", 0).toInt());
165 m_Controls->m_frameRateComboBoxPolaris->setCurrentIndex((
int)(settings.value(
"PolarisFrameRate", 0).toInt() / 30));
174 QString comboBox =
m_Controls->m_frameRateComboBoxPolaris->currentText();
175 if (comboBox ==
"20 Hz") frameRate =
mitk::Hz20;
176 else if (comboBox ==
"30 Hz") frameRate =
mitk::Hz30;
177 else if (comboBox ==
"60 Hz") frameRate =
mitk::Hz60;
182 m_Controls->m_portSpinBoxPolaris->setValue(portValue);
185 m_Controls->portTypePolaris->setCurrentIndex(portType);
195 clonedWidget->
m_Controls->m_frameRateComboBoxPolaris->setCurrentIndex(
m_Controls->m_frameRateComboBoxPolaris->currentIndex());
itk::SmartPointer< Self > Pointer
IlluminationActivationRate
activation rate of IR illuminator for NDI Polaris tracking device