|
Medical Imaging Interaction Toolkit
2026.06.00
Medical Imaging Interaction Toolkit
|
Display the tool selection state of a mitk::ToolManager. More...
#include <QmitkToolSelectionBox.h>


Public Slots | |
| virtual void | setEnabled (bool) |
| Enables or disables the widget and all its tool buttons. More... | |
| virtual void | SetLayoutColumns (int) |
| Sets the number of columns for the tool button grid layout. More... | |
| virtual void | SetShowNames (bool) |
| Sets whether tool names are displayed alongside their icons. More... | |
| virtual void | SetGenerateAccelerators (bool) |
| Sets whether keyboard accelerators (shortcuts) are generated for tools. More... | |
| virtual void | SetToolGUIArea (QWidget *parentWidget) |
| Sets the parent widget where tool-specific GUIs will be displayed. More... | |
| void | SetMultiLabelInspector (QmitkMultiLabelInspector *inspector) |
| Sets the label inspector forwarded to each created tool GUI. More... | |
Signals | |
| void | ToolSelected (int id) |
Public Member Functions | |
| QmitkToolSelectionBox (QWidget *parent=nullptr, mitk::DataStorage *storage=nullptr) | |
| Constructs the tool selection box widget. More... | |
| ~QmitkToolSelectionBox () override | |
| mitk::ToolManager * | GetToolManager () |
| Returns the associated ToolManager. More... | |
| void | SetToolManager (mitk::ToolManager &) |
| Sets the associated ToolManager. A valid manager is required (no nullptr). More... | |
| void | SetDisplayedToolGroups (const std::string &toolGroups={}) |
| Specifies which tool groups should be displayed in this widget. More... | |
| void | OnToolManagerToolModified () |
| Called when a tool is modified. Public for itk::Command callbacks. More... | |
| void | OnToolManagerReferenceDataModified () |
| Called when reference data is modified. Public for itk::Command callbacks. More... | |
| void | OnToolManagerWorkingDataModified () |
| Called when working data is modified. Public for itk::Command callbacks. More... | |
| void | OnToolGUIProcessEventsMessage () |
| Called to process pending GUI events from a tool. Public for itk::Command callbacks. More... | |
| void | OnToolErrorMessage (std::string s) |
| Called when a tool reports an error message. Public for itk::Command callbacks. More... | |
| void | OnGeneralToolMessage (std::string s) |
| Called when a tool reports a general status message. Public for itk::Command callbacks. More... | |
| void | RecreateButtons () |
| Destroys and recreates all tool buttons based on the current ToolManager state. More... | |
Protected Slots | |
| void | toolButtonClicked (int id) |
| void | UpdateButtonsEnabledState () |
Protected Member Functions | |
| void | SetOrUnsetButtonForActiveTool () |
Protected Attributes | |
| mitk::ToolManager::Pointer | m_ToolManager |
| bool | m_SelfCall |
| std::string | m_DisplayedGroups |
| std::map< int, int > | m_ButtonIDForToolID |
| stores relationship between button IDs of the Qt widget and tool IDs of ToolManager More... | |
| std::map< int, int > | m_ToolIDForButtonID |
| stores relationship between button IDs of the Qt widget and tool IDs of ToolManager More... | |
| int | m_LayoutColumns |
| bool | m_ShowNames |
| bool | m_GenerateAccelerators |
| QWidget * | m_ToolGUIWidget |
| QmitkToolGUI * | m_LastToolGUI |
| QmitkMultiLabelInspector * | m_MultiLabelInspector |
| QButtonGroup * | m_ToolButtonGroup |
| QGridLayout * | m_ButtonLayout |
Display the tool selection state of a mitk::ToolManager.
This widget graphically displays the active tool of a mitk::ToolManager as a set of toggle buttons. Each button show the identification of a Tool (icon and name). When a button's toggle state is "down", the tool is activated. When a different button is clicked, the active tool is switched. When you click an already active button, the associated tool is deactivated with no replacement, which means that no tool is active then.
When this widget is enabled/disabled it (normally) also enables/disables the tools. There could be cases where two QmitkToolSelectionBox widgets are associated to the same ToolManager, but if this happens, please look deeply into the code.
Definition at line 49 of file QmitkToolSelectionBox.h.
| QmitkToolSelectionBox::QmitkToolSelectionBox | ( | QWidget * | parent = nullptr, |
| mitk::DataStorage * | storage = nullptr |
||
| ) |
Constructs the tool selection box widget.
|
override |
| mitk::ToolManager* QmitkToolSelectionBox::GetToolManager | ( | ) |
Returns the associated ToolManager.
| void QmitkToolSelectionBox::OnGeneralToolMessage | ( | std::string | s | ) |
Called when a tool reports a general status message. Public for itk::Command callbacks.
| void QmitkToolSelectionBox::OnToolErrorMessage | ( | std::string | s | ) |
Called when a tool reports an error message. Public for itk::Command callbacks.
| void QmitkToolSelectionBox::OnToolGUIProcessEventsMessage | ( | ) |
Called to process pending GUI events from a tool. Public for itk::Command callbacks.
| void QmitkToolSelectionBox::OnToolManagerReferenceDataModified | ( | ) |
Called when reference data is modified. Public for itk::Command callbacks.
| void QmitkToolSelectionBox::OnToolManagerToolModified | ( | ) |
Called when a tool is modified. Public for itk::Command callbacks.
| void QmitkToolSelectionBox::OnToolManagerWorkingDataModified | ( | ) |
Called when working data is modified. Public for itk::Command callbacks.
| void QmitkToolSelectionBox::RecreateButtons | ( | ) |
Destroys and recreates all tool buttons based on the current ToolManager state.
| void QmitkToolSelectionBox::SetDisplayedToolGroups | ( | const std::string & | toolGroups = {} | ) |
Specifies which tool groups should be displayed in this widget.
Every Tool can report its group as a string. This method will try to find the tool's group inside the supplied string toolGroups. If there is a match, the tool is displayed. Effectively, you can provide a human readable list like "default, lymphnodevolumetry, oldERISstuff".
| toolGroups | A comma-separated string of tool group names to display. |
|
virtualslot |
Enables or disables the widget and all its tool buttons.
|
virtualslot |
Sets whether keyboard accelerators (shortcuts) are generated for tools.
|
virtualslot |
Sets the number of columns for the tool button grid layout.
|
slot |
Sets the label inspector forwarded to each created tool GUI.
The inspector is propagated to every QmitkToolGUI right after SetTool(), giving tool GUIs a deterministic handle to the host's label-management widget. Pointer ownership stays with the caller; lifetime must outlive any tool GUI that consults it. May be null.
|
protected |
|
virtualslot |
Sets whether tool names are displayed alongside their icons.
|
virtualslot |
Sets the parent widget where tool-specific GUIs will be displayed.
| void QmitkToolSelectionBox::SetToolManager | ( | mitk::ToolManager & | ) |
Sets the associated ToolManager. A valid manager is required (no nullptr).
|
protectedslot |
|
signal |
Whenever a tool is activated. id is the index of the active tool. Counting starts at 0, -1 indicates "no tool selected" This signal is also emitted, when the whole QmitkToolSelectionBox get disabled. Then it will claim ToolSelected(-1) When it is enabled again, there will be another ToolSelected event with the tool that is currently selected
|
protectedslot |
|
protected |
stores relationship between button IDs of the Qt widget and tool IDs of ToolManager
Definition at line 140 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 154 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 137 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 146 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 149 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 144 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 150 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 135 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 145 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 153 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 148 of file QmitkToolSelectionBox.h.
|
protected |
stores relationship between button IDs of the Qt widget and tool IDs of ToolManager
Definition at line 142 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 133 of file QmitkToolSelectionBox.h.