Slicer  4.11
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Member Functions | Protected Member Functions
qMRMLSceneCategoryModel Class Reference

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

Inheritance diagram for qMRMLSceneCategoryModel:
Inheritance graph
[legend]
Collaboration diagram for qMRMLSceneCategoryModel:
Collaboration graph
[legend]

Public Member Functions

int categoryCount () const
 
QStandardItem * itemFromCategory (const QString &category) const
 
 qMRMLSceneCategoryModel (QObject *parent=nullptr)
 
 ~qMRMLSceneCategoryModel () override
 
- Public Member Functions inherited from qMRMLSceneModel
virtual bool canBeAChild (vtkMRMLNode *node) const
 fast function that only check the type of the node to know if it can be a child. More...
 
virtual bool canBeAParent (vtkMRMLNode *node) const
 
int checkableColumn () const
 
bool dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) override
 
int extraItemColumn () const
 
int idColumn () const
 
QModelIndexList indexes (vtkMRMLNode *node) const
 
QModelIndex indexFromNode (vtkMRMLNode *node, int column=0) const
 
bool isAffiliatedNode (vtkMRMLNode *nodeA, vtkMRMLNode *nodeB) const
 
bool isParentNode (vtkMRMLNode *child, vtkMRMLNode *parent) const
 
QStandardItem * itemFromNode (vtkMRMLNode *node, int column=0) const
 
bool lazyUpdate () const
 
NodeTypes listenNodeModifiedEvent () const
 
QMimeData * mimeData (const QModelIndexList &indexes) const override
 
vtkMRMLNodemrmlNodeFromIndex (const QModelIndex &nodeIndex) const
 
vtkMRMLNodemrmlNodeFromItem (QStandardItem *nodeItem) const
 
Q_INVOKABLE vtkMRMLScenemrmlScene () const
 
QModelIndex mrmlSceneIndex () const
 invalid until a valid scene is set More...
 
QStandardItem * mrmlSceneItem () const
 0 until a valid scene is set More...
 
int nameColumn () const
 
virtual int nodeIndex (vtkMRMLNode *node) const
 
virtual void observeNode (vtkMRMLNode *node)
 
virtual vtkMRMLNodeparentNode (vtkMRMLNode *node) const
 
QStringList postItems (QStandardItem *parent) const
 
QStringList preItems (QStandardItem *parent) const
 
 qMRMLSceneModel (QObject *parent=nullptr)
 
virtual bool reparent (vtkMRMLNode *node, vtkMRMLNode *newParent)
 
void setCheckableColumn (int column)
 
void setExtraItemColumn (int column)
 
void setIDColumn (int column)
 
void setLazyUpdate (bool lazy)
 
void setListenNodeModifiedEvent (NodeTypes nodesToListen)
 
virtual Q_INVOKABLE void setMRMLScene (vtkMRMLScene *scene)
 0 by default More...
 
void setNameColumn (int column)
 
void setPostItems (const QStringList &extraItems, QStandardItem *parent)
 
void setPreItems (const QStringList &extraItems, QStandardItem *parent)
 
void setToolTipNameColumn (int column)
 
void setVisibilityColumn (int column)
 
Qt::DropActions supportedDropActions () const override
 
int toolTipNameColumn () const
 
int visibilityColumn () const
 
 ~qMRMLSceneModel () override
 

Protected Member Functions

virtual QStandardItem * insertCategory (const QString &category, int row)
 
QStandardItem * insertNode (vtkMRMLNode *node) override
 
virtual QStandardItem * insertNode (vtkMRMLNode *node, QStandardItem *parent, int row=-1)
 
virtual QStandardItem * insertNode (vtkMRMLNode *node)
 
bool isANode (const QStandardItem *item) const override
 
virtual void updateItemFromCategory (QStandardItem *item, const QString &category)
 
void updateItemFromNode (QStandardItem *item, vtkMRMLNode *node, int column) override
 
void updateNodeFromItem (vtkMRMLNode *node, QStandardItem *item) override
 
- Protected Member Functions inherited from qMRMLSceneModel
virtual QStandardItem * insertNode (vtkMRMLNode *node, QStandardItem *parent, int row=-1)
 
virtual int maxColumnId () const
 Must be reimplemented in subclasses that add new column types. More...
 
virtual QFlags< Qt::ItemFlag > nodeFlags (vtkMRMLNode *node, int column) const
 
virtual void populateScene ()
 
 qMRMLSceneModel (qMRMLSceneModelPrivate *pimpl, QObject *parent=nullptr)
 
virtual void updateItemDataFromNode (QStandardItem *item, vtkMRMLNode *node, int column)
 
virtual void updateNodeFromItemData (vtkMRMLNode *node, QStandardItem *item)
 
void updateNodeItems ()
 You shouldn't need to call this function. More...
 
void updateNodeItems (vtkMRMLNode *node, const QString &uid)
 Update the items associated with the node and uid. More...
 
virtual void updateScene ()
 

Additional Inherited Members

- Public Types inherited from qMRMLSceneModel
enum  ItemDataRole {
  UIDRole = Qt::UserRole + 1, PointerRole, ExtraItemsRole, VisibilityRole,
  LastRole
}
 
