MITK-IGT
IGT Extension of MITK
Loading...
Searching...
No Matches
QmitkIGTLDeviceSetupConnectionWidget Class Reference

An object of this class offers an UI to setup the connection of an OpenIGTLink device. More...

#include <QmitkIGTLDeviceSetupConnectionWidget.h>

Inheritance diagram for QmitkIGTLDeviceSetupConnectionWidget:

Signals

void AdaptGUIToStateSignal ()
 used for thread seperation, the worker thread must not call AdaptGUIToState directly. QT signals are thread safe and seperate the threads
 

Public Member Functions

void Initialize (mitk::IGTLDevice::Pointer device)
 Initializes the widget with the given device.
 
 QmitkIGTLDeviceSetupConnectionWidget (QWidget *parent=nullptr, Qt::WindowFlags f={})
 
 ~QmitkIGTLDeviceSetupConnectionWidget () override
 
void OnLostConnection ()
 Is called when the current device received a message.
 
void OnNewConnection ()
 Is called when the current device connected to another device.
 
void OnMessageReceived ()
 Is called when the current device received a message.
 
void OnMessageSent ()
 Is called when the current device received a message.
 
void OnCommandReceived ()
 Is called when the current device received a command.
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Slots

void OnConnect ()
 
void OnPortChanged ()
 
void OnHostnameChanged ()
 
void OnUpdateFPSLabel ()
 
void OnLogMessageDetailsCheckBoxClicked ()
 Enables/Disables the detailed logging of incoming/outgoing messages.
 
void OnBufferIncomingMessages (int state)
 Enables/Disables the buffering of incoming messages.
 
void OnBufferOutgoingMessages (int state)
 Enables/Disables the buffering of outgoing messages.
 
void AdaptGUIToState ()
 Adapts the GUI to the state of the device.
 

Protected Member Functions

void OnDeviceStateChanged ()
 Calls AdaptGUIToState()
 
virtual void CreateConnections ()
 Creation of the connections.
 
virtual void CreateQtPartControl (QWidget *parent)
 
void DisableSourceControls ()
 
void RemoveObserver ()
 

Protected Attributes

Ui::QmitkIGTLDeviceSetupConnectionWidgetControls * m_Controls
 
mitk::IGTLDevice::Pointer m_IGTLDevice
 holds the OpenIGTLink device
 
bool m_IsClient
 flag to indicate if the IGTL device is a client or a server
 
unsigned long m_MessageSentObserverTag
 
unsigned long m_MessageReceivedObserverTag
 
unsigned long m_CommandReceivedObserverTag
 
unsigned long m_LostConnectionObserverTag
 
unsigned long m_NewConnectionObserverTag
 
unsigned long m_StateModifiedObserverTag
 
unsigned int m_NumReceivedFramesSinceLastUpdate
 the number of received frames (messages) since the last fps calculation update
 
unsigned int m_NumSentFramesSinceLastUpdate
 the number of sent frames (messages) since the last fps calculation update
 
QTimer m_FPSCalculationTimer
 the timer used to calculate the frames per second
 

Detailed Description

An object of this class offers an UI to setup the connection of an OpenIGTLink device.

Documentation:

Definition at line 39 of file QmitkIGTLDeviceSetupConnectionWidget.h.

Constructor & Destructor Documentation

◆ QmitkIGTLDeviceSetupConnectionWidget()

QmitkIGTLDeviceSetupConnectionWidget::QmitkIGTLDeviceSetupConnectionWidget ( QWidget * parent = nullptr,
Qt::WindowFlags f = {} )

Definition at line 41 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ ~QmitkIGTLDeviceSetupConnectionWidget()

QmitkIGTLDeviceSetupConnectionWidget::~QmitkIGTLDeviceSetupConnectionWidget ( )
override

Definition at line 52 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

Member Function Documentation

◆ AdaptGUIToState

void QmitkIGTLDeviceSetupConnectionWidget::AdaptGUIToState ( )
protectedslot

Adapts the GUI to the state of the device.

Definition at line 125 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ AdaptGUIToStateSignal

void QmitkIGTLDeviceSetupConnectionWidget::AdaptGUIToStateSignal ( )
signal

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

◆ CreateConnections()

void QmitkIGTLDeviceSetupConnectionWidget::CreateConnections ( )
protectedvirtual

Creation of the connections.

Definition at line 95 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ CreateQtPartControl()

void QmitkIGTLDeviceSetupConnectionWidget::CreateQtPartControl ( QWidget * parent)
protectedvirtual

Definition at line 70 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ DisableSourceControls()

void QmitkIGTLDeviceSetupConnectionWidget::DisableSourceControls ( )
protected

Definition at line 286 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ Initialize()

void QmitkIGTLDeviceSetupConnectionWidget::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.

Parameters
deviceThe widget will be initialized corresponding to the state of this device.

Definition at line 215 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnBufferIncomingMessages

void QmitkIGTLDeviceSetupConnectionWidget::OnBufferIncomingMessages ( int state)
protectedslot

Enables/Disables the buffering of incoming messages.

Definition at line 397 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnBufferOutgoingMessages

