Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkIGTLDeviceSourceManagementWidget Class Reference

An object of this class offers an UI to manage OpenIGTLink Device Sources and OpenIGTLink Devices. More...

#include <QmitkIGTLDeviceSourceManagementWidget.h>

Inheritance diagram for QmitkIGTLDeviceSourceManagementWidget:
Collaboration diagram for QmitkIGTLDeviceSourceManagementWidget:

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=0, Qt::WindowFlags f=0)
 
 ~QmitkIGTLDeviceSourceManagementWidget ()
 

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
 

Detailed Description

An object of this class offers an UI to manage OpenIGTLink Device Sources and OpenIGTLink Devices.

Documentation:

Definition at line 43 of file QmitkIGTLDeviceSourceManagementWidget.h.

Constructor & Destructor Documentation

QmitkIGTLDeviceSourceManagementWidget::QmitkIGTLDeviceSourceManagementWidget ( QWidget *  parent = 0,
Qt::WindowFlags  f = 0 
)
QmitkIGTLDeviceSourceManagementWidget::~QmitkIGTLDeviceSourceManagementWidget ( )

Member Function Documentation

void QmitkIGTLDeviceSourceManagementWidget::AdaptGUIToState ( )
protectedslot
void QmitkIGTLDeviceSourceManagementWidget::AdaptGUIToStateSignal ( )
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().

void QmitkIGTLDeviceSourceManagementWidget::CreateConnections ( )
protectedvirtual

Creation of the connections.

Definition at line 76 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

References AdaptGUIToState(), AdaptGUIToStateSignal(), m_Controls, and OnSendMessage().

Referenced by CreateQtPartControl().

void QmitkIGTLDeviceSourceManagementWidget::CreateQtPartControl ( QWidget *  parent)
protectedvirtual
void QmitkIGTLDeviceSourceManagementWidget::DisableSourceControls ( )
protected

Definition at line 211 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

References m_Controls.

Referenced by AdaptGUIToState(), and LoadSource().

void QmitkIGTLDeviceSourceManagementWidget::FillCommandsComboBox ( )
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.

Parameters
sourceToLoadThis source will be loaded and might be modified by the user.

Definition at line 136 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, mitk::New(), OnCommandReceived(), OnDeviceStateChanged(), OnLostConnection(), OnMessageReceived(), and OnNewConnection().

void QmitkIGTLDeviceSourceManagementWidget::OnCommandReceived ( )
protectedslot

Is called when the current device received a command.

Definition at line 233 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

Referenced by LoadSource().

void QmitkIGTLDeviceSourceManagementWidget::OnDeviceStateChanged ( )
protected

Calls AdaptGUIToState()

Definition at line 88 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

References AdaptGUIToStateSignal().

Referenced by LoadSource().

void QmitkIGTLDeviceSourceManagementWidget::OnLostConnection ( )
protectedslot

Is called when the current device lost a connection to one of its sockets.

Definition at line 238 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

References AdaptGUIToStateSignal().

Referenced by LoadSource().

void QmitkIGTLDeviceSourceManagementWidget::OnMessageReceived ( )
protectedslot

Is called when the current device received a message.

Definition at line 228 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

Referenced by LoadSource().

void QmitkIGTLDeviceSourceManagementWidget::OnNewConnection ( )
protectedslot

Is called when the current device connected to another device.

Definition at line 243 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

References AdaptGUIToStateSignal().

Referenced by LoadSource().

void QmitkIGTLDeviceSourceManagementWidget::OnSendMessage ( )
protectedslot

Definition at line 219 of file QmitkIGTLDeviceSourceManagementWidget.cpp.

References m_Controls, m_IGTLDevice, and mitk::New().

Referenced by CreateConnections().

Member Data Documentation

unsigned long QmitkIGTLDeviceSourceManagementWidget::m_CommandReceivedObserverTag
protected
Ui::QmitkIGTLDeviceSourceManagementWidgetControls* QmitkIGTLDeviceSourceManagementWidget::m_Controls
protected
mitk::IGTLDevice::Pointer QmitkIGTLDeviceSourceManagementWidget::m_IGTLDevice
protected
mitk::IGTLDeviceSource::Pointer QmitkIGTLDeviceSourceManagementWidget::m_IGTLDeviceSource
protected

holds the IGTLDeviceSource we are working with.

Definition at line 118 of file QmitkIGTLDeviceSourceManagementWidget.h.

Referenced by AdaptGUIToState(), and LoadSource().

bool QmitkIGTLDeviceSourceManagementWidget::m_IsClient
protected

flag to indicate if the IGTL device is a client or a server

Definition at line 121 of file QmitkIGTLDeviceSourceManagementWidget.h.

Referenced by LoadSource().

unsigned long QmitkIGTLDeviceSourceManagementWidget::m_LostConnectionObserverTag
protected
unsigned long QmitkIGTLDeviceSourceManagementWidget::m_MessageReceivedObserverTag
protected
unsigned long QmitkIGTLDeviceSourceManagementWidget::m_NewConnectionObserverTag
protected
unsigned long QmitkIGTLDeviceSourceManagementWidget::m_StateModifiedObserverTag
protected
const std::string QmitkIGTLDeviceSourceManagementWidget::VIEW_ID
static

Definition at line 48 of file QmitkIGTLDeviceSourceManagementWidget.h.


The documentation for this class was generated from the following files: