Slicer
4.10
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
Subject hierarchy folder plugin. More...
#include <Modules/Loadable/SubjectHierarchy/Widgets/qSlicerSubjectHierarchyFolderPlugin.h>
Public Types | |
typedef qSlicerSubjectHierarchyAbstractPlugin | Superclass |
Public Types inherited from qSlicerSubjectHierarchyAbstractPlugin | |
typedef QObject | Superclass |
Public Slots | |
void | onDataNodeAssociatedToHierarchyNode (vtkObject *dataNodeObject) |
Public Member Functions | |
virtual bool | addNodeToSubjectHierarchy (vtkMRMLNode *node, vtkIdType parentItemID) |
virtual double | canAddNodeToSubjectHierarchy (vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const |
virtual double | canOwnSubjectHierarchyItem (vtkIdType itemID) const |
virtual double | canReparentItemInsideSubjectHierarchy (vtkIdType itemID, vtkIdType parentItemID) const |
Q_INVOKABLE QString | colorItemAttributeName () const |
Name of color attribute in folder subject hierarchy items. More... | |
Q_INVOKABLE vtkIdType | createFolderUnderItem (vtkIdType parentItemID) |
virtual void | editProperties (vtkIdType itemID) |
Open module belonging to item and set inputs in opened module. More... | |
virtual QColor | getDisplayColor (vtkIdType itemID, QMap< int, QVariant > &terminologyMetaData) const |
Q_INVOKABLE vtkMRMLHierarchyNode * | hierarchyNodeForItem (vtkIdType itemID) |
virtual QIcon | icon (vtkIdType itemID) |
virtual QList< QAction * > | itemContextMenuActions () const |
Get item context menu item actions to add to tree view. More... | |
Q_INVOKABLE vtkIdType | itemForHierarchyNode (vtkMRMLHierarchyNode *hierarchyNode) |
qSlicerSubjectHierarchyFolderPlugin (QObject *parent=NULL) | |
virtual bool | reparentItemInsideSubjectHierarchy (vtkIdType itemID, vtkIdType parentItemID) |
Q_INVOKABLE bool | resolveHierarchies () |
Q_INVOKABLE bool | resolveHierarchyForItem (vtkIdType itemID) |
virtual Q_INVOKABLE const QString | roleForPlugin () const |
virtual QList< QAction * > | sceneContextMenuActions () const |
virtual void | setDisplayColor (vtkIdType itemID, QColor color, QMap< int, QVariant > terminologyMetaData) |
virtual void | showContextMenuActionsForItem (vtkIdType itemID) |
virtual void | showVisibilityContextMenuActionsForItem (vtkIdType itemID) |
virtual QList< QAction * > | visibilityContextMenuActions () const |
virtual QIcon | visibilityIcon (int visible) |
Get visibility icon for a visibility state. More... | |
virtual | ~qSlicerSubjectHierarchyFolderPlugin () |
Public Member Functions inherited from qSlicerSubjectHierarchyAbstractPlugin | |
virtual QString | displayedItemName (vtkIdType itemID) const |
virtual Q_INVOKABLE int | getDisplayVisibility (vtkIdType itemID) const |
virtual const QString | helpText () const |
Get help text for plugin to be added in subject hierarchy module widget help box. More... | |
Q_INVOKABLE bool | isThisPluginOwnerOfItem (vtkIdType itemID) const |
Determines if the item is owned by this plugin. More... | |
virtual QString | name () const |
Get the name of the plugin. More... | |
qSlicerSubjectHierarchyAbstractPlugin (QObject *parent=NULL) | |
virtual Q_INVOKABLE void | setDisplayVisibility (vtkIdType itemID, int visible) |
Set display visibility of an owned subject hierarchy item. More... | |
virtual void | setName (QString name) |
virtual Q_INVOKABLE QString | tooltip (vtkIdType itemID) const |
Generate tooltip for a owned subject hierarchy item. More... | |
virtual | ~qSlicerSubjectHierarchyAbstractPlugin () |
Protected Slots | |
void | createFolderUnderCurrentNode () |
Create folder node under current node. More... | |
void | createFolderUnderScene () |
Create folder node under the scene. More... | |
void | onApplyColorToBranchToggled (bool) |
Toggle apply color to branch. More... | |
void | onHierarchyNodeChildNodeAdded (vtkObject *parentNodeObject, vtkObject *childNodeObject) |
Protected Member Functions | |
void | callModifiedOnModelNodesInCurrentBranch () |
vtkMRMLModelDisplayNode * | modelDisplayNodeForItem (vtkIdType itemID) const |
Protected Member Functions inherited from qSlicerSubjectHierarchyAbstractPlugin | |
void | hideAllContextMenuActions () const |
Protected Attributes | |
QScopedPointer< qSlicerSubjectHierarchyFolderPluginPrivate > | d_ptr |
Protected Attributes inherited from qSlicerSubjectHierarchyAbstractPlugin | |
QString | m_Name |
Name of the plugin. More... | |
Additional Inherited Members | |
Properties inherited from qSlicerSubjectHierarchyAbstractPlugin | |
QString | name |
Signals inherited from qSlicerSubjectHierarchyAbstractPlugin | |
void | requestExpandItem (vtkIdType itemID) |
Signal requesting expanding of the subject hierarchy tree item belonging to an item. More... | |
void | requestInvalidateFilter () const |
Static Public Member Functions inherited from qSlicerSubjectHierarchyAbstractPlugin | |
static Q_INVOKABLE qSlicerAbstractModuleWidget * | switchToModule (QString moduleName) |
Subject hierarchy folder plugin.
Definition at line 90 of file qSlicerSubjectHierarchyFolderPlugin.h.
Definition at line 97 of file qSlicerSubjectHierarchyFolderPlugin.h.
qSlicerSubjectHierarchyFolderPlugin::qSlicerSubjectHierarchyFolderPlugin | ( | QObject * | parent = NULL | ) |
|
virtual |
|
virtual |
Add a node to subject hierarchy under a specified parent. This is basically a convenience function to call
node | Node to add to subject hierarchy |
parentItemID | Parent item of the added node |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
protected |
|
virtual |
Determines if a data node can be placed in the hierarchy using the actual plugin, and gets a confidence value for a certain MRML node (usually the type and possibly attributes are checked).
node | Node to be added to the hierarchy |
parentItemID | Prospective parent of the node to add. Default value is invalid. In that case the parent will be ignored, the confidence numbers are got based on the to-be child node alone. |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Determines if the actual plugin can handle a subject hierarchy item. The plugin with the highest confidence number will "own" the item in the subject hierarchy (set icon, tooltip, set context menu etc.)
item | Item to handle in the subject hierarchy tree |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Determines if a subject hierarchy item can be reparented in the hierarchy using the current plugin, and gets a confidence value for the reparented item. Most plugins do not perform steps additional to the default, so the default implementation returns a 0 confidence value, which can be overridden in plugins that do handle special cases.
itemID | Item to be reparented in the hierarchy |
parentItemID | Prospective parent of the item to reparent. |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
inline |
Name of color attribute in folder subject hierarchy items.
Definition at line 215 of file qSlicerSubjectHierarchyFolderPlugin.h.
|
protectedslot |
Create folder node under current node.
Q_INVOKABLE vtkIdType qSlicerSubjectHierarchyFolderPlugin::createFolderUnderItem | ( | vtkIdType | parentItemID | ) |
Create folder under specified item
parentNode | Parent item for folder to create |
|
protectedslot |
Create folder node under the scene.
|
virtual |
Open module belonging to item and set inputs in opened module.
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Get display color of an owned subject hierarchy item In case of folders only color is set but no terminology. The properties are not used directly, but only if applied to the branch (similarly to how it worked in model hierarchies).
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
Q_INVOKABLE vtkMRMLHierarchyNode* qSlicerSubjectHierarchyFolderPlugin::hierarchyNodeForItem | ( | vtkIdType | itemID | ) |
Get hierarchy node for subject hierarchy item. The item can be associated directly to a hierarchy node (if it's an intermediate hierarchy node), or it can be associated to a data node that is associated to a hierarchy node.
|
virtual |
Get icon of an owned subject hierarchy item
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Get item context menu item actions to add to tree view.
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
Q_INVOKABLE vtkIdType qSlicerSubjectHierarchyFolderPlugin::itemForHierarchyNode | ( | vtkMRMLHierarchyNode * | hierarchyNode | ) |
Get subject hierarchy item for a hierarchy node. The item can be associated directly to a hierarchy node (if it's an intermediate hierarchy node), or it can be associated to a data node that is associated to a hierarchy node.
|
protected |
Retrieve model display node for given item. If the folder item has an associated model display node (created by the plugin, then return that). Otherwise see if it has a model hierarchy node with a display node.
|
protectedslot |
Toggle apply color to branch.
|
slot |
Called when hierarchy modified event is invoked for a data node Ensures that if a hierarchy node gets associated to a data node, then the item for the hierarchy node is removed from subject hierarchy (the logic implemented in the folder plugin handles data nodes with hierarchy nodes)
|
protectedslot |
Called when child node was added to hierarchy node Ensures that the hierarchy specified by node hierarchies are mirrored in subject hierarchy
|
virtual |
Reparent an item that was already in the subject hierarchy under a new parent.
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
Q_INVOKABLE bool qSlicerSubjectHierarchyFolderPlugin::resolveHierarchies | ( | ) |
Resolve all node hierarchy items in the scene. Traverses scene for hierarchy nodes, and makes sure the same parents are set in subject hierarchy
Q_INVOKABLE bool qSlicerSubjectHierarchyFolderPlugin::resolveHierarchyForItem | ( | vtkIdType | itemID | ) |
Add the item for the hierarchy node to the proper place in subject hierarchy. If the parent node hierarchy item does not exist yet, add that too, all the way to the scene
|
virtual |
Get role that the plugin assigns to the subject hierarchy item. Each plugin should provide only one role.
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Get scene context menu item actions to add to tree view Separate method is needed for the scene, as its actions are set to the tree by a different method
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Set display color of an owned subject hierarchy item In case of folders only color is set but no terminology. The properties are not used directly, but only if applied to the branch (similarly to how it worked in model hierarchies).
color | Display color to set |
terminologyMetaData | Map containing terminology meta data. Not used in this plugin |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Show context menu actions valid for a given subject hierarchy item.
itemID | Subject Hierarchy item to show the context menu items for |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Show visibility context menu actions valid for a given subject hierarchy item.
itemID | Subject Hierarchy item to show the visibility context menu items for |
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Get visibility context menu item actions to add to tree view. These item visibility context menu actions can be shown in the implementations of
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
virtual |
Get visibility icon for a visibility state.
Reimplemented from qSlicerSubjectHierarchyAbstractPlugin.
|
protected |
Definition at line 247 of file qSlicerSubjectHierarchyFolderPlugin.h.