Medical Imaging Interaction Toolkit  2016.11.0
Medical Imaging Interaction Toolkit
QmitkToolSelectionWidget Class Reference

QmitkToolSelectionWidget. More...

#include <QmitkToolSelectionWidget.h>

Inheritance diagram for QmitkToolSelectionWidget:
Collaboration diagram for QmitkToolSelectionWidget:

Public Slots

void EnableWidget ()
 Enables this widget. More...
 
void DisableWidget ()
 Disables this widget. More...
 

Signals

void SignalUseTool (int index, bool use)
 This signal is emitted when the checkbox is toggled. It provides the current selected tool id and whether it has been selected or deselected. More...
 
void SignalSelectedToolChanged (int index)
 This signal is emitted when a different tool is selected in the combo box. More...
 

Public Member Functions

 QmitkToolSelectionWidget (QWidget *parent)
 default constructor More...
 
virtual ~QmitkToolSelectionWidget ()
 default destructor More...
 
int GetCurrentSelectedIndex ()
 This method returns the current selected index from the tool combobox. More...
 
void SetToolNames (const QStringList &toolNames)
 This method sets the list with names of the available tools to the combobox. This method should be used after the initilization of the tracking source. For correct use make sure that the tool names are in the same order as the tools from the tracking source. More...
 
void AddToolName (const QString &toolName)
 This method adds a single tool name at the end of the tool combobox. This method should be used after a tool has been added manually to the tracking source. More...
 
void ChangeToolName (int index, const QString &toolName)
 This method changes the tool name in the combobox at the given position. More...
 
void RemoveToolName (const QString &toolName)
 This method removes a single tool name from the combobox by name. More...
 
void RemoveToolName (int index)
 This method removes a single tool name from the combobox by index. More...
 
void ClearToolNames ()
 This method clears all tool names from the combobox. More...
 
void SetCheckboxtText (const QString &text)
 This method sets the text of the use tool checkbox. More...
 
bool IsSelectedToolActivated ()
 This method returns whether the use tool checkbox is checked or not. More...
 

Protected Slots

void CheckBoxToggled (bool checked)
 Slot which emits the SingalUseTool() after providing it with the tool id. More...
 

Protected Member Functions

void CreateConnections ()
 Creates this widget's signal slot connections. More...
 
void CreateQtPartControl (QWidget *parent)
 

Protected Attributes

Ui::QmitkToolSelectionWidgetControls * m_Controls
 gui widgets More...
 

Detailed Description

QmitkToolSelectionWidget.

Widget for tool selection in an IGT Plugin. Provides a combobx which can be filled with the tool names ( SetToolNames() or AddToolName() ) of a tracking source and a checkbox whose text can be set with AddCheckBoxText(). Toggeling of the checkbox should be used to activate or inactivate a specific action for the selected tool in the IGT Plugin.

Definition at line 33 of file QmitkToolSelectionWidget.h.

Constructor & Destructor Documentation

QmitkToolSelectionWidget::QmitkToolSelectionWidget ( QWidget *  parent)

default constructor

Definition at line 21 of file QmitkToolSelectionWidget.cpp.

References CreateQtPartControl().

QmitkToolSelectionWidget::~QmitkToolSelectionWidget ( )
virtual

default destructor

Definition at line 27 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

Member Function Documentation

void QmitkToolSelectionWidget::AddToolName ( const QString &  toolName)

This method adds a single tool name at the end of the tool combobox. This method should be used after a tool has been added manually to the tracking source.

Definition at line 66 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::ChangeToolName ( int  index,
const QString &  toolName 
)

This method changes the tool name in the combobox at the given position.

Definition at line 71 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::CheckBoxToggled ( bool  checked)
protectedslot

Slot which emits the SingalUseTool() after providing it with the tool id.

Definition at line 112 of file QmitkToolSelectionWidget.cpp.

References m_Controls, and SignalUseTool().

Referenced by CreateConnections().

void QmitkToolSelectionWidget::ClearToolNames ( )

This method clears all tool names from the combobox.

Definition at line 90 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::CreateConnections ( )
protected

Creates this widget's signal slot connections.

Definition at line 45 of file QmitkToolSelectionWidget.cpp.

References CheckBoxToggled(), and m_Controls.

Referenced by CreateQtPartControl().

void QmitkToolSelectionWidget::CreateQtPartControl ( QWidget *  parent)
protected

Definition at line 33 of file QmitkToolSelectionWidget.cpp.

References CreateConnections(), and m_Controls.

Referenced by QmitkToolSelectionWidget().

void QmitkToolSelectionWidget::DisableWidget ( )
slot

Disables this widget.

Definition at line 106 of file QmitkToolSelectionWidget.cpp.

void QmitkToolSelectionWidget::EnableWidget ( )
slot

Enables this widget.

Definition at line 101 of file QmitkToolSelectionWidget.cpp.

int QmitkToolSelectionWidget::GetCurrentSelectedIndex ( )

This method returns the current selected index from the tool combobox.

Definition at line 56 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

bool QmitkToolSelectionWidget::IsSelectedToolActivated ( )

This method returns whether the use tool checkbox is checked or not.

Definition at line 122 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::RemoveToolName ( const QString &  toolName)

This method removes a single tool name from the combobox by name.

Definition at line 76 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::RemoveToolName ( int  index)

This method removes a single tool name from the combobox by index.

Definition at line 85 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::SetCheckboxtText ( const QString &  text)

This method sets the text of the use tool checkbox.

Definition at line 96 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::SetToolNames ( const QStringList &  toolNames)

This method sets the list with names of the available tools to the combobox. This method should be used after the initilization of the tracking source. For correct use make sure that the tool names are in the same order as the tools from the tracking source.

Definition at line 61 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

void QmitkToolSelectionWidget::SignalSelectedToolChanged ( int  index)
signal

This signal is emitted when a different tool is selected in the combo box.

void QmitkToolSelectionWidget::SignalUseTool ( int  index,
bool  use 
)
signal

This signal is emitted when the checkbox is toggled. It provides the current selected tool id and whether it has been selected or deselected.

Referenced by CheckBoxToggled().

Member Data Documentation


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