Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkIGTLStreamingManagementWidget Class Reference

An object of this class offers an UI to manage the streaming of message sources. More...

#include <QmitkIGTLStreamingManagementWidget.h>

Inheritance diagram for QmitkIGTLStreamingManagementWidget:
Collaboration diagram for QmitkIGTLStreamingManagementWidget:

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...
 
void SelectSourceAndAdaptGUISignal ()
 used for thread seperation, the worker thread must not call SelectSourceAndAdaptGUI directly. QT signals are thread safe and seperate the threads More...
 

Public Member Functions

void LoadSource (mitk::IGTLMessageProvider::Pointer provider)
 
 QmitkIGTLStreamingManagementWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 
 ~QmitkIGTLStreamingManagementWidget ()
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Slots

void OnStartStreaming ()
 
void OnStopStreaming ()
 
void OnStreamingTimerTimeout ()
 
void SourceSelected (mitk::IGTLMessageSource::Pointer source)
 Is called when a new source is selected. More...
 
void AdaptGUIToState ()
 Adapts the GUI to the state of the device. More...
 
void SelectSourceAndAdaptGUI ()
 selects the current source and adapts the GUI according to the selection More...
 

Protected Member Functions

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 OnStartStreamingTimer ()
 Is called when provider requests the start of the streaming timer. More...
 
void OnStopStreamingTimer ()
 Is called when provider requests the stop of the streaming timer. More...
 
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 RemoveObserver ()
 

Protected Attributes

Ui::QmitkIGTLStreamingManagementWidgetControls * m_Controls
 
mitk::IGTLDevice::Pointer m_IGTLDevice
 holds the OpenIGTLink device More...
 
mitk::IGTLMessageProvider::Pointer m_IGTLMsgProvider
 holds the IGTL Message Provider that will send the stream More...
 
mitk::IGTLMessageSource::Pointer m_IGTLMsgSource
 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...
 
QTimer m_StreamingTimer
 the streaming timer that periodically calls the update method of the provider More...
 
unsigned long m_MessageReceivedObserverTag
 
unsigned long m_CommandReceivedObserverTag
 
unsigned long m_LostConnectionObserverTag
 
unsigned long m_NewConnectionObserverTag
 
unsigned long m_StateModifiedObserverTag
 
unsigned long m_StartStreamingTimerObserverTag
 
unsigned long m_StopStreamingTimerObserverTag
 

Detailed Description

An object of this class offers an UI to manage the streaming of message sources.

Documentation:

Definition at line 43 of file QmitkIGTLStreamingManagementWidget.h.

Constructor & Destructor Documentation

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

Definition at line 52 of file QmitkIGTLStreamingManagementWidget.cpp.

References RemoveObserver().

Member Function Documentation

void QmitkIGTLStreamingManagementWidget::AdaptGUIToState ( )
protectedslot
void QmitkIGTLStreamingManagementWidget::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(), OnStartStreamingTimer(), and OnStopStreamingTimer().

void QmitkIGTLStreamingManagementWidget::CreateConnections ( )
protectedvirtual
void QmitkIGTLStreamingManagementWidget::CreateQtPartControl ( QWidget *  parent)
protectedvirtual
void QmitkIGTLStreamingManagementWidget::DisableSourceControls ( )
protected

Definition at line 270 of file QmitkIGTLStreamingManagementWidget.cpp.

References m_Controls.

Referenced by AdaptGUIToState(), LoadSource(), and SourceSelected().

void QmitkIGTLStreamingManagementWidget::FillCommandsComboBox ( )
protected

Fills the commands combo box with available commands.

void QmitkIGTLStreamingManagementWidget::LoadSource ( mitk::IGTLMessageProvider::Pointer  provider)

Loads a provider 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
providerThis provider will be loaded and might be modified by the user.

Definition at line 193 of file QmitkIGTLStreamingManagementWidget.cpp.

References AdaptGUIToState(), DisableSourceControls(), m_IGTLDevice, m_IGTLMsgProvider, m_IsClient, m_LostConnectionObserverTag, m_NewConnectionObserverTag, m_StartStreamingTimerObserverTag, m_StateModifiedObserverTag, m_StopStreamingTimerObserverTag, m_StreamingTimer, mitk::New(), OnDeviceStateChanged(), OnLostConnection(), OnNewConnection(), OnStartStreamingTimer(), OnStopStreamingTimer(), and RemoveObserver().

void QmitkIGTLStreamingManagementWidget::OnCommandReceived ( )
protected

Is called when the current device received a command.

Definition at line 315 of file QmitkIGTLStreamingManagementWidget.cpp.

void QmitkIGTLStreamingManagementWidget::OnDeviceStateChanged ( )
protected

Calls AdaptGUIToState()

Definition at line 319 of file QmitkIGTLStreamingManagementWidget.cpp.

References AdaptGUIToStateSignal().

Referenced by LoadSource().

void QmitkIGTLStreamingManagementWidget::OnLostConnection ( )
protected

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

Definition at line 324 of file QmitkIGTLStreamingManagementWidget.cpp.

References AdaptGUIToStateSignal().

Referenced by LoadSource().

void QmitkIGTLStreamingManagementWidget::OnMessageReceived ( )
protected

Is called when the current device received a message.

