13 #ifndef QmitkAbstractNodeSelectionWidget_h
14 #define QmitkAbstractNodeSelectionWidget_h
56 QString GetInvalidInfo()
const;
57 QString GetEmptyInfo()
const;
58 QString GetPopUpTitel()
const;
59 QString GetPopUpHint()
const;
61 bool GetSelectionIsOptional()
const;
63 bool GetSelectOnlyVisibleNodes()
const;
65 using NodeList = QList<mitk::DataNode::Pointer>;
75 void OnSelectionReceived(
const std::string& context,
const std::vector<mitk::DataNode::Pointer>& selection)
override;
83 void CurrentSelectionChanged(
NodeList nodes);
97 void SetSelectOnlyVisibleNodes(
bool selectOnlyVisibleNodes);
111 void SetCurrentSelection(
NodeList selectedNodes);
117 void SetInvalidInfo(QString info);
123 void SetEmptyInfo(QString info);
128 void SetPopUpTitel(QString info);
133 void SetPopUpHint(QString info);
138 void SetSelectionIsOptional(
bool isOptional);
149 virtual void UpdateInfo() = 0;
155 virtual void OnNodePredicateChanged();
160 virtual void OnDataStorageChanged();
165 virtual void OnInternalSelectionChanged();
177 virtual void OnNodeRemovedFromStorage(
const mitk::DataNode* node);
186 virtual void OnNodeModified(
const itk::Object* caller,
const itk::EventObject& event);
194 void HandleChangeOfInternalSelection(
NodeList newInternalSelection);
199 NodeList CompileEmitSelection()
const;
206 virtual void ReviseSelectionChanged(
const NodeList& oldInternalSelection,
NodeList& newInternalSelection);
213 virtual bool AllowEmissionOfSelection(
const NodeList& emissionCandidates)
const;
218 void EmitSelection(
const NodeList& emissionCandidates);
220 void SetCurrentInternalSelection(
NodeList selectedNodes);
221 const NodeList& GetCurrentInternalSelection()
const;
222 const NodeList& GetCurrentExternalSelection()
const;
239 void SetDataStorageDeleted();
254 unsigned long m_DataStorageDeletedTag;
256 NodeList m_CurrentInternalSelection;
257 NodeList m_CurrentExternalSelection;
260 bool m_LastEmissionAllowance;
262 using NodeObserverTagMapType = std::map<const mitk::DataNode*, unsigned long>;
263 NodeObserverTagMapType m_NodeObserverTags;
266 bool m_RecursionGuard;