Medical Imaging Interaction Toolkit
2024.06.99-60d9b802
Medical Imaging Interaction Toolkit
|
Displays all or a subset (defined by a predicate) of nodes of the Data Storage, and additionally, index 0 is always "please select", indicating no selection, and will hence always return a nullptr mitk::DataNode* if asked for the node at index 0. More...
#include <QmitkDataStorageComboBoxWithSelectNone.h>
Public Member Functions | |
QmitkDataStorageComboBoxWithSelectNone (QWidget *parent=nullptr, bool autoSelectNewNodes=false) | |
Calls base class constructor. More... | |
QmitkDataStorageComboBoxWithSelectNone (mitk::DataStorage *dataStorage, const mitk::NodePredicateBase *predicate, QWidget *parent=nullptr, bool autoSelectNewNodes=false) | |
Calls base class constructor. More... | |
~QmitkDataStorageComboBoxWithSelectNone () override | |
Nothing to do. More... | |
int | Find (const mitk::DataNode *dataNode) const override |
Searches for a given node, returning the index if found. More... | |
mitk::DataNode::Pointer | GetNode (int index) const override |
Retrieves the node at a given index, where if index is zero, will always return nullptr. More... | |
mitk::DataNode::Pointer | GetSelectedNode () const override |
Returns the selected DataNode or nullptr if there is none, or the current index is zero. More... | |
virtual void | SetSelectedNode (const mitk::DataNode::Pointer &node) |
Sets the combo box to the index that contains the specified node, or 0 if the node cannot be found. More... | |
void | RemoveNode (int index) override |
Removes a node from the ComboBox at a specified index (if the index exists). Gets called when a DataStorage Remove Event was thrown. More... | |
void | SetNode (int index, const mitk::DataNode *dataNode) override |
Set a DataNode in the ComboBox at the specified index (if the index exists). Internally the method just calls InsertNode(unsigned int) More... | |
virtual QString | currentValue () const |
Get the current file path. More... | |
virtual void | setCurrentValue (const QString &path) |
Set the current file path. More... | |
void | SetZeroEntryText (const QString &zeroEntryString) |
Set the string that will be present on index 0. More... | |
virtual void | RemoveNode (int index) |
virtual void | RemoveNode (const mitk::DataNode *dataNode) |
virtual void | SetNode (int index, const mitk::DataNode *dataNode) |
virtual void | SetNode (const mitk::DataNode *dataNode, const mitk::DataNode *otherDataNode) |
Public Member Functions inherited from QmitkDataStorageComboBox | |
QmitkDataStorageComboBox (QWidget *parent=nullptr, bool autoSelectNewNodes=false) | |
Ctor for an empty combobox. Use setDataStorage and setPredicate afterwards. More... | |
QmitkDataStorageComboBox (mitk::DataStorage *dataStorage, const mitk::NodePredicateBase *predicate, QWidget *parent=nullptr, bool autoSelectNewNodes=false) | |
Ctor for constructing QmitkDataStorageComboBox with given DataStorageComboBox and given predicate. More... | |
~QmitkDataStorageComboBox () override | |
Standard Dtor. Nothing to do here. More... | |
mitk::DataStorage::Pointer | GetDataStorage () const |
Get the DataStorage this ComboBox listens to. More... | |
const mitk::NodePredicateBase::ConstPointer | GetPredicate () const |
Return the predicate (may be nullptr) that is responsible for the dataNode selection of this ComboBox. More... | |
mitk::DataStorage::SetOfObjects::ConstPointer | GetNodes () const |
Returns all nodes that are stored in this combobox. More... | |
virtual bool | GetAutoSelectNewItems () |
void | SetDataStorage (mitk::DataStorage *dataStorage) |
Set the DataStorage this ComboBox should listen to. More... | |
void | SetPredicate (const mitk::NodePredicateBase *predicate) |
Set the predicate for this ComboBox. (QmitkDataStorageComboBox is now owner of the predicate) More... | |
virtual void | AddNode (const mitk::DataNode *dataNode) |
virtual void | RemoveNode (const mitk::DataNode *dataNode) |
virtual void | SetNode (const mitk::DataNode *dataNode, const mitk::DataNode *otherDataNode) |
virtual void | SetAutoSelectNewItems (bool autoSelectNewItems) |
virtual void | OnPropertyListChanged (const itk::Object *caller, const itk::EventObject &event) |
Called when the name property of the node was modified. More... | |
Static Public Attributes | |
static const QString | ZERO_ENTRY_STRING |
Stores the string that will be present on index 0, currently equal to "please select". More... | |
Protected Member Functions | |
bool | HasIndex (unsigned int index) const |
Checks if the given index is within range. More... | |
void | InsertNode (int index, const mitk::DataNode *dataNode) override |
Inserts a new node at the given index, unless index is 0, which is silently ignored. More... | |
void | Reset () override |
Reset function whenever datastorage or predicate changes. More... | |
Protected Member Functions inherited from QmitkDataStorageComboBox | |
bool | HasIndex (unsigned int index) const |
Checks if the given index is within the range of the m_Nodes vector. More... | |
void | Init () |
Init-function this class with the given data storage and predicate. This function is called by all ctors. More... | |
void | RemoveNodeAndPropertyLists (int index) |
virtual void | UpdateComboBoxText (const mitk::PropertyList *) |
Properties | |
mitkDataNodePtr | SelectedNode |
QString | currentValue |
Additional Inherited Members | |
Public Slots inherited from QmitkDataStorageComboBox | |
void | SetSelectedNode (const mitk::DataNode::Pointer &node) |
Slot for signal when user wants to set a node as current selected node. More... | |
Signals inherited from QmitkDataStorageComboBox | |
void | OnSelectionChanged (const mitk::DataNode *) |
Throw a signal when the data node selection changed. More... | |
Protected Slots inherited from QmitkDataStorageComboBox | |
void | OnCurrentIndexChanged (int) |
Slot for signal when the user selects another item. More... | |
Protected Attributes inherited from QmitkDataStorageComboBox | |
mitk::WeakPointer< mitk::DataStorage > | m_DataStorage |
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. More... | |
std::vector< mitk::DataNode * > | m_Nodes |
std::vector< long > | m_DataNodePropertyListObserverTags |
Holds the tags of the data node property observers. More... | |
std::vector< long > | m_BaseDatapropertyListObserverTags |
Holds the tags of the base data property observers. More... | |
bool | m_BlockEvents |
Event function guard. Each function which is called by an event mechanism first checks if this is true in order to avoid endless loops. More... | |
bool | m_AutoSelectNewNodes |
If set to "true" new Nodes will be automatically selected. More... | |
Displays all or a subset (defined by a predicate) of nodes of the Data Storage, and additionally, index 0 is always "please select", indicating no selection, and will hence always return a nullptr mitk::DataNode* if asked for the node at index 0.
Definition at line 32 of file QmitkDataStorageComboBoxWithSelectNone.h.
QmitkDataStorageComboBoxWithSelectNone::QmitkDataStorageComboBoxWithSelectNone | ( | QWidget * | parent = nullptr , |
bool | autoSelectNewNodes = false |
||
) |
Calls base class constructor.
QmitkDataStorageComboBoxWithSelectNone::QmitkDataStorageComboBoxWithSelectNone | ( | mitk::DataStorage * | dataStorage, |
const mitk::NodePredicateBase * | predicate, | ||
QWidget * | parent = nullptr , |
||
bool | autoSelectNewNodes = false |
||
) |
Calls base class constructor.
|
override |
Nothing to do.
|
virtual |
Get the current file path.
|
overridevirtual |
Searches for a given node, returning the index if found.
dataNode | an mitk::DataNode, can be nullptr. |
Reimplemented from QmitkDataStorageComboBox.
|
overridevirtual |
Retrieves the node at a given index, where if index is zero, will always return nullptr.
index | An integer between 0 and n = number of nodes. |
Reimplemented from QmitkDataStorageComboBox.
|
overridevirtual |
Returns the selected DataNode or nullptr if there is none, or the current index is zero.
Reimplemented from QmitkDataStorageComboBox.
|
protected |
Checks if the given index is within range.
|
overrideprotectedvirtual |
Inserts a new node at the given index, unless index is 0, which is silently ignored.
Reimplemented from QmitkDataStorageComboBox.
virtual void QmitkDataStorageComboBox::RemoveNode |
Removes a node from the ComboBox. Gets called when a DataStorage Remove Event was thrown.
virtual void QmitkDataStorageComboBox::RemoveNode |
Removes a node from the ComboBox at a specified index (if the index exists). Gets called when a DataStorage Remove Event was thrown.
|
overridevirtual |
Removes a node from the ComboBox at a specified index (if the index exists). Gets called when a DataStorage Remove Event was thrown.
Reimplemented from QmitkDataStorageComboBox.
|
overrideprotectedvirtual |
Reset function whenever datastorage or predicate changes.
Reimplemented from QmitkDataStorageComboBox.
|
virtual |
Set the current file path.
virtual void QmitkDataStorageComboBox::SetNode |
Replaces a dataNode in the combobox by an otherDataNode. Internally the method just calls SetNode(unsigned int, mitk::DataNode*)
virtual void QmitkDataStorageComboBox::SetNode |
Set a dataNode in the ComboBox at the specified index (if the index exists). Internally the method just calls RemoveNode(unsigned int)
|
overridevirtual |
Set a DataNode in the ComboBox at the specified index (if the index exists). Internally the method just calls InsertNode(unsigned int)
Reimplemented from QmitkDataStorageComboBox.
|
virtual |
Sets the combo box to the index that contains the specified node, or 0 if the node cannot be found.
void QmitkDataStorageComboBoxWithSelectNone::SetZeroEntryText | ( | const QString & | zeroEntryString | ) |
Set the string that will be present on index 0.
|
static |
Stores the string that will be present on index 0, currently equal to "please select".
Definition at line 64 of file QmitkDataStorageComboBoxWithSelectNone.h.
|
readwrite |
Definition at line 37 of file QmitkDataStorageComboBoxWithSelectNone.h.
|
readwrite |
Definition at line 36 of file QmitkDataStorageComboBoxWithSelectNone.h.