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

QmitkToolSelectionWidget. More...

#include <QmitkToolSelectionWidget.h>

Inheritance diagram for QmitkToolSelectionWidget:

Public Slots

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

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.
 
void SignalSelectedToolChanged (int index)
 This signal is emitted when a different tool is selected in the combo box.
 

Public Member Functions

 QmitkToolSelectionWidget (QWidget *parent)
 default constructor
 
 ~QmitkToolSelectionWidget () override
 default destructor
 
int GetCurrentSelectedIndex ()
 This method returns the current selected index from the tool combobox.
 
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.
 
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.
 
void ChangeToolName (int index, const QString &toolName)
 This method changes the tool name in the combobox at the given position.
 
void RemoveToolName (const QString &toolName)
 This method removes a single tool name from the combobox by name.
 
void RemoveToolName (int index)
 This method removes a single tool name from the combobox by index.
 
void ClearToolNames ()
 This method clears all tool names from the combobox.
 
void SetCheckboxtText (const QString &text)
 This method sets the text of the use tool checkbox.
 
bool IsSelectedToolActivated ()
 This method returns whether the use tool checkbox is checked or not.
 

Protected Slots

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

Protected Member Functions

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

Protected Attributes

Ui::QmitkToolSelectionWidgetControls * m_Controls
 gui widgets
 

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.

◆ ~QmitkToolSelectionWidget()

QmitkToolSelectionWidget::~QmitkToolSelectionWidget ( )
override

default destructor

Definition at line 23 of file QmitkToolSelectionWidget.cpp.

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.

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

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

◆ ClearToolNames()

void QmitkToolSelectionWidget::ClearToolNames ( )

This method clears all tool names from the combobox.

Definition at line 86 of file QmitkToolSelectionWidget.cpp.

◆ CreateConnections()

void QmitkToolSelectionWidget::CreateConnections ( )
protected

Creates this widget's signal slot connections.

Definition at line 41 of file QmitkToolSelectionWidget.cpp.

◆ CreateQtPartControl()

void QmitkToolSelectionWidget::CreateQtPartControl ( QWidget * parent)
protected

Definition at line 29 of file QmitkToolSelectionWidget.cpp.

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

◆ IsSelectedToolActivated()

bool QmitkToolSelectionWidget::IsSelectedToolActivated ( )

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

Definition at line 118 of file QmitkToolSelectionWidget.cpp.

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

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

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

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

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

Member Data Documentation

◆ m_Controls

Ui::QmitkToolSelectionWidgetControls* QmitkToolSelectionWidget::m_Controls
protected

gui widgets

Definition at line 125 of file QmitkToolSelectionWidget.h.


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