Medical Imaging Interaction Toolkit  2018.4.99-389bf124
Medical Imaging Interaction Toolkit
QmitkNodeSelectionDialog Class Reference

Widget that allows to show and edit the content of an mitk::IsoDoseLevel instance. More...

#include <QmitkNodeSelectionDialog.h>

Inheritance diagram for QmitkNodeSelectionDialog:
Collaboration diagram for QmitkNodeSelectionDialog:

Public Types

using NodeList = QList< mitk::DataNode::Pointer >
 
using SelectionCheckFunctionType = std::function< std::string(const NodeList &)>
 Helper function that is used to check the given selection for consistency. Returning an empty string assumes that everything is alright and the selection is valid. If the string is not empty, the content of the string will be used as error message. More...
 
using SelectionMode = QAbstractItemView::SelectionMode
 

Public Slots

void SetSelectOnlyVisibleNodes (bool selectOnlyVisibleNodes)
 
void SetCurrentSelection (NodeList selectedNodes)
 

Signals

void CurrentSelectionChanged (NodeList nodes)
 

Public Member Functions

 QmitkNodeSelectionDialog (QWidget *parent=nullptr, QString caption="", QString hint="")
 
void SetDataStorage (mitk::DataStorage *dataStorage)
 Sets the data storage that will be used /monitored by widget. More...
 
virtual void SetNodePredicate (const mitk::NodePredicateBase *nodePredicate)
 Sets the node predicate and updates the widget, according to the node predicate. More...
 
const mitk::NodePredicateBaseGetNodePredicate () const
 
NodeList GetSelectedNodes () const
 
void SetSelectionCheckFunction (const SelectionCheckFunctionType &checkFunction)
 A selection check function can be set. If set the dialog uses this function to check the made/set selection. If the selection is valid, everything is fine. If the selection is indicated as invalid, the dialog will display the selection check function error message. More...
 
bool GetSelectOnlyVisibleNodes () const
 
void SetSelectionMode (SelectionMode mode)
 
SelectionMode GetSelectionMode () const
 

Protected Types

using PanelVectorType = std::vector< QmitkAbstractDataStorageInspector * >
 

Protected Slots

void OnSelectionChanged (NodeList selectedNodes)
 
void OnFavoriteNodesButtonClicked ()
 
void OnOK ()
 
void OnCancel ()
 

Protected Member Functions

void SetErrorText (const std::string &checkResponse)
 
void AddPanel (const mitk::IDataStorageInspectorProvider *provider, const mitk::IDataStorageInspectorProvider::InspectorIDType &preferredID, bool &preferredFound, int &preferredIndex)
 

Protected Attributes

mitk::WeakPointer< mitk::DataStoragem_DataStorage
 
mitk::NodePredicateBase::ConstPointer m_NodePredicate
 
bool m_SelectOnlyVisibleNodes
 
NodeList m_SelectedNodes
 
SelectionCheckFunctionType m_CheckFunction
 
SelectionMode m_SelectionMode
 
PanelVectorType m_Panels
 
QPushButton * m_FavoriteNodesButton
 
Ui_QmitkNodeSelectionDialog m_Controls
 

Detailed Description

Widget that allows to show and edit the content of an mitk::IsoDoseLevel instance.

Definition at line 34 of file QmitkNodeSelectionDialog.h.

Member Typedef Documentation

◆ NodeList

◆ PanelVectorType

◆ SelectionCheckFunctionType

using QmitkNodeSelectionDialog::SelectionCheckFunctionType = std::function<std::string(const NodeList &)>

Helper function that is used to check the given selection for consistency. Returning an empty string assumes that everything is alright and the selection is valid. If the string is not empty, the content of the string will be used as error message.

Definition at line 65 of file QmitkNodeSelectionDialog.h.

◆ SelectionMode

using QmitkNodeSelectionDialog::SelectionMode = QAbstractItemView::SelectionMode

Definition at line 75 of file QmitkNodeSelectionDialog.h.

Constructor & Destructor Documentation

◆ QmitkNodeSelectionDialog()

Member Function Documentation

◆ AddPanel()

◆ CurrentSelectionChanged

void QmitkNodeSelectionDialog::CurrentSelectionChanged ( NodeList  nodes)
signal

Referenced by OnSelectionChanged().

◆ GetNodePredicate()

const mitk::NodePredicateBase * QmitkNodeSelectionDialog::GetNodePredicate ( ) const

Definition at line 134 of file QmitkNodeSelectionDialog.cpp.

References m_NodePredicate.

◆ GetSelectedNodes()

QmitkNodeSelectionDialog::NodeList QmitkNodeSelectionDialog::GetSelectedNodes ( ) const

◆ GetSelectionMode()

QmitkNodeSelectionDialog::SelectionMode QmitkNodeSelectionDialog::GetSelectionMode ( ) const

Definition at line 182 of file QmitkNodeSelectionDialog.cpp.

References m_SelectionMode.

