Displays all or a subset (defined by a predicate) of nodes of the Data Storage.
More...
#include <QmitkDataStorageComboBox.h>
Displays all or a subset (defined by a predicate) of nodes of the Data Storage.
- Author
- Michael Mueller
- Version
- 4.0
- Date
- 2009-02-09
Definition at line 38 of file QmitkDataStorageComboBox.h.
◆ QmitkDataStorageComboBox() [1/2]
QmitkDataStorageComboBox::QmitkDataStorageComboBox |
( |
QWidget * |
parent = nullptr , |
|
|
bool |
autoSelectNewNodes = false |
|
) |
| |
Ctor for an empty combobox. Use setDataStorage and setPredicate afterwards.
◆ QmitkDataStorageComboBox() [2/2]
◆ ~QmitkDataStorageComboBox()
QmitkDataStorageComboBox::~QmitkDataStorageComboBox |
( |
| ) |
|
|
override |
Standard Dtor. Nothing to do here.
◆ AddNode()
virtual void QmitkDataStorageComboBox::AddNode |
( |
const mitk::DataNode * |
dataNode | ) |
|
|
virtual |
Adds a node to the ComboBox. Gets called every time a DataStorage Add Event was thrown.
◆ Find()
virtual int QmitkDataStorageComboBox::Find |
( |
const mitk::DataNode * |
dataNode | ) |
const |
|
virtual |
◆ GetAutoSelectNewItems()
virtual bool QmitkDataStorageComboBox::GetAutoSelectNewItems |
( |
| ) |
|
|
virtual |
◆ GetDataStorage()
Get the DataStorage this ComboBox listens to.
◆ GetNode()
◆ GetNodes()
mitk::DataStorage::SetOfObjects::ConstPointer QmitkDataStorageComboBox::GetNodes |
( |
| ) |
const |
Returns all nodes that are stored in this combobox.
◆ GetPredicate()
Return the predicate (may be nullptr) that is responsible for the dataNode selection of this ComboBox.
◆ GetSelectedNode()
◆ HasIndex()
bool QmitkDataStorageComboBox::HasIndex |
( |
unsigned int |
index | ) |
const |
|
protected |
Checks if the given index is within the range of the m_Nodes vector.
◆ Init()
void QmitkDataStorageComboBox::Init |
( |
| ) |
|
|
protected |
Init-function this class with the given data storage and predicate. This function is called by all ctors.
◆ InsertNode()
virtual void QmitkDataStorageComboBox::InsertNode |
( |
int |
index, |
|
|
const mitk::DataNode * |
dataNode |
|
) |
| |
|
protectedvirtual |
Inserts a new node at the given index. If the index does not exist, the data node is simply appended to the combobox.
This function is used by AddNode() and SetNode() because they just to the same:
- If node is replaced (that is when index exists), the itk::Event observer will be removed
- Check Node against Predicate
- Register for itk::Events on the node
- Insert Node and show in combobox
Reimplemented in QmitkDataStorageComboBoxWithSelectNone.
◆ OnCurrentIndexChanged
void QmitkDataStorageComboBox::OnCurrentIndexChanged |
( |
int |
| ) |
|
|
protectedslot |
Slot for signal when the user selects another item.
◆ OnPropertyListChanged()
virtual void QmitkDataStorageComboBox::OnPropertyListChanged |
( |
const itk::Object * |
caller, |
|
|
const itk::EventObject & |
event |
|
) |
| |
|
virtual |
Called when the name property of the node was modified.
◆ OnSelectionChanged
void QmitkDataStorageComboBox::OnSelectionChanged |
( |
const mitk::DataNode * |
| ) |
|
|
signal |
Throw a signal when the data node selection changed.
◆ RemoveNode() [1/2]
virtual void QmitkDataStorageComboBox::RemoveNode |
( |
const mitk::DataNode * |
dataNode | ) |
|
|
virtual |
Removes a node from the ComboBox. Gets called when a DataStorage Remove Event was thrown.
◆ RemoveNode() [2/2]
virtual void QmitkDataStorageComboBox::RemoveNode |
( |
int |
index | ) |
|
|
virtual |
◆ RemoveNodeAndPropertyLists()
void QmitkDataStorageComboBox::RemoveNodeAndPropertyLists |
( |
int |
index | ) |
|
|
protected |
◆ Reset()
virtual void QmitkDataStorageComboBox::Reset |
( |
| ) |
|
|
protectedvirtual |
◆ SetAutoSelectNewItems()
virtual void QmitkDataStorageComboBox::SetAutoSelectNewItems |
( |
bool |
autoSelectNewItems | ) |
|
|
virtual |
Sets AutoSelectNewItems flag. If set to true new Nodes will be automatically selected. Default is false.
◆ SetDataStorage()
Set the DataStorage this ComboBox should listen to.
If DataStorage is 0 nothing will be shown. If DataStorage is reset the combobox will be reset.
◆ SetNode() [1/2]
Replaces a dataNode in the combobox by an otherDataNode. Internally the method just calls SetNode(unsigned int, mitk::DataNode*)
◆ SetNode() [2/2]
virtual void QmitkDataStorageComboBox::SetNode |
( |
int |
index, |
|
|
const mitk::DataNode * |
dataNode |
|
) |
| |
|
virtual |
Set a dataNode in the ComboBox at the specified index (if the index exists). Internally the method just calls RemoveNode(unsigned int)
Reimplemented in QmitkDataStorageComboBoxWithSelectNone.
◆ SetPredicate()
Set the predicate for this ComboBox. (QmitkDataStorageComboBox is now owner of the predicate)
If predicate is nullptr all nodes will be selected. If predicate changes the whole combobox will be reset.
◆ SetSelectedNode
Slot for signal when user wants to set a node as current selected node.
◆ UpdateComboBoxText()
◆ m_AutoSelectNewNodes
bool QmitkDataStorageComboBox::m_AutoSelectNewNodes |
|
protected |
◆ m_BaseDatapropertyListObserverTags
std::vector<long> QmitkDataStorageComboBox::m_BaseDatapropertyListObserverTags |
|
protected |
◆ m_BlockEvents
bool QmitkDataStorageComboBox::m_BlockEvents |
|
protected |
Event function guard. Each function which is called by an event mechanism first checks if this is true in order to avoid endless loops.
Definition at line 218 of file QmitkDataStorageComboBox.h.
◆ m_DataNodePropertyListObserverTags
std::vector<long> QmitkDataStorageComboBox::m_DataNodePropertyListObserverTags |
|
protected |
◆ m_DataStorage
Pointer to the DataStorage from which the nodes are selected (remember: in BlueBerry there might be more than one DataStorage).
Definition at line 192 of file QmitkDataStorageComboBox.h.
◆ m_Nodes
◆ 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 at line 198 of file QmitkDataStorageComboBox.h.
The documentation for this class was generated from the following file: