23#ifndef __qSlicerSubjectHierarchyAbstractPlugin_h
24#define __qSlicerSubjectHierarchyAbstractPlugin_h
37#include "qSlicerSubjectHierarchyModuleWidgetsExport.h"
50 this->Terminology.clear();
51 this->DefaultTerminology.clear();
53 this->NameAutoGenerated =
false;
54 this->ColorAutoGenerated =
true;
55 this->GeneratedColor = QColor();
57 this->HasTerminology =
false;
58 this->HasDefaultTerminology =
false;
59 this->HasName =
false;
60 this->HasNameAutoGenerated =
false;
61 this->HasColorAutoGenerated =
false;
62 this->HasGeneratedColor =
false;
68 this->HasTerminology =
true;
74 this->HasDefaultTerminology =
true;
86 this->HasNameAutoGenerated =
true;
92 this->HasColorAutoGenerated =
true;
98 this->HasGeneratedColor =
true;
103 bool hasName()
const {
return this->HasName; }
110 const QString&
name()
const {
return this->Name; }
117 QString DefaultTerminology;
119 bool NameAutoGenerated{
false };
120 bool ColorAutoGenerated{
true };
121 QColor GeneratedColor;
123 bool HasTerminology{
false };
124 bool HasDefaultTerminology{
false };
125 bool HasName{
false };
126 bool HasNameAutoGenerated{
false };
127 bool HasColorAutoGenerated{
false };
128 bool HasGeneratedColor{
false };
187 Q_INVOKABLE virtual QIcon
icon(vtkIdType itemID);
210 Q_INVOKABLE virtual QString
tooltip(vtkIdType itemID) const;
228 Q_INVOKABLE
void setDisplayColor(vtkIdType itemID, QColor color,
QMap<
int, QVariant> terminologyMetadata);
371 Q_INVOKABLE
static void setActionPosition(QAction* action,
int section,
int weight = 0,
double weightAdjustment = 0.0);
379 bool useSelectedColor,
380 bool disableScalarVisibility);
virtual Q_INVOKABLE QList< QAction * > transformContextMenuActions() const
void requestExpandItem(vtkIdType itemID)
Signal requesting expanding of the subject hierarchy tree item belonging to an item.
friend class qSlicerSubjectHierarchyPluginLogic
Q_INVOKABLE QColor colorAndTerminologyFromDisplayableNode(vtkIdType itemID, qSlicerTerminologyMetadata &terminologyMetadata, bool useSelectedColor) const
static Q_INVOKABLE void setActionPosition(QAction *action, int section, int weight=0, double weightAdjustment=0.0)
virtual void setName(QString name)
virtual Q_INVOKABLE QList< QAction * > itemContextMenuActions() const
Q_INVOKABLE void setColorAndTerminologyToDisplayableNode(vtkIdType itemID, QColor color, const qSlicerTerminologyMetadata &terminologyMetadata, bool useSelectedColor, bool disableScalarVisibility)
virtual Q_INVOKABLE QList< QAction * > viewContextMenuActions() const
virtual Q_INVOKABLE void showTransformContextMenuActionsForItem(vtkIdType itemID)
qSlicerSubjectHierarchyAbstractPlugin(QObject *parent=nullptr)
virtual Q_INVOKABLE QList< QAction * > visibilityContextMenuActions() const
virtual Q_INVOKABLE double canReparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID) const
virtual Q_INVOKABLE void setDisplayVisibility(vtkIdType itemID, int visible)
Set display visibility of an owned subject hierarchy item.
void requestInvalidateFilter() const
virtual Q_INVOKABLE QList< QAction * > sceneContextMenuActions() const
Q_INVOKABLE bool isThisPluginOwnerOfItem(vtkIdType itemID) const
Determines if the item is owned by this plugin.
void hideAllContextMenuActions() const
virtual Q_INVOKABLE const QString roleForPlugin() const
virtual QString name() const
Get the name of the plugin.
virtual Q_INVOKABLE QIcon visibilityIcon(int visible)
Get visibility icon for a visibility state.
virtual Q_INVOKABLE QString displayedItemName(vtkIdType itemID) const
virtual Q_INVOKABLE bool addNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID)
QString m_Name
Name of the plugin.
virtual Q_INVOKABLE QString tooltip(vtkIdType itemID) const
Generate tooltip for a owned subject hierarchy item.
static Q_INVOKABLE qSlicerAbstractModuleWidget * switchToModule(QString moduleName)
virtual Q_INVOKABLE bool reparentItemInsideSubjectHierarchy(vtkIdType itemID, vtkIdType parentItemID)
virtual Q_INVOKABLE bool showItemInView(vtkIdType itemID, vtkMRMLAbstractViewNode *viewNode, vtkIdList *allItemsToShow)
virtual Q_INVOKABLE void setDisplayColor(vtkIdType itemID, QColor color, const qSlicerTerminologyMetadata &terminologyMetadata=qSlicerTerminologyMetadata())
virtual Q_INVOKABLE QColor getDisplayColor(vtkIdType itemID, qSlicerTerminologyMetadata &terminologyMetadata) const
virtual Q_INVOKABLE int getDisplayVisibility(vtkIdType itemID) const
virtual Q_INVOKABLE QIcon visibilityIconWithParentHidden(int visible)
virtual Q_INVOKABLE void showViewContextMenuActionsForItem(vtkIdType itemID, QVariantMap eventData)
virtual Q_INVOKABLE void showVisibilityContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE void editProperties(vtkIdType itemID)
Open module belonging to item and set inputs in opened module.
virtual Q_INVOKABLE bool canEditProperties(vtkIdType itemID)
Returns true if the module can edit properties of this item using editProperties.
virtual Q_INVOKABLE void showContextMenuActionsForItem(vtkIdType itemID)
virtual Q_INVOKABLE QIcon icon(vtkIdType itemID)
@ SectionNode
Actions for the selected node.
@ SectionTop
Use this section to make items appear at the top of the menu.
@ SectionBottom
Use this section to make items appear at the bottom of the menu.
@ SectionDefault
By default (if no position is defined) actions will appear in this section.
@ SectionInteraction
Actions for changing the current interaction mode (in view context menu).
@ SectionComponent
Actions for the selected node component (e.g., control point within a node).
@ SectionFolder
Actions for the selected folder.
static QIcon applyParentHiddenEffect(const QIcon &icon)
virtual Q_INVOKABLE double canAddNodeToSubjectHierarchy(vtkMRMLNode *node, vtkIdType parentItemID=vtkMRMLSubjectHierarchyNode::INVALID_ITEM_ID) const
virtual Q_INVOKABLE double canOwnSubjectHierarchyItem(vtkIdType itemID) const
friend class qMRMLSubjectHierarchyTreeView
Abstract MRML node to represent a view. The class holds the properties common to any view type (3D,...
Abstract Superclass for all specific types of MRML nodes.
static const vtkIdType INVALID_ITEM_ID