26 #include <qfiledialog.h>
27 #include <qinputdialog.h>
28 #include <qmessagebox.h>
29 #include <qscrollbar.h>
32 #include <igtlStringMessage.h>
33 #include <igtlBindMessage.h>
34 #include <igtlQuaternionTrackingDataMessage.h>
35 #include <igtlTrackingDataMessage.h>
38 #include <Poco/Path.h>
41 "org.mitk.views.igtldevicesourcemanagementwidget";
44 QWidget* parent, Qt::WindowFlags f)
45 : QWidget(parent, f), m_IsClient(false)
77 m_Controls =
new Ui::QmitkIGTLStreamingManagementWidgetControls;
90 connect((QObject*)(
m_Controls->messageSourceSelectionWidget),
94 connect(
m_Controls->startStreamPushButton, SIGNAL(clicked()),
96 connect(
m_Controls->stopStreamPushButton, SIGNAL(clicked()),
117 m_Controls->messageSourceSelectionWidget->setEnabled(
false);
118 m_Controls->selectedSourceLabel->setText(
"<none>");
119 m_Controls->startStreamPushButton->setEnabled(
false);
120 m_Controls->selectedSourceLabel->setEnabled(
false);
122 m_Controls->stopStreamPushButton->setEnabled(
false);
132 m_Controls->messageSourceSelectionWidget->setEnabled(
false);
133 m_Controls->selectedSourceLabel->setText(
"<none>");
134 m_Controls->startStreamPushButton->setEnabled(
false);
135 m_Controls->selectedSourceLabel->setEnabled(
false);
137 m_Controls->stopStreamPushButton->setEnabled(
false);
146 m_Controls->messageSourceSelectionWidget->setEnabled(
true);
147 m_Controls->selectedSourceLabel->setText(
"<none>");
148 m_Controls->startStreamPushButton->setEnabled(
false);
149 m_Controls->selectedSourceLabel->setEnabled(
false);
151 m_Controls->stopStreamPushButton->setEnabled(
false);
157 QString nameOfSource =
159 m_Controls->messageSourceSelectionWidget->setEnabled(
true);
160 m_Controls->selectedSourceLabel->setText(nameOfSource);
161 m_Controls->selectedSourceLabel->setEnabled(
true);
167 m_Controls->startStreamPushButton->setEnabled(
false);
168 m_Controls->stopStreamPushButton->setEnabled(
true);
174 m_Controls->startStreamPushButton->setEnabled(
true);
175 m_Controls->stopStreamPushButton->setEnabled(
false);
199 if (provider.IsNull())
214 if (dynamic_cast<mitk::IGTLClient*>(
224 typedef itk::SimpleMemberCommand< QmitkIGTLStreamingManagementWidget > CurCommandType;
238 connectionLostCommand->SetCallbackFunction(
241 mitk::LostConnectionEvent(), connectionLostCommand);
244 newConnectionCommand->SetCallbackFunction(
247 mitk::NewClientConnectionEvent(), newConnectionCommand);
250 stateModifiedCommand->SetCallbackFunction(
253 itk::ModifiedEvent(), stateModifiedCommand);
256 startStreamingTimerCommand->SetCallbackFunction(
259 mitk::StreamingStartRequiredEvent(), startStreamingTimerCommand);
262 stopStreamingTimerCommand->SetCallbackFunction(
265 mitk::StreamingStopRequiredEvent(), stopStreamingTimerCommand);
272 m_Controls->selectedSourceLabel->setText(
"<none>");
273 m_Controls->startStreamPushButton->setEnabled(
false);
274 m_Controls->stopStreamPushButton->setEnabled(
false);
277 m_Controls->selectedSourceLabel->setEnabled(
false);
279 m_Controls->messageSourceSelectionWidget->setEnabled(
false);
288 if (source.IsNotNull())
291 m_Controls->selectedSourceLabel->setText(source->GetName().c_str());
292 m_Controls->selectedSourceLabel->setEnabled(
true);
300 unsigned int fps = this->
m_Controls->fpsSpinBox->value();
373 m_Controls->messageSourceSelectionWidget->GetSelectedIGTLMessageSource();
itk::SmartPointer< Self > Pointer
IGTLDeviceState
Type for state variable. The IGTLDevice is always in one of these states.
static itkEventMacro(BoundingShapeInteractionEvent, itk::AnyEvent) class MITKBOUNDINGSHAPE_EXPORT BoundingShapeInteractor Pointer New()
Basic interaction methods for mitk::GeometryData.