SHAPER
9.13.0
|
Implementation of base node for the module data tree. More...
Public Types | |
enum | VisibilityState { NoneState , Visible , SemiVisible , Hidden } |
Public Member Functions | |
PartSet_TreeNode (ModuleBase_ITreeNode *theParent=0) | |
virtual QVariant | data (int theColumn, int theRole) const |
Returns the node representation according to theRole. More... | |
virtual QColor | activeItemColor () const |
virtual std::string | type () const =0 |
virtual Qt::ItemFlags | flags (int theColumn) const |
Returns properties flag of the item. More... | |
ModuleBase_ITreeNode * | parent () const |
Returns parent node of the current node. More... | |
QTreeNodesList | children () const |
Returns list of the node children. More... | |
ModuleBase_ITreeNode * | subNode (int theRow) const |
Returns a children node according to given row (index) More... | |
ModuleBase_ITreeNode * | subNode (const ObjectPtr &theObj, bool allLevels=true) const |
Finds a node which contains the referenced object. More... | |
bool | hasSubNode (ModuleBase_ITreeNode *theNode, bool allLevels=true) const |
Returns true if the given node is found within children. More... | |
int | childrenCount () const |
Returns number of children. More... | |
int | nodeRow (ModuleBase_ITreeNode *theNode) const |
virtual ObjectPtr | object () const |
Returns object referenced by the node (can be null) More... | |
virtual void | update () |
Updates all sub-nodes of the node (checks whole sub-tree) More... | |
virtual QTreeNodesList | objectCreated (const QObjectPtrList &theObjects) |
Process creation of objects. More... | |
virtual QTreeNodesList | objectsDeleted (const DocumentPtr &theDoc, const QString &theGroup) |
Process deletion of objects. More... | |
virtual ModuleBase_IWorkshop * | workshop () const |
Returns workshop object. Has to be reimplemented in a root node. More... | |
virtual DocumentPtr | document () const |
Returns document object of the sub-tree. Has to be reimplemented in sub-tree root object. More... | |
virtual ModuleBase_ITreeNode * | findParent (const DocumentPtr &theDoc, QString theGroup) |
Returns a node which belongs to the given document and contains objects of the given group. More... | |
virtual ModuleBase_ITreeNode * | findRoot (const DocumentPtr &theDoc) |
Returns root node of a data tree of the given document. More... | |
virtual VisibilityState | visibilityState () const |
Returns visibilitystate of the node in viewer 3d. More... | |
Protected Member Functions | |
virtual void | deleteChildren () |
deletes all children nodes (called in destructor.) More... | |
void | sortChildren () |
Protected Attributes | |
ModuleBase_ITreeNode * | myParent |
Parent of the node. More... | |
QTreeNodesList | myChildren |
Children of the node. More... | |
Implementation of base node for the module data tree.
|
virtual |
Returns the node representation according to theRole.
Reimplemented from ModuleBase_ITreeNode.
Reimplemented in PartSet_StepNode, PartSet_ObjectFolderNode, PartSet_PartRootNode, PartSet_FolderNode, and PartSet_ObjectNode.
|
inlinevirtualinherited |
Returns properties flag of the item.
Reimplemented in PartSet_PartRootNode, PartSet_FolderNode, and PartSet_ObjectNode.
|
inlineinherited |
Returns parent node of the current node.
|
inlineinherited |
Returns list of the node children.
|
inlineinherited |
Returns a children node according to given row (index)
|
inlineinherited |
Finds a node which contains the referenced object.
theObj | an object to find |
allLevels | if true then all sub-trees will be processed |
|
inlineinherited |
Returns true if the given node is found within children.
theNode | a node to find |
allLevels | if true then all sub-trees will be processed |
|
inlineinherited |
Returns number of children.
|
inlinevirtualinherited |
Returns object referenced by the node (can be null)
Reimplemented in PartSet_PartRootNode, and PartSet_ObjectNode.
|
inlinevirtualinherited |
Updates all sub-nodes of the node (checks whole sub-tree)
Reimplemented in PartSet_ObjectFolderNode, PartSet_PartRootNode, PartSet_RootNode, PartSet_FolderNode, and PartSet_ObjectNode.
|
inlinevirtualinherited |
Process creation of objects.
theObjects | a list of created objects |
Reimplemented in PartSet_ObjectFolderNode, PartSet_PartRootNode, PartSet_FeatureFolderNode, PartSet_FolderNode, and PartSet_ObjectNode.
|
inlinevirtualinherited |
Process deletion of objects.
theDoc | a document where objects were deleted |
theGroup | a name of group where objects were deleted |
Reimplemented in PartSet_ObjectFolderNode, PartSet_PartRootNode, PartSet_FeatureFolderNode, PartSet_FolderNode, and PartSet_ObjectNode.
|
inlinevirtualinherited |
Returns workshop object. Has to be reimplemented in a root node.
Reimplemented in PartSet_RootNode.
|
inlinevirtualinherited |
Returns document object of the sub-tree. Has to be reimplemented in sub-tree root object.
Reimplemented in PartSet_PartRootNode, and PartSet_RootNode.
|
inlinevirtualinherited |
Returns a node which belongs to the given document and contains objects of the given group.
theDoc | a document |
theGroup | a name of objects group |
Reimplemented in PartSet_FeatureFolderNode, and PartSet_FolderNode.
|
inlinevirtualinherited |
Returns root node of a data tree of the given document.
theDoc | a document |
|
inlinevirtualinherited |
Returns visibilitystate of the node in viewer 3d.
Reimplemented in PartSet_StepNode, and PartSet_ObjectNode.
|
inlineprotectedvirtualinherited |
deletes all children nodes (called in destructor.)
Reimplemented in PartSet_PartRootNode.
|
protectedinherited |
Parent of the node.
|
protectedinherited |
Children of the node.