23 #ifndef __qMRMLSubjectHierarchyComboBox_h 24 #define __qMRMLSubjectHierarchyComboBox_h 27 #include <ctkComboBox.h> 28 #include <ctkVTKObject.h> 31 #include "qSlicerSubjectHierarchyModuleWidgetsExport.h" 35 class qMRMLSubjectHierarchyComboBoxPrivate;
50 Q_PROPERTY(
bool showRootItem READ showRootItem WRITE setShowRootItem)
54 Q_PROPERTY(
bool highlightReferencedItems READ highlightReferencedItems WRITE setHighlightReferencedItems)
56 Q_PROPERTY(
int maximumNumberOfShownItems READ maximumNumberOfShownItems WRITE setMaximumNumberOfShownItems)
60 Q_PROPERTY(
bool alignPopupVertically READ alignPopupVertically WRITE setAlignPopupVertically)
63 Q_PROPERTY(
bool noneEnabled READ noneEnabled WRITE setNoneEnabled)
67 Q_PROPERTY(QString noneDisplay READ noneDisplay WRITE setNoneDisplay)
71 Q_PROPERTY(
bool showCurrentItemParents READ showCurrentItemParents WRITE setShowCurrentItemParents)
76 Q_PROPERTY(
bool showEmptyHierarchyItems READ showEmptyHierarchyItems WRITE setShowEmptyHierarchyItems)
79 Q_PROPERTY(QStringList includeItemAttributeNamesFilter READ includeItemAttributeNamesFilter WRITE setIncludeItemAttributeNamesFilter)
81 Q_PROPERTY(QStringList includeNodeAttributeNamesFilter READ includeNodeAttributeNamesFilter WRITE setIncludeNodeAttributeNamesFilter)
84 Q_PROPERTY(QStringList excludeItemAttributeNamesFilter READ excludeItemAttributeNamesFilter WRITE setExcludeItemAttributeNamesFilter)
87 Q_PROPERTY(QStringList excludeNodeAttributeNamesFilter READ excludeNodeAttributeNamesFilter WRITE setExcludeNodeAttributeNamesFilter)
91 Q_PROPERTY(QString attributeNameFilter READ attributeNameFilter WRITE setAttributeNameFilter)
96 Q_PROPERTY(QString attributeValueFilter READ attributeValueFilter WRITE setAttributeValueFilter)
107 Q_INVOKABLE
void clearSelection();
108 Q_INVOKABLE vtkIdType currentItem()const;
109 Q_INVOKABLE vtkIdType rootItem()const;
111 void setShowRootItem(
bool show);
112 bool showRootItem()const;
114 bool highlightReferencedItems()const;
115 void setHighlightReferencedItems(
bool highlightOn);
117 int maximumNumberOfShownItems()const;
118 void setMaximumNumberOfShownItems(
int maxNumberOfShownItems);
120 bool alignPopupVertically()const;
121 void setAlignPopupVertically(
bool align);
123 bool noneEnabled()const;
124 void setNoneEnabled(
bool enable);
126 QString noneDisplay()const;
127 void setNoneDisplay(const QString& displayName);
129 bool showCurrentItemParents()const;
130 void setShowCurrentItemParents(
bool enable);
132 bool showEmptyHierarchyItems()const;
133 void setShowEmptyHierarchyItems(
bool show);
135 QStringList includeItemAttributeNamesFilter()const;
136 QStringList includeNodeAttributeNamesFilter()const;
137 QStringList excludeItemAttributeNamesFilter()const;
138 QStringList excludeNodeAttributeNamesFilter()const;
139 QString attributeValueFilter()const;
140 QString attributeNameFilter()const;
148 Q_INVOKABLE
void addItemAttributeFilter(QString attributeName, QVariant attributeValue=QString(),
bool include=true);
150 Q_INVOKABLE
void removeItemAttributeFilter(QString attributeName, QVariant attributeValue,
bool include);
152 Q_INVOKABLE
void removeItemAttributeFilter(QString attributeName,
bool include);
161 Q_INVOKABLE
void addNodeAttributeFilter(QString attributeName, QVariant attributeValue=QString(),
bool include=true, QString className=QString());
163 Q_INVOKABLE
void removeNodeAttributeFilter(QString attributeName, QVariant attributeValue,
bool include, QString className);
165 Q_INVOKABLE
void removeNodeAttributeFilter(QString attributeName,
bool include);
169 Q_INVOKABLE
void setLevelFilter(QStringList &levelFilter);
171 Q_INVOKABLE
void setNodeTypes(const QStringList& types);
174 Q_INVOKABLE
void setHideChildNodeTypes(const QStringList& types);
181 void showPopup() override;
188 virtual
void setCurrentItem(vtkIdType itemID);
191 virtual
void setRootItem(vtkIdType itemID);
196 void setPluginWhitelist(QStringList whitelist);
200 void setPluginBlacklist(QStringList blacklist);
203 void disablePlugin(QString plugin);
205 void setIncludeItemAttributeNamesFilter(QStringList filter);
206 void setIncludeNodeAttributeNamesFilter(QStringList filter);
207 void setExcludeItemAttributeNamesFilter(QStringList filter);
208 void setExcludeNodeAttributeNamesFilter(QStringList filter);
209 void setAttributeNameFilter(QString& filter);
210 void setAttributeValueFilter(QString& filter);
213 void currentItemChanged(vtkIdType);
214 void currentItemModified(vtkIdType);
217 void updateComboBoxTitleAndIcon(vtkIdType selectedShItemID);
219 void hidePopup() override;
221 virtual
void onMRMLSceneCloseEnded(vtkObject* sceneObject);
225 void mousePressEvent(QMouseEvent* event) override;
228 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.