Medical Imaging Interaction Toolkit
2018.4.99-389bf124
Medical Imaging Interaction Toolkit
|
Widget that allows to perform and represents a multiple node selection. More...
#include <QmitkMultiNodeSelectionWidget.h>
Public Types | |
using | NodeList = QmitkAbstractNodeSelectionWidget::NodeList |
using | SelectionCheckFunctionType = std::function< std::string(const NodeList &)> |
![]() | |
using | NodeList = QList< mitk::DataNode::Pointer > |
Public Slots | |
void | OnEditSelection () |
![]() | |
void | SetSelectOnlyVisibleNodes (bool selectOnlyVisibleNodes) |
void | SetCurrentSelection (NodeList selectedNodes) |
void | SetInvalidInfo (QString info) |
void | SetEmptyInfo (QString info) |
void | SetPopUpTitel (QString info) |
void | SetPopUpHint (QString info) |
void | SetSelectionIsOptional (bool isOptional) |
Public Member Functions | |
QmitkMultiNodeSelectionWidget (QWidget *parent=nullptr) | |
void | SetSelectionCheckFunction (const SelectionCheckFunctionType &checkFunction) |
![]() | |
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::NodePredicateBase * | GetNodePredicate () const |
QString | GetInvalidInfo () const |
QString | GetEmptyInfo () const |
QString | GetPopUpTitel () const |
QString | GetPopUpHint () const |
bool | GetSelectionIsOptional () const |
bool | GetSelectOnlyVisibleNodes () const |
NodeList | GetSelectedNodes () const |
Protected Slots | |
void | OnClearSelection (const mitk::DataNode *node) |
![]() | |
void | RemoveNodeFromSelection (const mitk::DataNode *node) |
Protected Member Functions | |
void | changeEvent (QEvent *event) override |
void | UpdateInfo () override |
void | OnInternalSelectionChanged () override |
bool | AllowEmissionOfSelection (const NodeList &emissionCandidates) const override |
![]() | |
virtual void | OnNodePredicateChanged () |
virtual void | OnDataStorageChanged () |
virtual void | OnNodeAddedToStorage (const mitk::DataNode *node) |
virtual void | OnNodeRemovedFromStorage (const mitk::DataNode *node) |
void | HandleChangeOfInternalSelection (NodeList newInternalSelection) |
NodeList | CompileEmitSelection () const |
virtual void | ReviseSelectionChanged (const NodeList &oldInternalSelection, NodeList &newInternalSelection) |
void | EmitSelection (const NodeList &emissionCandidates) |
void | SetCurrentInternalSelection (NodeList selectedNodes) |
const NodeList & | GetCurrentInternalSelection () const |
const NodeList & | GetCurrentExternalSelection () const |
Protected Attributes | |
QmitkSimpleTextOverlayWidget * | m_Overlay |
SelectionCheckFunctionType | m_CheckFunction |
std::string | m_CheckResponse |
Ui_QmitkMultiNodeSelectionWidget | m_Controls |
![]() | |
mitk::WeakPointer< mitk::DataStorage > | m_DataStorage |
mitk::NodePredicateBase::ConstPointer | m_NodePredicate |
QString | m_InvalidInfo |
QString | m_EmptyInfo |
QString | m_PopUpTitel |
QString | m_PopUpHint |
bool | m_IsOptional |
bool | m_SelectOnlyVisibleNodes |
Additional Inherited Members | |
![]() | |
void | CurrentSelectionChanged (NodeList nodes) |
Widget that allows to perform and represents a multiple node selection.
Definition at line 36 of file QmitkMultiNodeSelectionWidget.h.
Definition at line 43 of file QmitkMultiNodeSelectionWidget.h.
using QmitkMultiNodeSelectionWidget::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 in the overlay to indicate the problem.
Definition at line 49 of file QmitkMultiNodeSelectionWidget.h.
|
explicit |
Definition at line 22 of file QmitkMultiNodeSelectionWidget.cpp.
References m_CheckFunction, m_Controls, m_Overlay, OnEditSelection(), OnInternalSelectionChanged(), and UpdateInfo().
|
overrideprotectedvirtual |
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.
emissionCandidates | The nodes that will be emitted if the function returns true. |
Reimplemented from QmitkAbstractNodeSelectionWidget.
Definition at line 154 of file QmitkMultiNodeSelectionWidget.cpp.
References m_CheckFunction, and m_CheckResponse.
|
overrideprotected |
Definition at line 145 of file QmitkMultiNodeSelectionWidget.cpp.
References UpdateInfo().
|
protectedslot |
Definition at line 140 of file QmitkMultiNodeSelectionWidget.cpp.
References QmitkAbstractNodeSelectionWidget::RemoveNodeFromSelection().
Referenced by OnInternalSelectionChanged().
|
slot |
Definition at line 50 of file QmitkMultiNodeSelectionWidget.cpp.
References QmitkAbstractNodeSelectionWidget::CompileEmitSelection(), QmitkNodeSelectionDialog::GetSelectedNodes(), QmitkAbstractNodeSelectionWidget::HandleChangeOfInternalSelection(), mitk::WeakPointer< T >::Lock(), m_Controls, QmitkAbstractNodeSelectionWidget::m_DataStorage, QmitkAbstractNodeSelectionWidget::m_NodePredicate, QmitkAbstractNodeSelectionWidget::m_PopUpHint, QmitkAbstractNodeSelectionWidget::m_PopUpTitel, QmitkAbstractNodeSelectionWidget::m_SelectOnlyVisibleNodes, QmitkNodeSelectionDialog::SetCurrentSelection(), QmitkNodeSelectionDialog::SetDataStorage(), QmitkNodeSelectionDialog::SetNodePredicate(), QmitkNodeSelectionDialog::SetSelectionMode(), and QmitkNodeSelectionDialog::SetSelectOnlyVisibleNodes().
Referenced by QmitkMultiNodeSelectionWidget().
|
overrideprotectedvirtual |
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.
Definition at line 115 of file QmitkMultiNodeSelectionWidget.cpp.
References QmitkAbstractNodeSelectionWidget::GetCurrentInternalSelection(), m_Controls, QmitkAbstractNodeSelectionWidget::m_IsOptional, QmitkAbstractNodeSelectionWidget::m_NodePredicate, and OnClearSelection().
Referenced by QmitkMultiNodeSelectionWidget().
void QmitkMultiNodeSelectionWidget::SetSelectionCheckFunction | ( | const SelectionCheckFunctionType & | checkFunction | ) |
A selection check function can be set. If set the widget uses this function to check the made/set selection. If the selection is valid, everything is fine. If selection is indicated as invalid, it will not be communicated by the widget (no signal emission.
Definition at line 35 of file QmitkMultiNodeSelectionWidget.cpp.
References QmitkAbstractNodeSelectionWidget::CompileEmitSelection(), QmitkAbstractNodeSelectionWidget::EmitSelection(), m_CheckFunction, m_CheckResponse, and UpdateInfo().
|
overrideprotectedvirtual |
Method is called if the display of the selected nodes should be updated (e.g. because the selection changed)
Implements QmitkAbstractNodeSelectionWidget.
Definition at line 70 of file QmitkMultiNodeSelectionWidget.cpp.
References m_CheckResponse, m_Controls, QmitkAbstractNodeSelectionWidget::m_EmptyInfo, QmitkAbstractNodeSelectionWidget::m_InvalidInfo, QmitkAbstractNodeSelectionWidget::m_IsOptional, m_Overlay, and QmitkSimpleTextOverlayWidget::SetOverlayText().
Referenced by changeEvent(), QmitkMultiNodeSelectionWidget(), and SetSelectionCheckFunction().
|
protected |
Definition at line 72 of file QmitkMultiNodeSelectionWidget.h.
Referenced by AllowEmissionOfSelection(), QmitkMultiNodeSelectionWidget(), and SetSelectionCheckFunction().
|
mutableprotected |
Definition at line 73 of file QmitkMultiNodeSelectionWidget.h.
Referenced by AllowEmissionOfSelection(), SetSelectionCheckFunction(), and UpdateInfo().
|
protected |
Definition at line 75 of file QmitkMultiNodeSelectionWidget.h.
Referenced by OnEditSelection(), OnInternalSelectionChanged(), QmitkMultiNodeSelectionWidget(), and UpdateInfo().
|
protected |
Definition at line 70 of file QmitkMultiNodeSelectionWidget.h.
Referenced by QmitkMultiNodeSelectionWidget(), and UpdateInfo().