Medical Imaging Interaction Toolkit  2023.04.99-859410e3
Medical Imaging Interaction Toolkit
QmitkSynchronizedNodeSelectionWidget Class Reference

#include <QmitkSynchronizedNodeSelectionWidget.h>

Inheritance diagram for QmitkSynchronizedNodeSelectionWidget:
Collaboration diagram for QmitkSynchronizedNodeSelectionWidget:

Public Types

using NodeList = QmitkAbstractNodeSelectionWidget::NodeList
- Public Types inherited from QmitkAbstractNodeSelectionWidget
using NodeList = QList< mitk::DataNode::Pointer >
using ConstNodeStdVector = std::vector< mitk::DataNode::ConstPointer >


void SelectionModeChanged (bool selectAll)
- Signals inherited from QmitkAbstractNodeSelectionWidget
void CurrentSelectionChanged (NodeList nodes)
 A signal that will be emitted if the selected node has changed. More...

Public Member Functions

 QmitkSynchronizedNodeSelectionWidget (QWidget *parent)
 ~QmitkSynchronizedNodeSelectionWidget ()
void SetBaseRenderer (mitk::BaseRenderer *baseRenderer)
void SetSelectAll (bool selectAll)
bool GetSelectAll () const
void SetSynchronized (bool synchronize)
bool IsSynchronized () const
- Public Member Functions inherited from QmitkAbstractNodeSelectionWidget
 QmitkAbstractNodeSelectionWidget (QWidget *parent=nullptr)
virtual ~QmitkAbstractNodeSelectionWidget () override
void SetDataStorage (mitk::DataStorage *dataStorage)
 Sets the data storage that will be used / monitored by widget. More...
void SetNodePredicate (const mitk::NodePredicateBase *nodePredicate)
const mitk::NodePredicateBaseGetNodePredicate () const
QString GetInvalidInfo () const
QString GetEmptyInfo () const
QString GetPopUpTitel () const
QString GetPopUpHint () const
bool GetSelectionIsOptional () const
bool GetSelectOnlyVisibleNodes () const
NodeList GetSelectedNodes () const
ConstNodeStdVector GetSelectedNodesStdVector () const

Protected Member Functions

void SetUpConnections ()
void Initialize ()
void UpdateInfo () override
void OnDataStorageChanged () override
void OnNodePredicateChanged () override
void ReviseSelectionChanged (const NodeList &oldInternalSelection, NodeList &newInternalSelection) override
void OnInternalSelectionChanged () override
bool AllowEmissionOfSelection (const NodeList &emissionCandidates) const override
void OnNodeAddedToStorage (const mitk::DataNode *node) override
void OnNodeModified (const itk::Object *caller, const itk::EventObject &event) override
- Protected Member Functions inherited from QmitkAbstractNodeSelectionWidget
virtual void OnNodeRemovedFromStorage (const mitk::DataNode *node)
void HandleChangeOfInternalSelection (NodeList newInternalSelection)
NodeList CompileEmitSelection () const
void EmitSelection (const NodeList &emissionCandidates)
void SetCurrentInternalSelection (NodeList selectedNodes)
const NodeListGetCurrentInternalSelection () const
const NodeListGetCurrentExternalSelection () const

Additional Inherited Members

- Public Slots inherited from QmitkAbstractNodeSelectionWidget
void SetSelectOnlyVisibleNodes (bool selectOnlyVisibleNodes)
 Change the selection modus of the item view's selection model. More...
void SetCurrentSelection (NodeList selectedNodes)
 Transform a list of data nodes (a selection) into a model selection and set this as a new selection of the selection model of the private member item view. More...
void SetInvalidInfo (QString info)
void SetEmptyInfo (QString info)
void SetPopUpTitel (QString info)
void SetPopUpHint (QString info)
void SetSelectionIsOptional (bool isOptional)
- Protected Slots inherited from QmitkAbstractNodeSelectionWidget
void RemoveNodeFromSelection (const mitk::DataNode *node)
- Protected Attributes inherited from QmitkAbstractNodeSelectionWidget
mitk::WeakPointer< mitk::DataStoragem_DataStorage
mitk::NodePredicateBase::ConstPointer m_NodePredicate
QString m_InvalidInfo
QString m_EmptyInfo
QString m_PopUpTitel
QString m_PopUpHint
bool m_IsOptional
bool m_SelectOnlyVisibleNodes