Definition at line 311 of file QmitkIGTLStreamingManagementWidget.cpp.

void QmitkIGTLStreamingManagementWidget::OnNewConnection ( )
protected

Is called when the current device connected to another device.

Definition at line 329 of file QmitkIGTLStreamingManagementWidget.cpp.

References SelectSourceAndAdaptGUISignal().

Referenced by LoadSource().

void QmitkIGTLStreamingManagementWidget::OnStartStreaming ( )
protectedslot
void QmitkIGTLStreamingManagementWidget::OnStartStreamingTimer ( )
protected

Is called when provider requests the start of the streaming timer.

Definition at line 334 of file QmitkIGTLStreamingManagementWidget.cpp.

References AdaptGUIToStateSignal(), m_IGTLMsgProvider, m_StreamingTimer, and OnStreamingTimerTimeout().

Referenced by LoadSource().

void QmitkIGTLStreamingManagementWidget::OnStopStreaming ( )
protectedslot
void QmitkIGTLStreamingManagementWidget::OnStopStreamingTimer ( )
protected

Is called when provider requests the stop of the streaming timer.

Definition at line 348 of file QmitkIGTLStreamingManagementWidget.cpp.

References AdaptGUIToStateSignal(), m_IGTLMsgProvider, m_StreamingTimer, and OnStreamingTimerTimeout().

Referenced by LoadSource().

void QmitkIGTLStreamingManagementWidget::OnStreamingTimerTimeout ( )
protectedslot
void QmitkIGTLStreamingManagementWidget::SelectSourceAndAdaptGUI ( )
protectedslot

selects the current source and adapts the GUI according to the selection

Definition at line 369 of file QmitkIGTLStreamingManagementWidget.cpp.

References m_Controls, and SourceSelected().

Referenced by CreateConnections().

void QmitkIGTLStreamingManagementWidget::SelectSourceAndAdaptGUISignal ( )
signal

used for thread seperation, the worker thread must not call SelectSourceAndAdaptGUI directly. QT signals are thread safe and seperate the threads

Referenced by CreateConnections(), and OnNewConnection().

void QmitkIGTLStreamingManagementWidget::SourceSelected ( mitk::IGTLMessageSource::Pointer  source)
protectedslot

Is called when a new source is selected.

Parameters
sourcethe newly selected source

Definition at line 282 of file QmitkIGTLStreamingManagementWidget.cpp.

References AdaptGUIToState(), DisableSourceControls(), m_Controls, and m_IGTLMsgSource.

Referenced by CreateConnections(), and SelectSourceAndAdaptGUI().

Member Data Documentation

unsigned long QmitkIGTLStreamingManagementWidget::m_CommandReceivedObserverTag
protected

Definition at line 160 of file QmitkIGTLStreamingManagementWidget.h.

Ui::QmitkIGTLStreamingManagementWidgetControls* QmitkIGTLStreamingManagementWidget::m_Controls
protected
mitk::IGTLDevice::Pointer QmitkIGTLStreamingManagementWidget::m_IGTLDevice
protected

holds the OpenIGTLink device

Definition at line 145 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by AdaptGUIToState(), LoadSource(), QmitkIGTLStreamingManagementWidget(), and RemoveObserver().

mitk::IGTLMessageProvider::Pointer QmitkIGTLStreamingManagementWidget::m_IGTLMsgProvider
protected
mitk::IGTLMessageSource::Pointer QmitkIGTLStreamingManagementWidget::m_IGTLMsgSource
protected

holds the IGTLDeviceSource we are working with.

Definition at line 151 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by AdaptGUIToState(), OnStartStreaming(), OnStopStreaming(), OnStreamingTimerTimeout(), and SourceSelected().

bool QmitkIGTLStreamingManagementWidget::m_IsClient
protected

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

Definition at line 154 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource().

unsigned long QmitkIGTLStreamingManagementWidget::m_LostConnectionObserverTag
protected

Definition at line 161 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource(), and RemoveObserver().

unsigned long QmitkIGTLStreamingManagementWidget::m_MessageReceivedObserverTag
protected

Definition at line 159 of file QmitkIGTLStreamingManagementWidget.h.

unsigned long QmitkIGTLStreamingManagementWidget::m_NewConnectionObserverTag
protected

Definition at line 162 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource(), and RemoveObserver().

unsigned long QmitkIGTLStreamingManagementWidget::m_StartStreamingTimerObserverTag
protected

Definition at line 164 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource(), and RemoveObserver().

unsigned long QmitkIGTLStreamingManagementWidget::m_StateModifiedObserverTag
protected

Definition at line 163 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource(), and RemoveObserver().

unsigned long QmitkIGTLStreamingManagementWidget::m_StopStreamingTimerObserverTag
protected

Definition at line 165 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource(), and RemoveObserver().

QTimer QmitkIGTLStreamingManagementWidget::m_StreamingTimer
protected

the streaming timer that periodically calls the update method of the provider

Definition at line 157 of file QmitkIGTLStreamingManagementWidget.h.

Referenced by LoadSource(), OnStartStreamingTimer(), and OnStopStreamingTimer().

const std::string QmitkIGTLStreamingManagementWidget::VIEW_ID
static

Definition at line 48 of file QmitkIGTLStreamingManagementWidget.h.


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