◆ GetSelectOnlyVisibleNodes()

bool QmitkNodeSelectionDialog::GetSelectOnlyVisibleNodes ( ) const

Definition at line 168 of file QmitkNodeSelectionDialog.cpp.

References m_SelectOnlyVisibleNodes.

◆ OnCancel

void QmitkNodeSelectionDialog::OnCancel ( )
protectedslot

Definition at line 239 of file QmitkNodeSelectionDialog.cpp.

Referenced by QmitkNodeSelectionDialog().

◆ OnFavoriteNodesButtonClicked

void QmitkNodeSelectionDialog::OnFavoriteNodesButtonClicked ( )
protectedslot

Definition at line 221 of file QmitkNodeSelectionDialog.cpp.

References m_SelectedNodes.

Referenced by QmitkNodeSelectionDialog().

◆ OnOK

void QmitkNodeSelectionDialog::OnOK ( )
protectedslot

◆ OnSelectionChanged

void QmitkNodeSelectionDialog::OnSelectionChanged ( NodeList  selectedNodes)
protectedslot

Definition at line 215 of file QmitkNodeSelectionDialog.cpp.

References CurrentSelectionChanged(), and SetCurrentSelection().

Referenced by AddPanel().

◆ SetCurrentSelection

void QmitkNodeSelectionDialog::SetCurrentSelection ( NodeList  selectedNodes)
slot

◆ SetDataStorage()

void QmitkNodeSelectionDialog::SetDataStorage ( mitk::DataStorage dataStorage)

Sets the data storage that will be used /monitored by widget.

Parameters
dataStorageA pointer to the data storage to set.

Definition at line 105 of file QmitkNodeSelectionDialog.cpp.

References mitk::WeakPointer< T >::IsExpired(), m_DataStorage, and m_Panels.

Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().

◆ SetErrorText()

void QmitkNodeSelectionDialog::SetErrorText ( const std::string &  checkResponse)
protected

◆ SetNodePredicate()

void QmitkNodeSelectionDialog::SetNodePredicate ( const mitk::NodePredicateBase nodePredicate)
virtual

Sets the node predicate and updates the widget, according to the node predicate.

Parameters
nodePredicateA pointer to node predicate.

Definition at line 121 of file QmitkNodeSelectionDialog.cpp.

References m_NodePredicate, and m_Panels.

Referenced by QmitkSingleNodeSelectionWidget::EditSelection(), and QmitkMultiNodeSelectionWidget::OnEditSelection().

◆ SetSelectionCheckFunction()

void QmitkNodeSelectionDialog::SetSelectionCheckFunction ( const SelectionCheckFunctionType checkFunction)

A selection check function can be set. If set the dialog uses this function to check the made/set selection. If the selection is valid, everything is fine. If the selection is indicated as invalid, the dialog will display the selection check function error message.

Definition at line 144 of file QmitkNodeSelectionDialog.cpp.

References m_CheckFunction, m_Controls, m_SelectedNodes, and SetErrorText().

◆ SetSelectionMode()

void QmitkNodeSelectionDialog::SetSelectionMode ( SelectionMode  mode)

◆ SetSelectOnlyVisibleNodes

void QmitkNodeSelectionDialog::SetSelectOnlyVisibleNodes ( bool  selectOnlyVisibleNodes)
slot

Member Data Documentation

◆ m_CheckFunction

SelectionCheckFunctionType QmitkNodeSelectionDialog::m_CheckFunction
protected

◆ m_Controls

Ui_QmitkNodeSelectionDialog QmitkNodeSelectionDialog::m_Controls
protected

◆ m_DataStorage

mitk::WeakPointer<mitk::DataStorage> QmitkNodeSelectionDialog::m_DataStorage
protected

Definition at line 127 of file QmitkNodeSelectionDialog.h.

Referenced by SetDataStorage().

◆ m_FavoriteNodesButton

QPushButton* QmitkNodeSelectionDialog::m_FavoriteNodesButton
protected

Definition at line 139 of file QmitkNodeSelectionDialog.h.

◆ m_NodePredicate

mitk::NodePredicateBase::ConstPointer QmitkNodeSelectionDialog::m_NodePredicate
protected

Definition at line 128 of file QmitkNodeSelectionDialog.h.

Referenced by GetNodePredicate(), and SetNodePredicate().

◆ m_Panels

PanelVectorType QmitkNodeSelectionDialog::m_Panels
protected

◆ m_SelectedNodes

NodeList QmitkNodeSelectionDialog::m_SelectedNodes
protected

◆ m_SelectionMode

SelectionMode QmitkNodeSelectionDialog::m_SelectionMode
protected

Definition at line 134 of file QmitkNodeSelectionDialog.h.

Referenced by AddPanel(), GetSelectionMode(), and SetSelectionMode().

◆ m_SelectOnlyVisibleNodes

bool QmitkNodeSelectionDialog::m_SelectOnlyVisibleNodes
protected

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