Medical Imaging Interaction Toolkit
2024.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) |
virtual void | SetLayoutColumns (int) |
virtual void | SetShowNames (bool) |
virtual void | SetGenerateAccelerators (bool) |
virtual void | SetToolGUIArea (QWidget *parentWidget) |
Signals | |
void | ToolSelected (int id) |
Public Member Functions | |
QmitkToolSelectionBox (QWidget *parent=nullptr, mitk::DataStorage *storage=nullptr) | |
~QmitkToolSelectionBox () override | |
mitk::ToolManager * | GetToolManager () |
void | SetToolManager (mitk::ToolManager &) |
void | SetDisplayedToolGroups (const std::string &toolGroups=nullptr) |
void | OnToolManagerToolModified () |
void | OnToolManagerReferenceDataModified () |
void | OnToolManagerWorkingDataModified () |
void | OnToolGUIProcessEventsMessage () |
void | OnToolErrorMessage (std::string s) |
void | OnGeneralToolMessage (std::string s) |
void | RecreateButtons () |
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 |
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.
Last contributor:
Definition at line 50 of file QmitkToolSelectionBox.h.
QmitkToolSelectionBox::QmitkToolSelectionBox | ( | QWidget * | parent = nullptr , |
mitk::DataStorage * | storage = nullptr |
||
) |
|
override |
mitk::ToolManager* QmitkToolSelectionBox::GetToolManager | ( | ) |
void QmitkToolSelectionBox::OnGeneralToolMessage | ( | std::string | s | ) |
void QmitkToolSelectionBox::OnToolErrorMessage | ( | std::string | s | ) |
void QmitkToolSelectionBox::OnToolGUIProcessEventsMessage | ( | ) |
void QmitkToolSelectionBox::OnToolManagerReferenceDataModified | ( | ) |
void QmitkToolSelectionBox::OnToolManagerToolModified | ( | ) |
void QmitkToolSelectionBox::OnToolManagerWorkingDataModified | ( | ) |
void QmitkToolSelectionBox::RecreateButtons | ( | ) |
void QmitkToolSelectionBox::SetDisplayedToolGroups | ( | const std::string & | toolGroups = nullptr | ) |
You may specify a list of tool "groups" that 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 |
|
virtualslot |
|
virtualslot |
|
virtualslot |
|
protected |
|
virtualslot |
|
virtualslot |
void QmitkToolSelectionBox::SetToolManager | ( | mitk::ToolManager & | ) |
|
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 118 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 131 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 115 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 124 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 127 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 122 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 113 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 123 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 130 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 126 of file QmitkToolSelectionBox.h.
|
protected |
stores relationship between button IDs of the Qt widget and tool IDs of ToolManager
Definition at line 120 of file QmitkToolSelectionBox.h.
|
protected |
Definition at line 111 of file QmitkToolSelectionBox.h.