MITK-IGT
IGT Extension of MITK
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
QmitkIGTLDeviceSourceManagementWidget.h
Go to the documentation of this file.
1/*============================================================================
2
3The Medical Imaging Interaction Toolkit (MITK)
4
5Copyright (c) German Cancer Research Center (DKFZ)
6All rights reserved.
7
8Use of this source code is governed by a 3-clause BSD license that can be
9found in the LICENSE file.
10
11============================================================================*/
12
13#ifndef QmitkIGTLDeviceSourceManagementWidget_h
14#define QmitkIGTLDeviceSourceManagementWidget_h
15
16//QT headers
17#include <QWidget>
18#include <QTimer>
19
20//mitk headers
21#include "MitkOpenIGTLinkUIExports.h"
23#include "mitkIGTLClient.h"
24#include "mitkDataStorage.h"
25
26//itk
27#include <itkCommand.h>
28
29//ui header
30#include "ui_QmitkIGTLDeviceSourceManagementWidgetControls.h"
31
39class MITKOPENIGTLINKUI_EXPORT QmitkIGTLDeviceSourceManagementWidget : public QWidget
40{
41 Q_OBJECT
42
43 public:
44 static const std::string VIEW_ID;
45
53 void LoadSource(mitk::IGTLDeviceSource::Pointer sourceToLoad);
54
55 QmitkIGTLDeviceSourceManagementWidget(QWidget* parent = nullptr, Qt::WindowFlags f = {});
57
58
59 protected slots:
60 void OnSendMessage();
61
65 void OnMessageReceived();
66
70 void OnCommandReceived();
71
76 void OnLostConnection();
77
81 void OnNewConnection();
85 void AdaptGUIToState();
86
87 signals:
93
94 protected:
98 void OnDeviceStateChanged();
99
102
104 virtual void CreateConnections();
105
106 virtual void CreateQtPartControl(QWidget *parent);
107
108 Ui::QmitkIGTLDeviceSourceManagementWidgetControls* m_Controls;
109
111 mitk::IGTLDevice::Pointer m_IGTLDevice;
112
114 mitk::IGTLDeviceSource::Pointer m_IGTLDeviceSource;
115
118
124
125 //############## private help methods #######################
126 void DisableSourceControls();
127};
128#endif
An object of this class offers an UI to manage OpenIGTLink Device Sources and OpenIGTLink Devices.
void AdaptGUIToStateSignal()
used for thread seperation, the worker thread must not call AdaptGUIToState directly QT signals are t...
mitk::IGTLDevice::Pointer m_IGTLDevice
holds the OpenIGTLink device
mitk::IGTLDeviceSource::Pointer m_IGTLDeviceSource
holds the IGTLDeviceSource we are working with.
void FillCommandsComboBox()
Fills the commands combo box with available commands.
bool m_IsClient
flag to indicate if the IGTL device is a client or a server
Ui::QmitkIGTLDeviceSourceManagementWidgetControls * m_Controls