Medical Imaging Interaction Toolkit
2016.11.0
Medical Imaging Interaction Toolkit
|
An object of this class offers an UI to send OpenIGTLink commands. More...
#include <QmitkIGTLDeviceCommandWidget.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 | Initialize (mitk::IGTLDevice::Pointer device) |
Initializes the widget with the given device. More... | |
QmitkIGTLDeviceCommandWidget (QWidget *parent=0, Qt::WindowFlags f=0) | |
~QmitkIGTLDeviceCommandWidget () | |
Static Public Attributes | |
static const std::string | VIEW_ID |
Protected Slots | |
void | OnCommandChanged (const QString &curCommand) |
void | OnSendCommand () |
void | OnLostConnection () |
Is called when the current device received a message. 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 () |
void | EnableSourceControls () |
Protected Attributes | |
Ui::QmitkIGTLDeviceCommandWidgetControls * | m_Controls |
mitk::IGTLDevice::Pointer | m_IGTLDevice |
holds the OpenIGTLink device More... | |
igtl::MessageBase::Pointer | m_CurrentCommand |
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 send OpenIGTLink commands.
Documentation:
Definition at line 42 of file QmitkIGTLDeviceCommandWidget.h.
QmitkIGTLDeviceCommandWidget::QmitkIGTLDeviceCommandWidget | ( | QWidget * | parent = 0 , |
Qt::WindowFlags | f = 0 |
||
) |
Definition at line 43 of file QmitkIGTLDeviceCommandWidget.cpp.
References CreateQtPartControl(), m_Controls, and m_IGTLDevice.
QmitkIGTLDeviceCommandWidget::~QmitkIGTLDeviceCommandWidget | ( | ) |
Definition at line 53 of file QmitkIGTLDeviceCommandWidget.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 99 of file QmitkIGTLDeviceCommandWidget.cpp.
References DisableSourceControls(), m_Controls, m_IGTLDevice, mitkThrow, mitk::IGTLDevice::Ready, mitk::IGTLDevice::Running, and mitk::IGTLDevice::Setup.
Referenced by CreateConnections(), and Initialize().
|
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 76 of file QmitkIGTLDeviceCommandWidget.cpp.
References AdaptGUIToState(), AdaptGUIToStateSignal(), m_Controls, OnCommandChanged(), and OnSendCommand().
Referenced by CreateQtPartControl().
|
protectedvirtual |
Definition at line 62 of file QmitkIGTLDeviceCommandWidget.cpp.
References CreateConnections(), and m_Controls.
Referenced by QmitkIGTLDeviceCommandWidget().
|
protected |
Definition at line 215 of file QmitkIGTLDeviceCommandWidget.cpp.
References m_Controls.
Referenced by AdaptGUIToState(), and Initialize().
|
protected |
|
protected |
Fills the commands combo box with available commands.
Definition at line 276 of file QmitkIGTLDeviceCommandWidget.cpp.
References m_Controls, and m_IGTLDevice.
Referenced by Initialize().
void QmitkIGTLDeviceCommandWidget::Initialize | ( | mitk::IGTLDevice::Pointer | device | ) |
Initializes the widget with the given device.
The old device 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.
device | The widget will be initialized corresponding to the state of this device. |
Definition at line 143 of file QmitkIGTLDeviceCommandWidget.cpp.
References AdaptGUIToState(), DisableSourceControls(), FillCommandsComboBox(), m_CommandReceivedObserverTag, m_IGTLDevice, m_IsClient, m_LostConnectionObserverTag, m_MessageReceivedObserverTag, m_NewConnectionObserverTag, m_StateModifiedObserverTag, mitk::New(), OnDeviceStateChanged(), OnLostConnection(), and OnNewConnection().
|
protectedslot |
Definition at line 247 of file QmitkIGTLDeviceCommandWidget.cpp.
References m_Controls, m_CurrentCommand, and m_IGTLDevice.
Referenced by CreateConnections().
|
protected |
Calls AdaptGUIToState()
Definition at line 93 of file QmitkIGTLDeviceCommandWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by Initialize().
|
protectedslot |
Is called when the current device received a message.
Is called when the current device received a command Is called when the current device lost a connection to one of its sockets
Definition at line 261 of file QmitkIGTLDeviceCommandWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by Initialize().
|
protectedslot |
Is called when the current device connected to another device.
Definition at line 270 of file QmitkIGTLDeviceCommandWidget.cpp.
References AdaptGUIToStateSignal().
Referenced by Initialize().
|
protectedslot |
Definition at line 225 of file QmitkIGTLDeviceCommandWidget.cpp.
References m_Controls, m_CurrentCommand, and m_IGTLDevice.
Referenced by CreateConnections().
|
protected |
Definition at line 130 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by Initialize(), and ~QmitkIGTLDeviceCommandWidget().
|
protected |
Definition at line 118 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by AdaptGUIToState(), CreateConnections(), CreateQtPartControl(), DisableSourceControls(), FillCommandsComboBox(), OnCommandChanged(), OnSendCommand(), and QmitkIGTLDeviceCommandWidget().
|
protected |
Definition at line 123 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by OnCommandChanged(), and OnSendCommand().
|
protected |
holds the OpenIGTLink device
Definition at line 121 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by AdaptGUIToState(), FillCommandsComboBox(), Initialize(), OnCommandChanged(), OnSendCommand(), QmitkIGTLDeviceCommandWidget(), and ~QmitkIGTLDeviceCommandWidget().
|
protected |
flag to indicate if the IGTL device is a client or a server
Definition at line 127 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by Initialize().
|
protected |
Definition at line 131 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by Initialize(), and ~QmitkIGTLDeviceCommandWidget().
|
protected |
Definition at line 129 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by Initialize(), and ~QmitkIGTLDeviceCommandWidget().
|
protected |
Definition at line 132 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by Initialize(), and ~QmitkIGTLDeviceCommandWidget().
|
protected |
Definition at line 133 of file QmitkIGTLDeviceCommandWidget.h.
Referenced by Initialize(), and ~QmitkIGTLDeviceCommandWidget().
|
static |
Definition at line 47 of file QmitkIGTLDeviceCommandWidget.h.