Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
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 &)> |
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. More... | |
Public Types inherited from QmitkAbstractNodeSelectionWidget | |
using | NodeList = QList< mitk::DataNode::Pointer > |
using | ConstNodeStdVector = std::vector< mitk::DataNode::ConstPointer > |
Public Slots | |
void | OnEditSelection () |
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) |
Signals | |
void | DialogClosed () |
Signals inherited from QmitkAbstractNodeSelectionWidget | |
void | CurrentSelectionChanged (NodeList nodes) |
A signal that will be emitted if the selected node has changed. More... | |
Public Member Functions | |
QmitkMultiNodeSelectionWidget (QWidget *parent=nullptr) | |
void | 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). More... | |
bool | CurrentSelectionViolatesCheckFunction () 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::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 |
void | OnSelectionReceived (const std::string &context, const std::vector< mitk::DataNode::Pointer > &selection) override |
Callback method for received selections. More... | |
Protected Slots | |
void | OnClearSelection (const mitk::DataNode *node) |
Protected Slots inherited from QmitkAbstractNodeSelectionWidget | |
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 |
Protected Member Functions inherited from QmitkAbstractNodeSelectionWidget | |
virtual void | OnNodePredicateChanged () |
virtual void | OnDataStorageChanged () |
virtual void | OnNodeAddedToStorage (const mitk::DataNode *node) |
virtual void | OnNodeRemovedFromStorage (const mitk::DataNode *node) |
virtual void | OnNodeModified (const itk::Object *caller, const itk::EventObject &event) |
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 |
Protected Attributes inherited from QmitkAbstractNodeSelectionWidget | |
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 |
Widget that allows to perform and represents a multiple node selection.
Definition at line 33 of file QmitkMultiNodeSelectionWidget.h.
Definition at line 40 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 48 of file QmitkMultiNodeSelectionWidget.h.
|
explicit |
|
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.
|
overrideprotected |
bool QmitkMultiNodeSelectionWidget::CurrentSelectionViolatesCheckFunction | ( | ) | const |
Returns if the current internal selection is violating the current check function, if set.
|
signal |
|
protectedslot |
|
slot |
|
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.
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).
|
overrideprotectedvirtual |
Method is called if the display of the selected nodes should be updated (e.g. because the selection changed).
Implements QmitkAbstractNodeSelectionWidget.
|
protected |
Definition at line 79 of file QmitkMultiNodeSelectionWidget.h.
|
mutableprotected |
Definition at line 80 of file QmitkMultiNodeSelectionWidget.h.
|
protected |
Definition at line 82 of file QmitkMultiNodeSelectionWidget.h.
|
protected |
Definition at line 77 of file QmitkMultiNodeSelectionWidget.h.