Medical Imaging Interaction Toolkit
2022.04.99-b2814023
Medical Imaging Interaction Toolkit
|
Widget that represents a node selection of (max) one node. It acts like a button. Clicking on it allows to change the selection. More...
#include <QmitkSingleNodeSelectionWidget.h>
Public Types | |
using | NodeList = QmitkAbstractNodeSelectionWidget::NodeList |
![]() | |
using | NodeList = QList< mitk::DataNode::Pointer > |
using | ConstNodeStdVector = std::vector< mitk::DataNode::ConstPointer > |
Public Slots | |
void | SetCurrentSelectedNode (mitk::DataNode *selectedNode) |
void | SetAutoSelectNewNodes (bool autoSelect) |
![]() | |
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) |
Public Member Functions | |
QmitkSingleNodeSelectionWidget (QWidget *parent=nullptr) | |
mitk::DataNode::Pointer | GetSelectedNode () const |
bool | GetAutoSelectNewNodes () const |
![]() | |
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 |
ConstNodeStdVector | GetSelectedNodesStdVector () const |
Protected Slots | |
virtual void | OnClearSelection () |
![]() | |
void | RemoveNodeFromSelection (const mitk::DataNode *node) |
Protected Member Functions | |
void | ReviseSelectionChanged (const NodeList &oldInternalSelection, NodeList &newInternalSelection) override |
bool | eventFilter (QObject *obj, QEvent *ev) override |
void | EditSelection () |
void | UpdateInfo () override |
void | OnDataStorageChanged () override |
void | OnNodeAddedToStorage (const mitk::DataNode *node) override |
void | AutoSelectNodes () |
mitk::DataNode::Pointer | DetermineAutoSelectNode (const NodeList &ignoreNodes={}) |
![]() | |
virtual void | OnNodePredicateChanged () |
virtual void | OnInternalSelectionChanged () |
virtual void | OnNodeRemovedFromStorage (const mitk::DataNode *node) |
void | HandleChangeOfInternalSelection (NodeList newInternalSelection) |
NodeList | CompileEmitSelection () const |
virtual bool | AllowEmissionOfSelection (const NodeList &emissionCandidates) const |
void | EmitSelection (const NodeList &emissionCandidates) |
void | SetCurrentInternalSelection (NodeList selectedNodes) |
const NodeList & | GetCurrentInternalSelection () const |
const NodeList & | GetCurrentExternalSelection () const |
Protected Attributes | |
bool | m_AutoSelectNodes |
Ui_QmitkSingleNodeSelectionWidget | 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) |
A signal that will be emitted if the selected node has changed. More... | |
Widget that represents a node selection of (max) one node. It acts like a button. Clicking on it allows to change the selection.
Definition at line 40 of file QmitkSingleNodeSelectionWidget.h.
Definition at line 50 of file QmitkSingleNodeSelectionWidget.h.
|
explicit |
|
protected |
|
protected |
Helper function that gets a suitable auto selected node from the datastorage that fits to the predicate settings.
ignoreNodes | You may pass a list of nodes that must not be choosen as auto selected node. |
|
protected |
|
overrideprotected |
bool QmitkSingleNodeSelectionWidget::GetAutoSelectNewNodes | ( | ) | const |
mitk::DataNode::Pointer QmitkSingleNodeSelectionWidget::GetSelectedNode | ( | ) | const |
|
protectedvirtualslot |
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
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.
|
overrideprotectedvirtual |
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.
|
slot |
Sets the auto selection mode (default is false). If auto select is true and the following conditions are fullfilled, the widget will select a node automatically from the data storage:
|
slot |
|
overrideprotectedvirtual |
Method is called if the display of the selected nodes should be updated (e.g. because the selection changed).
Implements QmitkAbstractNodeSelectionWidget.
|
protected |
See documentation of SetAutoSelectNewNodes for details
Definition at line 92 of file QmitkSingleNodeSelectionWidget.h.
|
protected |
Definition at line 94 of file QmitkSingleNodeSelectionWidget.h.