enum  NodeTypes { NoNodes = 0, AllNodes, OnlyVisibleNodes }
 
typedef QStandardItemModel Superclass
 
- Properties inherited from qMRMLSceneModel
int checkableColumn
 
int extraItemColumn
 
int idColumn
 
bool lazyUpdate
 
NodeTypes listenNodeModifiedEvent
 
int nameColumn
 
int toolTipNameColumn
 
int visibilityColumn
 
- Signals inherited from qMRMLSceneModel
void aboutToReparentByDragAndDrop (vtkMRMLNode *node, vtkMRMLNode *newParent)
 
void reparentedByDragAndDrop (vtkMRMLNode *node, vtkMRMLNode *newParent)
 
void sceneAboutToBeUpdated ()
 This signal is sent when the scene is about to be updated. More...
 
void sceneUpdated ()
 This signal is sent after the scene is updated. More...
 
- Protected Slots inherited from qMRMLSceneModel
virtual void delayedItemChanged ()
 
virtual void onItemChanged (QStandardItem *item)
 
void onMRMLNodeIDChanged (vtkObject *node, void *callData)
 
void onMRMLNodeModified (vtkObject *node)
 
virtual void onMRMLSceneAboutToBeClosed (vtkMRMLScene *scene)
 
virtual void onMRMLSceneAboutToBeImported (vtkMRMLScene *scene)
 
virtual void onMRMLSceneClosed (vtkMRMLScene *scene)
 
void onMRMLSceneDeleted (vtkObject *scene)
 
virtual void onMRMLSceneEndBatchProcess (vtkMRMLScene *scene)
 
virtual void onMRMLSceneImported (vtkMRMLScene *scene)
 
virtual void onMRMLSceneNodeAboutToBeAdded (vtkMRMLScene *scene, vtkMRMLNode *node)
 
virtual void onMRMLSceneNodeAboutToBeRemoved (vtkMRMLScene *scene, vtkMRMLNode *node)
 
virtual void onMRMLSceneNodeAdded (vtkMRMLScene *scene, vtkMRMLNode *node)
 
virtual void onMRMLSceneNodeRemoved (vtkMRMLScene *scene, vtkMRMLNode *node)
 
virtual void onMRMLSceneStartBatchProcess (vtkMRMLScene *scene)
 
void updateColumnCount ()
 
- Static Protected Member Functions inherited from qMRMLSceneModel
static void onMRMLSceneEvent (vtkObject *vtk_obj, unsigned long event, void *client_data, void *call_data)
 
- Protected Attributes inherited from qMRMLSceneModel
QScopedPointer< qMRMLSceneModelPrivate > d_ptr
 

Detailed Description

Definition at line 28 of file qMRMLSceneCategoryModel.h.

Constructor & Destructor Documentation

◆ qMRMLSceneCategoryModel()

qMRMLSceneCategoryModel::qMRMLSceneCategoryModel ( QObject *  parent = nullptr)

◆ ~qMRMLSceneCategoryModel()

qMRMLSceneCategoryModel::~qMRMLSceneCategoryModel ( )
override

Member Function Documentation

◆ categoryCount()

int qMRMLSceneCategoryModel::categoryCount ( ) const

◆ insertCategory()

virtual QStandardItem* qMRMLSceneCategoryModel::insertCategory ( const QString &  category,
int  row 
)
protectedvirtual

◆ insertNode() [1/3]

QStandardItem* qMRMLSceneCategoryModel::insertNode ( vtkMRMLNode node)
overrideprotectedvirtual

Reimplemented from qMRMLSceneModel.

◆ insertNode() [2/3]

virtual QStandardItem* qMRMLSceneModel::insertNode
protected

◆ insertNode() [3/3]

virtual QStandardItem* qMRMLSceneModel::insertNode
protected

◆ isANode()

bool qMRMLSceneCategoryModel::isANode ( const QStandardItem *  item) const
overrideprotectedvirtual

Reimplemented from qMRMLSceneModel.

◆ itemFromCategory()

QStandardItem* qMRMLSceneCategoryModel::itemFromCategory ( const QString &  category) const

◆ updateItemFromCategory()

virtual void qMRMLSceneCategoryModel::updateItemFromCategory ( QStandardItem *  item,
const QString &  category 
)
protectedvirtual

◆ updateItemFromNode()

void qMRMLSceneCategoryModel::updateItemFromNode ( QStandardItem *  item,
vtkMRMLNode node,
int  column 
)
overrideprotectedvirtual

Generic function that updates the item data and flags from the node. You probably want to reimplement updateItemDataFromNode() instead.

See also
updateNodeFromItemData, updateNodeFromItem, updateItemDataFromNode, nodeFlags

Reimplemented from qMRMLSceneModel.

Reimplemented in qMRMLSceneColorTableModel.

◆ updateNodeFromItem()

void qMRMLSceneCategoryModel::updateNodeFromItem ( vtkMRMLNode node,
QStandardItem *  item 
)
overrideprotectedvirtual

Generic function that updates the node from the item data and flags. You probably want to reimplement updateNodeFromItemData() instead.

See also
updateItemDataFromNode, updateNodeFromItemData, updateItemFromNode, nodeFlags

Reimplemented from qMRMLSceneModel.


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