MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkIGTLDeviceCommandWidget.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 QmitkIGTLDeviceCommandWidget_h
14#define QmitkIGTLDeviceCommandWidget_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_QmitkIGTLDeviceCommandWidgetControls.h"
31
38class MITKOPENIGTLINKUI_EXPORT QmitkIGTLDeviceCommandWidget : public QWidget
39{
40 Q_OBJECT
41
42 public:
43 static const std::string VIEW_ID;
44
55 void Initialize(mitk::IGTLDevice::Pointer device);
56
57 QmitkIGTLDeviceCommandWidget(QWidget* parent = nullptr, Qt::WindowFlags f = {});
59
60
61 protected slots:
62 void OnCommandChanged(const QString& curCommand);
63
64 void OnSendCommand();
65
67 //* \brief Is called when the current device received a message
68 //*/
69 //void OnMessageReceived();
70
72 //* \brief Is called when the current device received a command
73 //*/
74 //void OnCommandReceived();
75
80 void OnLostConnection();
81
85 void OnNewConnection();
86
90 void AdaptGUIToState();
91
92 signals:
98
99 protected:
100
104 void OnDeviceStateChanged();
105
107 void FillCommandsComboBox();
108
110 virtual void CreateConnections();
111
112 virtual void CreateQtPartControl(QWidget *parent);
113
114 Ui::QmitkIGTLDeviceCommandWidgetControls* m_Controls;
115
117 mitk::IGTLDevice::Pointer m_IGTLDevice;
118
119 igtl::MessageBase::Pointer m_CurrentCommand;
120
121
124
130
131 //############## private help methods #######################
132 void DisableSourceControls();
134};
135#endif
An object of this class offers an UI to send OpenIGTLink commands.
bool m_IsClient
flag to indicate if the IGTL device is a client or a server
igtl::MessageBase::Pointer m_CurrentCommand
void AdaptGUIToStateSignal()
used for thread seperation, the worker thread must not call AdaptGUIToState directly QT signals are t...
Ui::QmitkIGTLDeviceCommandWidgetControls * m_Controls
mitk::IGTLDevice::Pointer m_IGTLDevice
holds the OpenIGTLink device