20 #ifndef PartSet_TreeNodes_H
21 #define PartSet_TreeNodes_H
25 #include <ModuleBase_ITreeNode.h>
26 #include <ModelAPI_Feature.h>
39 virtual QVariant
data(
int theColumn,
int theRole)
const;
42 virtual QColor activeItemColor()
const;
55 static std::string typeId()
57 static std::string myType =
"Object";
61 virtual std::string type()
const {
return typeId(); }
64 virtual QVariant
data(
int theColumn,
int theRole)
const;
67 virtual Qt::ItemFlags
flags(
int theColumn)
const;
70 virtual ObjectPtr
object()
const {
return myObject; }
74 void setObject(ObjectPtr theObj) { myObject = theObj; }
84 virtual QTreeNodesList
objectCreated(
const QObjectPtrList& theObjects);
89 virtual QTreeNodesList
objectsDeleted(
const DocumentPtr& theDoc,
const QString& theGroup);
94 virtual ObjectPtr subObject(
int theId)
const;
97 virtual QColor activeItemColor()
const;
121 static std::string typeId()
123 static std::string myType =
"Folder";
127 virtual std::string type()
const {
return typeId(); }
130 virtual QVariant
data(
int theColumn,
int theRole)
const;
133 virtual Qt::ItemFlags
flags(
int theColumn)
const;
141 virtual QTreeNodesList
objectCreated(
const QObjectPtrList& theObjects);
146 virtual QTreeNodesList
objectsDeleted(
const DocumentPtr& theDoc,
const QString& theGroup);
148 QString name()
const;
156 if ((theDoc ==
document()) && (theGroup.toStdString() == groupName()))
162 std::string groupName()
const;
182 virtual QTreeNodesList
objectCreated(
const QObjectPtrList& theObjects);
187 virtual QTreeNodesList
objectsDeleted(
const DocumentPtr& theDoc,
const QString& theGroup);
198 virtual int numberOfFolders()
const {
return 0; }
212 static std::string typeId()
214 static std::string myType =
"PartSetRoot";
218 virtual std::string type()
const {
return typeId(); }
226 virtual DocumentPtr
document()
const;
233 virtual int numberOfFolders()
const {
return 3; }
253 static std::string typeId()
255 static std::string myType =
"PartRoot";
259 virtual std::string type()
const {
return typeId(); }
262 virtual ObjectPtr
object()
const {
return myObject; }
265 virtual DocumentPtr
document()
const;
271 virtual QVariant
data(
int theColumn,
int theRole)
const;
274 virtual Qt::ItemFlags
flags(
int theColumn)
const;
279 virtual QTreeNodesList
objectCreated(
const QObjectPtrList& theObjects);
284 virtual QTreeNodesList
objectsDeleted(
const DocumentPtr& theDoc,
const QString& theGroup);
289 virtual int numberOfFolders()
const;
314 static std::string typeId()
316 static std::string myType =
"ObjectFolder";
320 virtual std::string type()
const {
return typeId(); }
328 virtual QTreeNodesList
objectCreated(
const QObjectPtrList& theObjects);
333 virtual QTreeNodesList
objectsDeleted(
const DocumentPtr& theDoc,
const QString& theGroup);
336 virtual QVariant
data(
int theColumn,
int theRole)
const;
351 static std::string typeId()
353 static std::string myType =
"FieldStep";
357 virtual std::string type()
const {
return typeId(); }
360 virtual QVariant
data(
int theColumn,
int theRole)
const;
Definition: ModuleBase_ITreeNode.h:44
ModuleBase_ITreeNode(ModuleBase_ITreeNode *theParent=0)
Default constructor.
Definition: ModuleBase_ITreeNode.h:54
virtual DocumentPtr document() const
Returns document object of the sub-tree. Has to be reimplemented in sub-tree root object.
Definition: ModuleBase_ITreeNode.h:144
Class which provides access to Workshop object services.
Definition: ModuleBase_IWorkshop.h:48
A base class for root folders.
Definition: PartSet_TreeNodes.h:175
virtual QTreeNodesList objectCreated(const QObjectPtrList &theObjects)
Process creation of objects.
Definition: PartSet_TreeNodes.cpp:671
virtual QTreeNodesList objectsDeleted(const DocumentPtr &theDoc, const QString &theGroup)
Process deletion of objects.
Definition: PartSet_TreeNodes.cpp:721
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.
Definition: PartSet_TreeNodes.cpp:767
Implementation of aFolder node in data tree.
Definition: PartSet_TreeNodes.h:108
virtual Qt::ItemFlags flags(int theColumn) const
Returns properties flag of the item.
Definition: PartSet_TreeNodes.cpp:514
virtual QTreeNodesList objectCreated(const QObjectPtrList &theObjects)
Process creation of objects.
Definition: PartSet_TreeNodes.cpp:594
virtual void update()
Updates sub-nodes of the node.
Definition: PartSet_TreeNodes.cpp:535
virtual QVariant data(int theColumn, int theRole) const
Returns the node representation according to theRole.
Definition: PartSet_TreeNodes.cpp:463
virtual QTreeNodesList objectsDeleted(const DocumentPtr &theDoc, const QString &theGroup)
Process deletion of objects.
Definition: PartSet_TreeNodes.cpp:636
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.
Definition: PartSet_TreeNodes.h:154
Implementation of a folder which corresponds to ModelAPI_Folder object.
Definition: PartSet_TreeNodes.h:309
virtual QVariant data(int theColumn, int theRole) const
Returns the node representation according to theRole.
Definition: PartSet_TreeNodes.cpp:1236
virtual QTreeNodesList objectCreated(const QObjectPtrList &theObjects)
Process creation of objects.
Definition: PartSet_TreeNodes.cpp:1156
virtual QTreeNodesList objectsDeleted(const DocumentPtr &theDoc, const QString &theGroup)
Process deletion of objects.
Definition: PartSet_TreeNodes.cpp:1190
virtual void update()
Updates sub-nodes of the node.
Definition: PartSet_TreeNodes.cpp:1098
Implementation of a node for object representation.
Definition: PartSet_TreeNodes.h:50
virtual ObjectPtr object() const
Returns object referenced by the node (can be null)
Definition: PartSet_TreeNodes.h:70
virtual QVariant data(int theColumn, int theRole) const
Returns the node representation according to theRole.
Definition: PartSet_TreeNodes.cpp:107
virtual void update()
Updates sub-nodes of the node.
Definition: PartSet_TreeNodes.cpp:261
virtual QTreeNodesList objectsDeleted(const DocumentPtr &theDoc, const QString &theGroup)
Process deletion of objects.
Definition: PartSet_TreeNodes.cpp:395
void setObject(ObjectPtr theObj)
Sets an object to the node theObj a new object.
Definition: PartSet_TreeNodes.h:74
virtual QTreeNodesList objectCreated(const QObjectPtrList &theObjects)
Process creation of objects.
Definition: PartSet_TreeNodes.cpp:342
virtual int numberOfSubs() const
Returns number of sub-objects of the current object.
Definition: PartSet_TreeNodes.cpp:227
virtual Qt::ItemFlags flags(int theColumn) const
Returns properties flag of the item.
Definition: PartSet_TreeNodes.cpp:159
virtual VisibilityState visibilityState() const
Returns visibilitystate of the node in viewer 3d.
Definition: PartSet_TreeNodes.cpp:183
Implementation of Root node of a Part document in data tree.
Definition: PartSet_TreeNodes.h:249
virtual void update()
Updates sub-nodes of the node.
Definition: PartSet_TreeNodes.cpp:902
virtual QTreeNodesList objectCreated(const QObjectPtrList &theObjects)
Process creation of objects.
Definition: PartSet_TreeNodes.cpp:1051
virtual DocumentPtr document() const
Returns document object of the sub-tree.
Definition: PartSet_TreeNodes.cpp:984
virtual Qt::ItemFlags flags(int theColumn) const
Returns properties flag of the item.
Definition: PartSet_TreeNodes.cpp:1020
virtual QTreeNodesList objectsDeleted(const DocumentPtr &theDoc, const QString &theGroup)
Process deletion of objects.
Definition: PartSet_TreeNodes.cpp:1073
virtual void deleteChildren()
deletes all children nodes (called in destructor.)
Definition: PartSet_TreeNodes.cpp:890
virtual QVariant data(int theColumn, int theRole) const
Returns the node representation according to theRole.
Definition: PartSet_TreeNodes.cpp:992
virtual ObjectPtr object() const
Returns object referenced by the node (can be null)
Definition: PartSet_TreeNodes.h:262
Implementation of Root node in data tree.
Definition: PartSet_TreeNodes.h:208
virtual ModuleBase_IWorkshop * workshop() const
Returns workshop object. Has to be reimplemented in a root node.
Definition: PartSet_TreeNodes.h:223
virtual DocumentPtr document() const
Returns document object of the sub-tree.
Definition: PartSet_TreeNodes.cpp:854
virtual void update()
Updates sub-nodes of the node.
Definition: PartSet_TreeNodes.cpp:803
Implementation of a node for compsolid representation.
Definition: PartSet_TreeNodes.h:346
virtual QVariant data(int theColumn, int theRole) const
Returns the node representation according to theRole.
Definition: PartSet_TreeNodes.cpp:1250
virtual VisibilityState visibilityState() const
Returns visibilitystate of the node in viewer 3d.
Definition: PartSet_TreeNodes.cpp:1262
Implementation of base node for the module data tree.
Definition: PartSet_TreeNodes.h:34
virtual QVariant data(int theColumn, int theRole) const
Returns the node representation according to theRole.
Definition: PartSet_TreeNodes.cpp:83