Medical Imaging Interaction Toolkit  2018.4.99-389bf124
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...
 
 ~QmitkToolSelectionWidget () override
 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 29 of file QmitkToolSelectionWidget.h.

Constructor & Destructor Documentation

◆ QmitkToolSelectionWidget()

QmitkToolSelectionWidget::QmitkToolSelectionWidget ( QWidget *  parent)

default constructor

Definition at line 17 of file QmitkToolSelectionWidget.cpp.

References CreateQtPartControl().

◆ ~QmitkToolSelectionWidget()

QmitkToolSelectionWidget::~QmitkToolSelectionWidget ( )
override

default destructor

Definition at line 23 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

Member Function Documentation

◆ AddToolName()

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 62 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ ChangeToolName()

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

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

Definition at line 67 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ CheckBoxToggled

void QmitkToolSelectionWidget::CheckBoxToggled ( bool  checked)
protectedslot

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

Definition at line 108 of file QmitkToolSelectionWidget.cpp.

References m_Controls, and SignalUseTool().

Referenced by CreateConnections().

◆ ClearToolNames()

void QmitkToolSelectionWidget::ClearToolNames ( )

This method clears all tool names from the combobox.

Definition at line 86 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ CreateConnections()

void QmitkToolSelectionWidget::CreateConnections ( )
protected

Creates this widget's signal slot connections.

Definition at line 41 of file QmitkToolSelectionWidget.cpp.

References CheckBoxToggled(), and m_Controls.

Referenced by CreateQtPartControl().

◆ CreateQtPartControl()

void QmitkToolSelectionWidget::CreateQtPartControl ( QWidget *  parent)
protected

Definition at line 29 of file QmitkToolSelectionWidget.cpp.

References CreateConnections(), and m_Controls.

Referenced by QmitkToolSelectionWidget().

◆ DisableWidget

void QmitkToolSelectionWidget::DisableWidget ( )
slot

Disables this widget.

Definition at line 102 of file QmitkToolSelectionWidget.cpp.

◆ EnableWidget

void QmitkToolSelectionWidget::EnableWidget ( )
slot

Enables this widget.

Definition at line 97 of file QmitkToolSelectionWidget.cpp.

◆ GetCurrentSelectedIndex()

int QmitkToolSelectionWidget::GetCurrentSelectedIndex ( )

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

Definition at line 52 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ IsSelectedToolActivated()

bool QmitkToolSelectionWidget::IsSelectedToolActivated ( )

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

Definition at line 118 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ RemoveToolName() [1/2]

void QmitkToolSelectionWidget::RemoveToolName ( const QString &  toolName)

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

Definition at line 72 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ RemoveToolName() [2/2]

void QmitkToolSelectionWidget::RemoveToolName ( int  index)

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

Definition at line 81 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ SetCheckboxtText()

void QmitkToolSelectionWidget::SetCheckboxtText ( const QString &  text)

This method sets the text of the use tool checkbox.

Definition at line 92 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ SetToolNames()

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 57 of file QmitkToolSelectionWidget.cpp.

References m_Controls.

◆ SignalSelectedToolChanged

void QmitkToolSelectionWidget::SignalSelectedToolChanged ( int  index)
signal

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

◆ SignalUseTool

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

◆ m_Controls


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