23 #ifndef __qMRMLSubjectHierarchyComboBox_h 24 #define __qMRMLSubjectHierarchyComboBox_h 27 #include <ctkComboBox.h> 30 #include "qSlicerSubjectHierarchyModuleWidgetsExport.h" 34 class qMRMLSubjectHierarchyComboBoxPrivate;
48 Q_PROPERTY(
bool showRootItem READ showRootItem WRITE setShowRootItem)
52 Q_PROPERTY(
bool highlightReferencedItems READ highlightReferencedItems WRITE setHighlightReferencedItems)
54 Q_PROPERTY(
int maximumNumberOfShownItems READ maximumNumberOfShownItems WRITE setMaximumNumberOfShownItems)
58 Q_PROPERTY(
bool alignPopupVertically READ alignPopupVertically WRITE setAlignPopupVertically)
61 Q_PROPERTY(QStringList includeItemAttributeNamesFilter READ includeItemAttributeNamesFilter WRITE setIncludeItemAttributeNamesFilter)
63 Q_PROPERTY(QStringList includeNodeAttributeNamesFilter READ includeNodeAttributeNamesFilter WRITE setIncludeNodeAttributeNamesFilter)
66 Q_PROPERTY(QStringList excludeItemAttributeNamesFilter READ excludeItemAttributeNamesFilter WRITE setExcludeItemAttributeNamesFilter)
69 Q_PROPERTY(QStringList excludeNodeAttributeNamesFilter READ excludeNodeAttributeNamesFilter WRITE setExcludeNodeAttributeNamesFilter)
73 Q_PROPERTY(QString attributeNameFilter READ attributeNameFilter WRITE setAttributeNameFilter)
78 Q_PROPERTY(QString attributeValueFilter READ attributeValueFilter WRITE setAttributeValueFilter)
89 Q_INVOKABLE
void clearSelection();
90 Q_INVOKABLE vtkIdType currentItem()const;
91 Q_INVOKABLE vtkIdType rootItem()const;
93 void setShowRootItem(
bool show);
94 bool showRootItem()const;
96 bool highlightReferencedItems()const;
97 void setHighlightReferencedItems(
bool highlightOn);
99 int maximumNumberOfShownItems()const;
100 void setMaximumNumberOfShownItems(
int maxNumberOfShownItems);
102 bool alignPopupVertically()const;
103 void setAlignPopupVertically(
bool align);
105 QStringList includeItemAttributeNamesFilter()const;
106 QStringList includeNodeAttributeNamesFilter()const;
107 QStringList excludeItemAttributeNamesFilter()const;
108 QStringList excludeNodeAttributeNamesFilter()const;
109 QString attributeValueFilter()const;
110 QString attributeNameFilter()const;
118 Q_INVOKABLE
void addItemAttributeFilter(QString attributeName, QVariant attributeValue=QString(),
bool include=true);
120 Q_INVOKABLE
void removeItemAttributeFilter(QString attributeName, QVariant attributeValue,
bool include);
122 Q_INVOKABLE
void removeItemAttributeFilter(QString attributeName,
bool include);
131 Q_INVOKABLE
void addNodeAttributeFilter(QString attributeName, QVariant attributeValue=QString(),
bool include=true, QString className=QString());
133 Q_INVOKABLE
void removeNodeAttributeFilter(QString attributeName, QVariant attributeValue,
bool include, QString className);
135 Q_INVOKABLE
void removeNodeAttributeFilter(QString attributeName,
bool include);
139 Q_INVOKABLE
void setLevelFilter(QStringList &levelFilter);
141 Q_INVOKABLE
void setNodeTypes(const QStringList& types);
144 Q_INVOKABLE
void setHideChildNodeTypes(const QStringList& types);
151 void showPopup() override;
158 virtual
void setCurrentItem(vtkIdType itemID);
161 virtual
void setRootItem(vtkIdType itemID);
166 void setPluginWhitelist(QStringList whitelist);
170 void setPluginBlacklist(QStringList blacklist);
173 void disablePlugin(QString plugin);
175 void setIncludeItemAttributeNamesFilter(QStringList filter);
176 void setIncludeNodeAttributeNamesFilter(QStringList filter);
177 void setExcludeItemAttributeNamesFilter(QStringList filter);
178 void setExcludeNodeAttributeNamesFilter(QStringList filter);
179 void setAttributeNameFilter(QString& filter);
180 void setAttributeValueFilter(QString& filter);
183 void currentItemChanged(vtkIdType);
184 void currentItemModified(vtkIdType);
187 void updateComboBoxTitleAndIcon(vtkIdType selectedShItemID);
191 void mousePressEvent(QMouseEvent* event) override;
194 QScopedPointer<qMRMLSubjectHierarchyComboBoxPrivate> d_ptr;
MRML node to represent a complete subject hierarchy tree.
A set of MRML Nodes that supports serialization and undo/redo.
Item model for subject hierarchy.