Detailed Description

Definition at line 42 of file QmitkSynchronizedNodeSelectionWidget.h.

Member Typedef Documentation

◆ NodeList

Constructor & Destructor Documentation

◆ QmitkSynchronizedNodeSelectionWidget()

QmitkSynchronizedNodeSelectionWidget::QmitkSynchronizedNodeSelectionWidget ( QWidget *  parent)

◆ ~QmitkSynchronizedNodeSelectionWidget()

QmitkSynchronizedNodeSelectionWidget::~QmitkSynchronizedNodeSelectionWidget ( )

Member Function Documentation

◆ AllowEmissionOfSelection()

bool QmitkSynchronizedNodeSelectionWidget::AllowEmissionOfSelection ( const NodeList emissionCandidates) const

This function will be called before the CurrentSelectionChanged signal is emitted. The return value indicates if the signal should be emitted (true = emission; false = no emission). The default implementation always returns true.

emissionCandidatesThe nodes that will be emitted if the function returns true.

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ GetSelectAll()

bool QmitkSynchronizedNodeSelectionWidget::GetSelectAll ( ) const

◆ Initialize()

void QmitkSynchronizedNodeSelectionWidget::Initialize ( )

◆ IsSynchronized()

bool QmitkSynchronizedNodeSelectionWidget::IsSynchronized ( ) const

◆ OnDataStorageChanged()

void QmitkSynchronizedNodeSelectionWidget::OnDataStorageChanged ( )

Method is called if the data storage has changed. The selection will be automatically be reseted afterwards. The default implementation does nothing.

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ OnInternalSelectionChanged()

void QmitkSynchronizedNodeSelectionWidget::OnInternalSelectionChanged ( )

This member function will called when ever a new internal selection has been determined. This can be used to update the state of internal widgets. The default implementation does nothing.

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ OnNodeAddedToStorage()

void QmitkSynchronizedNodeSelectionWidget::OnNodeAddedToStorage ( const mitk::DataNode node)

Method is called when a node is added to the storage. Default implementation does nothing. Derived widgets can override the method if they want to react on new nodes in the storage.

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ OnNodeModified()

void QmitkSynchronizedNodeSelectionWidget::OnNodeModified ( const itk::Object *  caller,
const itk::EventObject &  event 

Method is called when a node is modified. The modified node is passed as 'caller' variable. Default implementation handles changes that are related to the node predicate:

  • If the node does not fit the node predicate anymore, it will be removed.
  • If the node was part of the external selection and now fits the node predicate, a new selection is compiled and emitted. Derived widgets can override the method if they want to react on modified nodes.

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ OnNodePredicateChanged()

void QmitkSynchronizedNodeSelectionWidget::OnNodePredicateChanged ( )

Method is called if the predicate has changed, before the selection will be updated according to the new predicate. The default implementation does nothing.

If you are only interested to know when the selection has changed, overwrite OnInternalSelectionChange().

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ ReviseSelectionChanged()

void QmitkSynchronizedNodeSelectionWidget::ReviseSelectionChanged ( const NodeList oldInternalSelection,
NodeList newInternalSelection 

This member function is called if the internal selection is about to be changed by the base implementation. This is the slot where derived classes can revise and change the internal selection before widget updates, signal emissions and other things are triggered. Default implementation does nothing, thus it keeps the passed internal selection as compiled by the base implementation.

Reimplemented from QmitkAbstractNodeSelectionWidget.

◆ SelectionModeChanged

void QmitkSynchronizedNodeSelectionWidget::SelectionModeChanged ( bool  selectAll)

◆ SetBaseRenderer()

void QmitkSynchronizedNodeSelectionWidget::SetBaseRenderer ( mitk::BaseRenderer baseRenderer)

◆ SetSelectAll()

void QmitkSynchronizedNodeSelectionWidget::SetSelectAll ( bool  selectAll)

◆ SetSynchronized()

void QmitkSynchronizedNodeSelectionWidget::SetSynchronized ( bool  synchronize)

◆ SetUpConnections()

void QmitkSynchronizedNodeSelectionWidget::SetUpConnections ( )

◆ UpdateInfo()

void QmitkSynchronizedNodeSelectionWidget::UpdateInfo ( )

Method is called if the display of the selected nodes should be updated (e.g. because the selection changed).

Implements QmitkAbstractNodeSelectionWidget.

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