Slicer  5.1
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Public Slots | Signals | Public Member Functions
qMRMLCheckableNodeComboBox Class Reference

#include <Libs/MRML/Widgets/qMRMLCheckableNodeComboBox.h>

Inheritance diagram for qMRMLCheckableNodeComboBox:
Inheritance graph
Collaboration diagram for qMRMLCheckableNodeComboBox:
Collaboration graph

Public Types

typedef qMRMLNodeComboBox Superclass
 Superclass typedef. More...
- Public Types inherited from qMRMLNodeComboBox
typedef QWidget Superclass

Public Slots

void check (vtkMRMLNode *node)
 Set the check state of the node to Qt::Checked. More...
void uncheck (vtkMRMLNode *node)
 Set the check state of the node to Qt::Unchecked. More...
- Public Slots inherited from qMRMLNodeComboBox
virtual vtkMRMLNodeaddNode (QString nodeType)
 Creates a node of the same type as in the "node types" property. More...
virtual vtkMRMLNodeaddNode ()
 Creates a node of the same type as the first in the "node types" property. More...
virtual void editCurrentNode ()
 Edits the currently selected node. More...
virtual void removeCurrentNode ()
virtual void renameCurrentNode ()
void setCurrentNode (vtkMRMLNode *node)
 Select the node to be current. More...
void setCurrentNode (const QString &nodeID)
void setCurrentNodeID (const QString &nodeID)
void setCurrentNodeIndex (int index)
virtual void setMRMLScene (vtkMRMLScene *scene)


void checkedNodesChanged ()
 Signal fired anytime a node is checked or unchecked. More...
- Signals inherited from qMRMLNodeComboBox
void currentNodeChanged (vtkMRMLNode *node)
void currentNodeChanged (bool validNode)
void currentNodeIDChanged (const QString &id)
void currentNodeRenamed (const QString &newName)
 Signal emitted when the current node is renamed. More...
void nodeAboutToBeEdited (vtkMRMLNode *node)
 Signal emitted when edit node menu action is selected. More...
void nodeAboutToBeRemoved (vtkMRMLNode *node)
void nodeActivated (vtkMRMLNode *node)
void nodeAdded (vtkMRMLNode *node)
void nodeAddedByUser (vtkMRMLNode *node)
 Signal emitted when node is added by the user. More...

Public Member Functions

Q_INVOKABLE bool allChecked () const
Q_INVOKABLE QList< vtkMRMLNode * > checkedNodes () const
Q_INVOKABLE Qt::CheckState checkState (vtkMRMLNode *node) const
Q_INVOKABLE bool noneChecked () const
 qMRMLCheckableNodeComboBox (QWidget *parent=nullptr)
Q_INVOKABLE void setCheckState (vtkMRMLNode *node, Qt::CheckState check)
Q_INVOKABLE void setUserCheckable (vtkMRMLNode *node, bool userCheckable)
Q_INVOKABLE QList< vtkMRMLNode * > uncheckedNodes () const
 ~qMRMLCheckableNodeComboBox () override
- Public Member Functions inherited from qMRMLNodeComboBox
Q_INVOKABLE void addAttribute (const QString &nodeType, const QString &attributeName, const QVariant &attributeValue=QVariant())
bool addEnabled () const
virtual Q_INVOKABLE void addMenuAction (QAction *newAction)
QString baseName (const QString &nodeType="") const
Q_INVOKABLE vtkMRMLNodecurrentNode () const
 Return the currently selected node. 0 if no node is selected. More...
QString currentNodeID () const
Q_INVOKABLE QString currentNodeId () const
bool editEnabled () const
QStringList hideChildNodeTypes () const
virtual QString interactionNodeSingletonTag () const
QAbstractItemModel * model () const
Q_INVOKABLE vtkMRMLScenemrmlScene () const
Q_INVOKABLE int nodeCount () const
qMRMLNodeFactorynodeFactory () const
Q_INVOKABLE vtkMRMLNodenodeFromIndex (int index) const
QList< vtkMRMLNode * > nodes () const
 Return a list of all the nodes that are displayed in the combo box. More...
Q_INVOKABLE QString nodeTypeLabel (const QString &nodeType) const
QStringList nodeTypes () const
QString noneDisplay () const
bool noneEnabled () const
 qMRMLNodeComboBox (QWidget *parent=nullptr)
Q_INVOKABLE void removeAttribute (const QString &nodeType, const QString &attributeName)
bool removeEnabled () const
bool renameEnabled () const
 Allow the user to rename the node. More...
qMRMLSceneModelsceneModel () const
bool selectNodeUponCreation () const
void setAddEnabled (bool enable)
void setBaseName (const QString &baseName, const QString &nodeType="")
void setEditEnabled (bool enable)
void setHideChildNodeTypes (const QStringList &nodeTypes)
virtual void setInteractionNodeSingletonTag (const QString &tag)
Q_INVOKABLE void setNodeTypeLabel (const QString &label, const QString &nodeType)
void setNodeTypes (const QStringList &nodeTypes)
void setNoneDisplay (const QString &displayName)
void setNoneEnabled (bool enable)
void setRemoveEnabled (bool enable)
void setRenameEnabled (bool enable)
void setSelectNodeUponCreation (bool value)
void setShowChildNodeTypes (bool show)
void setShowHidden (bool)
void setSizeAdjustPolicy (QComboBox::SizeAdjustPolicy policy)
bool showChildNodeTypes () const
bool showHidden () const
QComboBox::SizeAdjustPolicy sizeAdjustPolicy () const
Q_INVOKABLE qMRMLSortFilterProxyModelsortFilterProxyModel () const
 ~qMRMLNodeComboBox () override

