Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
An object of this class offers an UI to manage OpenIGTLink Device Sources and OpenIGTLink Devices. More...
#include <QmitkIGTLDeviceSourceManagementWidget.h>
Signals | |
void | AdaptGUIToStateSignal () |
used for thread seperation, the worker thread must not call AdaptGUIToState directly QT signals are thread safe and seperate the threads More... | |
Public Member Functions | |
void | LoadSource (mitk::IGTLDeviceSource::Pointer sourceToLoad) |
QmitkIGTLDeviceSourceManagementWidget (QWidget *parent=nullptr, Qt::WindowFlags f=nullptr) | |
~QmitkIGTLDeviceSourceManagementWidget () override | |
Static Public Attributes | |
static const std::string | VIEW_ID |
Protected Slots | |
void | OnSendMessage () |
void | OnMessageReceived () |
Is called when the current device received a message. More... | |
void | OnCommandReceived () |
Is called when the current device received a command. More... | |
void | OnLostConnection () |
Is called when the current device lost a connection to one of its sockets. More... | |
void | OnNewConnection () |
Is called when the current device connected to another device. More... | |
void | AdaptGUIToState () |
Adapts the GUI to the state of the device. More... | |
Protected Member Functions | |
void | OnDeviceStateChanged () |
Calls AdaptGUIToState() More... | |
void | FillCommandsComboBox () |
Fills the commands combo box with available commands. More... | |
virtual void | CreateConnections () |
Creation of the connections. More... | |
virtual void | CreateQtPartControl (QWidget *parent) |
void | DisableSourceControls () |
Protected Attributes | |
Ui::QmitkIGTLDeviceSourceManagementWidgetControls * | m_Controls |
mitk::IGTLDevice::Pointer | m_IGTLDevice |
holds the OpenIGTLink device More... | |
mitk::IGTLDeviceSource::Pointer | m_IGTLDeviceSource |
holds the IGTLDeviceSource we are working with. More... | |
bool | m_IsClient |
flag to indicate if the IGTL device is a client or a server More... | |
unsigned long | m_MessageReceivedObserverTag |
unsigned long | m_CommandReceivedObserverTag |
unsigned long | m_LostConnectionObserverTag |
unsigned long | m_NewConnectionObserverTag |
unsigned long | m_StateModifiedObserverTag |
An object of this class offers an UI to manage OpenIGTLink Device Sources and OpenIGTLink Devices.
Documentation:
Definition at line 39 of file QmitkIGTLDeviceSourceManagementWidget.h.
QmitkIGTLDeviceSourceManagementWidget::QmitkIGTLDeviceSourceManagementWidget | ( | QWidget * | parent = nullptr , |
Qt::WindowFlags | f = nullptr |
||
) |
Definition at line 39 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References CreateQtPartControl(), m_Controls, and m_IGTLDevice.
|
override |
Definition at line 49 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References m_CommandReceivedObserverTag, m_IGTLDevice, m_LostConnectionObserverTag, m_MessageReceivedObserverTag, m_NewConnectionObserverTag, and m_StateModifiedObserverTag.
|
protectedslot |
Adapts the GUI to the state of the device.
Definition at line 89 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References DisableSourceControls(), m_Controls, m_IGTLDevice, m_IGTLDeviceSource, mitkThrow, mitk::IGTLDevice::Ready, mitk::IGTLDevice::Running, and mitk::IGTLDevice::Setup.
Referenced by CreateConnections(), and LoadSource().
|
signal |
used for thread seperation, the worker thread must not call AdaptGUIToState directly QT signals are thread safe and seperate the threads
Referenced by CreateConnections(), OnDeviceStateChanged(), OnLostConnection(), and OnNewConnection().
|
protectedvirtual |
Creation of the connections.
Definition at line 72 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References AdaptGUIToState(), AdaptGUIToStateSignal(), m_Controls, and OnSendMessage().
Referenced by CreateQtPartControl().
|
protectedvirtual |
Definition at line 58 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References CreateConnections(), and m_Controls.
Referenced by QmitkIGTLDeviceSourceManagementWidget().
|
protected |
Definition at line 207 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References m_Controls.
Referenced by AdaptGUIToState(), and LoadSource().
|
protected |
Fills the commands combo box with available commands.
void QmitkIGTLDeviceSourceManagementWidget::LoadSource | ( | mitk::IGTLDeviceSource::Pointer | sourceToLoad | ) |
Loads a source to the widget. The old source is dropped, so be careful, if the source is not saved somewhere else it might be lost. You might want to ask the user if he wants to save the changes before calling this method.
sourceToLoad | This source will be loaded and might be modified by the user. |
Definition at line 132 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References AdaptGUIToState(), DisableSourceControls(), m_CommandReceivedObserverTag, m_Controls, m_IGTLDevice, m_IGTLDeviceSource, m_IsClient, m_LostConnectionObserverTag, m_MessageReceivedObserverTag, m_NewConnectionObserverTag, m_StateModifiedObserverTag, OnCommandReceived(), OnDeviceStateChanged(), OnLostConnection(), OnMessageReceived(), and OnNewConnection().
|
protectedslot |
Is called when the current device received a command.
Definition at line 229 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
Referenced by LoadSource().
|
protected |
Calls AdaptGUIToState()
Definition at line 84 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by LoadSource().
|
protectedslot |
Is called when the current device lost a connection to one of its sockets.
Definition at line 234 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by LoadSource().
|
protectedslot |
Is called when the current device received a message.
Definition at line 224 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
Referenced by LoadSource().
|
protectedslot |
Is called when the current device connected to another device.
Definition at line 239 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by LoadSource().
|
protectedslot |
Definition at line 215 of file QmitkIGTLDeviceSourceManagementWidget.cpp.
References m_Controls, m_IGTLDevice, and mitk::IGTLMessage::New().
Referenced by CreateConnections().
|
protected |
Definition at line 120 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by LoadSource(), and ~QmitkIGTLDeviceSourceManagementWidget().
|
protected |
Definition at line 108 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by AdaptGUIToState(), CreateConnections(), CreateQtPartControl(), DisableSourceControls(), LoadSource(), OnSendMessage(), and QmitkIGTLDeviceSourceManagementWidget().
|
protected |
holds the OpenIGTLink device
Definition at line 111 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by AdaptGUIToState(), LoadSource(), OnSendMessage(), QmitkIGTLDeviceSourceManagementWidget(), and ~QmitkIGTLDeviceSourceManagementWidget().
|
protected |
holds the IGTLDeviceSource we are working with.
Definition at line 114 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by AdaptGUIToState(), and LoadSource().
|
protected |
flag to indicate if the IGTL device is a client or a server
Definition at line 117 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by LoadSource().
|
protected |
Definition at line 121 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by LoadSource(), and ~QmitkIGTLDeviceSourceManagementWidget().
|
protected |
Definition at line 119 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by LoadSource(), and ~QmitkIGTLDeviceSourceManagementWidget().
|
protected |
Definition at line 122 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by LoadSource(), and ~QmitkIGTLDeviceSourceManagementWidget().
|
protected |
Definition at line 123 of file QmitkIGTLDeviceSourceManagementWidget.h.
Referenced by LoadSource(), and ~QmitkIGTLDeviceSourceManagementWidget().
|
static |
Definition at line 44 of file QmitkIGTLDeviceSourceManagementWidget.h.