36 #ifndef niftkDataStorageCheckableComboBox_h
37 #define niftkDataStorageCheckableComboBox_h
39 #include "niftkCoreGuiExports.h"
40 #include <ctkCheckableComboBox.h>
41 #include <mitkDataStorage.h>
42 #include <mitkDataNode.h>
43 #include <mitkWeakPointer.h>
44 #include <mitkNodePredicateBase.h>
67 const mitk::NodePredicateBase* _Predicate,
68 QWidget* parent = 0,
bool _AutoSelectNewNodes =
false);
78 virtual int Find(
const mitk::DataNode* _DataNode )
const;
85 mitk::DataStorage::Pointer GetDataStorage()
const;
89 const mitk::NodePredicateBase::ConstPointer GetPredicate()
const;
93 virtual mitk::DataNode::Pointer GetNode(
int index)
const;
97 virtual std::vector<mitk::DataNode*> GetSelectedNodes()
const;
101 mitk::DataStorage::SetOfObjects::ConstPointer GetNodes()
const;
106 virtual bool GetAutoSelectNewItems();
114 void SetDataStorage(mitk::DataStorage* dataStorage);
119 void SetPredicate(
const mitk::NodePredicateBase* _Predicate);
123 virtual void AddNode(
const mitk::DataNode* _DataNode);
128 virtual void RemoveNode(
int index);
132 virtual void RemoveNode(
const mitk::DataNode* _DataNode);
137 virtual void SetNode(
int index,
const mitk::DataNode* _DataNode);
142 virtual void SetNode(
const mitk::DataNode* _DataNode,
const mitk::DataNode* _OtherDataNode);
147 virtual void SetAutoSelectNewItems(
bool _AutoSelectNewItems);
152 virtual void OnDataNodeDeleteOrModified(
const itk::Object *caller,
const itk::EventObject &
event);
158 void OnSelectionChanged(
const mitk::DataNode*);
165 bool HasIndex(
unsigned int index)
const;
175 void SetSelectedNode(mitk::DataNode::Pointer item);
188 virtual void InsertNode(
int index,
const mitk::DataNode* _DataNode);
198 virtual void Reset();
mitk::WeakPointer< mitk::DataStorage > m_DataStorage
Definition: niftkDataStorageCheckableComboBox.h:206
mitk::NodePredicateBase::ConstPointer m_Predicate
Holds the predicate that is responsible for the _DataNode selection of this ComboBox. If the predicate is 0, every _DataNode will be selected.
Definition: niftkDataStorageCheckableComboBox.h:212
Definition: niftkDataStorageCheckableComboBox.h:51
std::vector< long > m_NodesModifiedObserverTags
Holds the tags of the node-modified observers. (must be updated everytime m_Nodes changes) ...
Definition: niftkDataStorageCheckableComboBox.h:222
bool m_BlockEvents
Event function guard. Each function which is called by an event mechanism first checks if this is tru...
Definition: niftkDataStorageCheckableComboBox.h:238
std::vector< mitk::DataNode * > m_Nodes
Definition: niftkDataStorageCheckableComboBox.h:217
GLuint index
Definition: glew.h:1798
std::map< mitk::DataNode *, const mitk::BaseProperty * > m_PropertyToNode
Maps a a specific node to (Name-)property. This is needed because we have to find the assiociated nod...
Definition: niftkDataStorageCheckableComboBox.h:233
cl_event event
Definition: glew.h:3231
std::vector< long > m_NodesDeleteObserverTags
Holds the tags of the node-modified observers. (must be updated everytime m_Nodes changes) ...
Definition: niftkDataStorageCheckableComboBox.h:227
Definition: niftkExceptionObject.h:21
bool m_AutoSelectNewNodes
If set to "true" new Nodes will be automatically selected.
Definition: niftkDataStorageCheckableComboBox.h:242