Additional Inherited Members

- Properties inherited from qMRMLNodeComboBox
bool addEnabled
QString baseName
QString currentNodeId
QString currentNodeID
bool editEnabled
QStringList hideChildNodeTypes
QString interactionNodeSingletonTag
QStringList nodeTypes
QString noneDisplay
bool noneEnabled
bool removeEnabled
bool renameEnabled
bool selectNodeUponCreation
bool showChildNodeTypes
bool showHidden
QComboBox::SizeAdjustPolicy sizeAdjustPolicy
- Protected Slots inherited from qMRMLNodeComboBox
void activateExtraItem (const QModelIndex &index)
void emitCurrentNodeChanged ()
void emitNodeActivated (int currentIndex)
void emitNodesAboutToBeRemoved (const QModelIndex &parent, int start, int end)
void emitNodesAdded (const QModelIndex &parent, int start, int end)
void refreshIfCurrentNodeHidden ()
- Protected Member Functions inherited from qMRMLNodeComboBox
void changeEvent (QEvent *event) override
QComboBox * comboBox () const
 qMRMLNodeComboBox (QAbstractItemModel *model, QWidget *parent=nullptr)
 qMRMLNodeComboBox will not take ownership on the model. More...
 qMRMLNodeComboBox (qMRMLNodeComboBoxPrivate *pimpl, QWidget *parent=nullptr)
QAbstractItemModel * rootModel () const
void setComboBox (QComboBox *comboBox)
- Protected Attributes inherited from qMRMLNodeComboBox
QScopedPointer< qMRMLNodeComboBoxPrivate > d_ptr

Detailed Description

This class provides the ability to select(check) multiple nodes at a time instead of one (qMRMLNodeComboBox). Nodes are left untouched, the selection information only resides in the combobox. Nodes are unchecked by default.

See also

Definition at line 34 of file qMRMLCheckableNodeComboBox.h.

Member Typedef Documentation

◆ Superclass

Superclass typedef.

Definition at line 40 of file qMRMLCheckableNodeComboBox.h.

Constructor & Destructor Documentation

◆ qMRMLCheckableNodeComboBox()

qMRMLCheckableNodeComboBox::qMRMLCheckableNodeComboBox ( QWidget *  parent = nullptr)

Construct an empty qMRMLCheckableNodeComboBox with a null scene, no nodeType, where the hidden nodes are not forced on display.

◆ ~qMRMLCheckableNodeComboBox()

qMRMLCheckableNodeComboBox::~qMRMLCheckableNodeComboBox ( )

Member Function Documentation

◆ allChecked()

Q_INVOKABLE bool qMRMLCheckableNodeComboBox::allChecked ( ) const

Return true if all the nodes are checked. If empty, return true;

◆ check

void qMRMLCheckableNodeComboBox::check ( vtkMRMLNode node)

Set the check state of the node to Qt::Checked.

Definition at line 90 of file qMRMLCheckableNodeComboBox.h.

◆ checkedNodes()

Q_INVOKABLE QList<vtkMRMLNode*> qMRMLCheckableNodeComboBox::checkedNodes ( ) const

Return the list of checked nodes.

See also
uncheckedNodes(), nodes()

◆ checkedNodesChanged

void qMRMLCheckableNodeComboBox::checkedNodesChanged ( )

Signal fired anytime a node is checked or unchecked.

◆ checkState()

Q_INVOKABLE Qt::CheckState qMRMLCheckableNodeComboBox::checkState ( vtkMRMLNode node) const

Return the checkstate of the node. If node is invalid (null or not in the scene), Qt::Unchecked is returned.

◆ noneChecked()

Q_INVOKABLE bool qMRMLCheckableNodeComboBox::noneChecked ( ) const

Return true if all the nodes are unchecked. If empty, return true.

◆ setCheckState()

Q_INVOKABLE void qMRMLCheckableNodeComboBox::setCheckState ( vtkMRMLNode node,
Qt::CheckState  check 

◆ setUserCheckable()

Q_INVOKABLE void qMRMLCheckableNodeComboBox::setUserCheckable ( vtkMRMLNode node,
bool  userCheckable 

Set the node item as user checkable or not. By default, the items are user checkable.

◆ uncheck

void qMRMLCheckableNodeComboBox::uncheck ( vtkMRMLNode node)

Set the check state of the node to Qt::Unchecked.

Definition at line 96 of file qMRMLCheckableNodeComboBox.h.

◆ uncheckedNodes()

Q_INVOKABLE QList<vtkMRMLNode*> qMRMLCheckableNodeComboBox::uncheckedNodes ( ) const

Return the list of unchecked nodes.

See also
checkedNodes(), nodes()

The documentation for this class was generated from the following file: