Medical Imaging Interaction Toolkit  2023.12.00
Medical Imaging Interaction Toolkit
QmitkIGTLDeviceCommandWidget Class Reference

An object of this class offers an UI to send OpenIGTLink commands. More...

#include <QmitkIGTLDeviceCommandWidget.h>

Inheritance diagram for QmitkIGTLDeviceCommandWidget:
Collaboration diagram for QmitkIGTLDeviceCommandWidget:

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=nullptr, Qt::WindowFlags f=nullptr)
 
 ~QmitkIGTLDeviceCommandWidget () override
 

Static Public Attributes

static const std::string VIEW_ID
 

Protected Slots

void OnCommandChanged (const QString &curCommand)
 
void OnSendCommand ()
 
void OnLostConnection ()
 ‍** 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
 

Detailed Description

An object of this class offers an UI to send OpenIGTLink commands.

Documentation:

Definition at line 38 of file QmitkIGTLDeviceCommandWidget.h.

Constructor & Destructor Documentation

◆ QmitkIGTLDeviceCommandWidget()

QmitkIGTLDeviceCommandWidget::QmitkIGTLDeviceCommandWidget ( QWidget *  parent = nullptr,
Qt::WindowFlags  f = nullptr 
)

◆ ~QmitkIGTLDeviceCommandWidget()

QmitkIGTLDeviceCommandWidget::~QmitkIGTLDeviceCommandWidget ( )
override

Member Function Documentation

◆ AdaptGUIToState

void QmitkIGTLDeviceCommandWidget::AdaptGUIToState ( )
protectedslot

Adapts the GUI to the state of the device.

◆ AdaptGUIToStateSignal

void QmitkIGTLDeviceCommandWidget::AdaptGUIToStateSignal ( )
signal

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

◆ CreateConnections()

virtual void QmitkIGTLDeviceCommandWidget::CreateConnections ( )
protectedvirtual

Creation of the connections.

◆ CreateQtPartControl()

virtual void QmitkIGTLDeviceCommandWidget::CreateQtPartControl ( QWidget *  parent)
protectedvirtual

◆ DisableSourceControls()

void QmitkIGTLDeviceCommandWidget::DisableSourceControls ( )
protected

◆ EnableSourceControls()

void QmitkIGTLDeviceCommandWidget::EnableSourceControls ( )
protected

◆ FillCommandsComboBox()

void QmitkIGTLDeviceCommandWidget::FillCommandsComboBox ( )
protected

Fills the commands combo box with available commands.

◆ 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.

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

◆ OnCommandChanged

void QmitkIGTLDeviceCommandWidget::OnCommandChanged ( const QString &  curCommand)
protectedslot

◆ OnDeviceStateChanged()

void QmitkIGTLDeviceCommandWidget::OnDeviceStateChanged ( )
protected

◆ OnLostConnection

void QmitkIGTLDeviceCommandWidget::OnLostConnection ( )
protectedslot

‍**

‍**

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

◆ OnNewConnection

void QmitkIGTLDeviceCommandWidget::OnNewConnection ( )
protectedslot

Is called when the current device connected to another device.

◆ OnSendCommand

void QmitkIGTLDeviceCommandWidget::OnSendCommand ( )
protectedslot

Member Data Documentation

◆ m_CommandReceivedObserverTag

unsigned long QmitkIGTLDeviceCommandWidget::m_CommandReceivedObserverTag
protected

Definition at line 126 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_Controls

Ui::QmitkIGTLDeviceCommandWidgetControls* QmitkIGTLDeviceCommandWidget::m_Controls
protected

Definition at line 114 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_CurrentCommand

igtl::MessageBase::Pointer QmitkIGTLDeviceCommandWidget::m_CurrentCommand
protected

Definition at line 119 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_IGTLDevice

mitk::IGTLDevice::Pointer QmitkIGTLDeviceCommandWidget::m_IGTLDevice
protected

holds the OpenIGTLink device

Definition at line 117 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_IsClient

bool QmitkIGTLDeviceCommandWidget::m_IsClient
protected

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

Definition at line 123 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_LostConnectionObserverTag

unsigned long QmitkIGTLDeviceCommandWidget::m_LostConnectionObserverTag
protected

Definition at line 127 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_MessageReceivedObserverTag

unsigned long QmitkIGTLDeviceCommandWidget::m_MessageReceivedObserverTag
protected

Definition at line 125 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_NewConnectionObserverTag

unsigned long QmitkIGTLDeviceCommandWidget::m_NewConnectionObserverTag
protected

Definition at line 128 of file QmitkIGTLDeviceCommandWidget.h.

◆ m_StateModifiedObserverTag

unsigned long QmitkIGTLDeviceCommandWidget::m_StateModifiedObserverTag
protected

Definition at line 129 of file QmitkIGTLDeviceCommandWidget.h.

◆ VIEW_ID

const std::string QmitkIGTLDeviceCommandWidget::VIEW_ID
static

Definition at line 43 of file QmitkIGTLDeviceCommandWidget.h.


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