Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkIGTLDeviceSourceManagementWidget.h
Go to the documentation of this file.
1 /*===================================================================
2 
3 The Medical Imaging Interaction Toolkit (MITK)
4 
5 Copyright (c) German Cancer Research Center,
6 Division of Medical and Biological Informatics.
7 All rights reserved.
8 
9 This software is distributed WITHOUT ANY WARRANTY; without
10 even the implied warranty of MERCHANTABILITY or FITNESS FOR
11 A PARTICULAR PURPOSE.
12 
13 See LICENSE.txt or http://www.mitk.org for details.
14 
15 ===================================================================*/
16 
17 #ifndef QMITKIGTLDeviceSourceMANAGEMENTWIDGET_H
18 #define QMITKIGTLDeviceSourceMANAGEMENTWIDGET_H
19 
20 //QT headers
21 #include <QWidget>
22 #include <QTimer>
23 
24 //mitk headers
25 #include "MitkOpenIGTLinkUIExports.h"
26 #include "mitkIGTLDeviceSource.h"
27 #include "mitkIGTLClient.h"
28 #include "mitkDataStorage.h"
29 
30 //itk
31 #include <itkCommand.h>
32 
33 //ui header
34 #include "ui_QmitkIGTLDeviceSourceManagementWidgetControls.h"
35 
43 class MITKOPENIGTLINKUI_EXPORT QmitkIGTLDeviceSourceManagementWidget : public QWidget
44 {
45  Q_OBJECT
46 
47  public:
48  static const std::string VIEW_ID;
49 
57  void LoadSource(mitk::IGTLDeviceSource::Pointer sourceToLoad);
58 
59  QmitkIGTLDeviceSourceManagementWidget(QWidget* parent = 0, Qt::WindowFlags f = 0);
61 
62 
63  protected slots:
64  void OnSendMessage();
65 
69  void OnMessageReceived();
70 
74  void OnCommandReceived();
75 
80  void OnLostConnection();
81 
85  void OnNewConnection();
89  void AdaptGUIToState();
90 
91  signals:
96  void AdaptGUIToStateSignal();
97 
98  protected:
102  void OnDeviceStateChanged();
103 
105  void FillCommandsComboBox();
106 
108  virtual void CreateConnections();
109 
110  virtual void CreateQtPartControl(QWidget *parent);
111 
112  Ui::QmitkIGTLDeviceSourceManagementWidgetControls* m_Controls;
113 
116 
119 
122 
128 
129  //############## private help methods #######################
130  void DisableSourceControls();
131 };
132 #endif
itk::SmartPointer< Self > Pointer
mitk::IGTLDeviceSource::Pointer m_IGTLDeviceSource
holds the IGTLDeviceSource we are working with.
bool m_IsClient
flag to indicate if the IGTL device is a client or a server
Ui::QmitkIGTLDeviceSourceManagementWidgetControls * m_Controls
An object of this class offers an UI to manage OpenIGTLink Device Sources and OpenIGTLink Devices...
mitk::IGTLDevice::Pointer m_IGTLDevice
holds the OpenIGTLink device