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

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

#include <QmitkIGTLDeviceCommandWidget.h>

Inheritance 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
 

Public Member Functions

void Initialize (mitk::IGTLDevice::Pointer device)
 Initializes the widget with the given device.
 
 QmitkIGTLDeviceCommandWidget (QWidget *parent=nullptr, Qt::WindowFlags f={})
 
 ~QmitkIGTLDeviceCommandWidget () override
 

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.
 
void OnNewConnection ()
 Is called when the current device connected to another device.
 
void AdaptGUIToState ()
 Adapts the GUI to the state of the device.
 

Protected Member Functions

void OnDeviceStateChanged ()
 Calls AdaptGUIToState()
 
void FillCommandsComboBox ()
 Fills the commands combo box with available commands.
 
virtual void CreateConnections ()
 Creation of the connections.
 
virtual void CreateQtPartControl (QWidget *parent)
 
void DisableSourceControls ()
 
void EnableSourceControls ()
 

Protected Attributes

Ui::QmitkIGTLDeviceCommandWidgetControls * m_Controls
 
mitk::IGTLDevice::Pointer m_IGTLDevice
 holds the OpenIGTLink device
 
igtl::MessageBase::Pointer m_CurrentCommand
 
bool m_IsClient
 flag to indicate if the IGTL device is a client or a server
 
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 = {} )

Definition at line 39 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ ~QmitkIGTLDeviceCommandWidget()

QmitkIGTLDeviceCommandWidget::~QmitkIGTLDeviceCommandWidget ( )
override

Definition at line 49 of file QmitkIGTLDeviceCommandWidget.cpp.

Member Function Documentation

◆ AdaptGUIToState

void QmitkIGTLDeviceCommandWidget::AdaptGUIToState ( )
protectedslot

Adapts the GUI to the state of the device.

Definition at line 95 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ 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()

void QmitkIGTLDeviceCommandWidget::CreateConnections ( )
protectedvirtual

Creation of the connections.

Definition at line 72 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ CreateQtPartControl()

void QmitkIGTLDeviceCommandWidget::CreateQtPartControl ( QWidget * parent)
protectedvirtual

Definition at line 58 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ DisableSourceControls()

void QmitkIGTLDeviceCommandWidget::DisableSourceControls ( )
protected

Definition at line 211 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ EnableSourceControls()

void QmitkIGTLDeviceCommandWidget::EnableSourceControls ( )
protected

◆ FillCommandsComboBox()

void QmitkIGTLDeviceCommandWidget::FillCommandsComboBox ( )
protected

Fills the commands combo box with available commands.

Definition at line 272 of file QmitkIGTLDeviceCommandWidget.cpp.

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

Definition at line 139 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ OnCommandChanged

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

Definition at line 243 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ OnDeviceStateChanged()

void QmitkIGTLDeviceCommandWidget::OnDeviceStateChanged ( )
protected

Calls AdaptGUIToState()

Definition at line 89 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ OnLostConnection

void QmitkIGTLDeviceCommandWidget::OnLostConnection ( )
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 257 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ OnNewConnection

void QmitkIGTLDeviceCommandWidget::OnNewConnection ( )
protectedslot

Is called when the current device connected to another device.

Definition at line 266 of file QmitkIGTLDeviceCommandWidget.cpp.

◆ OnSendCommand

void QmitkIGTLDeviceCommandWidget::OnSendCommand ( )
protectedslot

Definition at line 221 of file QmitkIGTLDeviceCommandWidget.cpp.

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
Initial value:
=
"org.mitk.views.igtldevicesourcemanagementwidget"

Definition at line 43 of file QmitkIGTLDeviceCommandWidget.h.


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