void QmitkIGTLDeviceSetupConnectionWidget::OnBufferOutgoingMessages ( int state)
protectedslot

Enables/Disables the buffering of outgoing messages.

This can be necessary when the data is faster produced then sent

Definition at line 406 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnCommandReceived()

void QmitkIGTLDeviceSetupConnectionWidget::OnCommandReceived ( )

Is called when the current device received a command.

Definition at line 389 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnConnect

void QmitkIGTLDeviceSetupConnectionWidget::OnConnect ( )
protectedslot

Definition at line 304 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnDeviceStateChanged()

void QmitkIGTLDeviceSetupConnectionWidget::OnDeviceStateChanged ( )
protected

◆ OnHostnameChanged

void QmitkIGTLDeviceSetupConnectionWidget::OnHostnameChanged ( )
protectedslot

Definition at line 357 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnLogMessageDetailsCheckBoxClicked

void QmitkIGTLDeviceSetupConnectionWidget::OnLogMessageDetailsCheckBoxClicked ( )
protectedslot

Enables/Disables the detailed logging of incoming/outgoing messages.

Definition at line 425 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnLostConnection()

void QmitkIGTLDeviceSetupConnectionWidget::OnLostConnection ( )

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 361 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnMessageReceived()

void QmitkIGTLDeviceSetupConnectionWidget::OnMessageReceived ( )

Is called when the current device received a message.

Definition at line 371 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnMessageSent()

void QmitkIGTLDeviceSetupConnectionWidget::OnMessageSent ( )

Is called when the current device received a message.

Definition at line 380 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnNewConnection()

void QmitkIGTLDeviceSetupConnectionWidget::OnNewConnection ( )

Is called when the current device connected to another device.

Definition at line 366 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnPortChanged

void QmitkIGTLDeviceSetupConnectionWidget::OnPortChanged ( )
protectedslot

Definition at line 353 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ OnUpdateFPSLabel

void QmitkIGTLDeviceSetupConnectionWidget::OnUpdateFPSLabel ( )
protectedslot

Definition at line 415 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

◆ RemoveObserver()

void QmitkIGTLDeviceSetupConnectionWidget::RemoveObserver ( )
protected

Definition at line 57 of file QmitkIGTLDeviceSetupConnectionWidget.cpp.

Member Data Documentation

◆ m_CommandReceivedObserverTag

unsigned long QmitkIGTLDeviceSetupConnectionWidget::m_CommandReceivedObserverTag
protected

Definition at line 154 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_Controls

Ui::QmitkIGTLDeviceSetupConnectionWidgetControls* QmitkIGTLDeviceSetupConnectionWidget::m_Controls
protected

Definition at line 144 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_FPSCalculationTimer

QTimer QmitkIGTLDeviceSetupConnectionWidget::m_FPSCalculationTimer
protected

the timer used to calculate the frames per second

Definition at line 174 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_IGTLDevice

mitk::IGTLDevice::Pointer QmitkIGTLDeviceSetupConnectionWidget::m_IGTLDevice
protected

holds the OpenIGTLink device

Definition at line 147 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_IsClient

bool QmitkIGTLDeviceSetupConnectionWidget::m_IsClient
protected

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

Definition at line 150 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_LostConnectionObserverTag

unsigned long QmitkIGTLDeviceSetupConnectionWidget::m_LostConnectionObserverTag
protected

Definition at line 155 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_MessageReceivedObserverTag

unsigned long QmitkIGTLDeviceSetupConnectionWidget::m_MessageReceivedObserverTag
protected

Definition at line 153 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_MessageSentObserverTag

unsigned long QmitkIGTLDeviceSetupConnectionWidget::m_MessageSentObserverTag
protected

Definition at line 152 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_NewConnectionObserverTag

unsigned long QmitkIGTLDeviceSetupConnectionWidget::m_NewConnectionObserverTag
protected

Definition at line 156 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_NumReceivedFramesSinceLastUpdate

unsigned int QmitkIGTLDeviceSetupConnectionWidget::m_NumReceivedFramesSinceLastUpdate
protected

the number of received frames (messages) since the last fps calculation update

This counter is incremented every time a message is received. When the timer m_FPSCalculationTimer is fired it is reset to 0 and the number is used to calculate the FPS

Definition at line 164 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_NumSentFramesSinceLastUpdate

unsigned int QmitkIGTLDeviceSetupConnectionWidget::m_NumSentFramesSinceLastUpdate
protected

the number of sent frames (messages) since the last fps calculation update

This counter is incremented every time a message is sent. When the timer m_FPSCalculationTimer is fired it is reset to 0 and the number is used to calculate the FPS

Definition at line 171 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ m_StateModifiedObserverTag

unsigned long QmitkIGTLDeviceSetupConnectionWidget::m_StateModifiedObserverTag
protected

Definition at line 157 of file QmitkIGTLDeviceSetupConnectionWidget.h.

◆ VIEW_ID

const std::string QmitkIGTLDeviceSetupConnectionWidget::VIEW_ID
static
Initial value:
=
"org.mitk.views.igtldevicesetupconnectionwidget"

Definition at line 44 of file QmitkIGTLDeviceSetupConnectionWidget.h.


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