X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..107509468a60f3e9e698d82a2575b700d9dde07e:/GroupScene.h?ds=inline diff --git a/GroupScene.h b/GroupScene.h index 8561482..a14ef0b 100644 --- a/GroupScene.h +++ b/GroupScene.h @@ -51,7 +51,8 @@ public: inline QList getBlockItems() { return blockItems; } inline QList getConnectionItems() { return connectionItems; } inline QList getChildrenScene() { return childrenScene; } - inline GroupWidget* getGroupWindow() { return window; } + inline GroupScene* getParentScene() { return parentScene; } + inline GroupWidget* getGroupWidget() { return window; } inline int getId() { return id; } inline EditMode getEditionMode() { return editMode; } InterfaceItem* getSelectedInterface(int id); @@ -68,8 +69,8 @@ public: // others - void createBlockItem(AbstractBlock* block); - void addBlockItem(BoxItem* item); + BoxItem* createBlockItem(AbstractBlock* block); //! create a new BoxItem and place it at the center of the scene + void addBlockItem(BoxItem* item); //! add an already configured BoxItem in the scene. void removeBlockItem(BoxItem* item); void createConnectionItem(InterfaceItem* iface1, InterfaceItem* iface2); ConnectionItem* searchConnectionItem(InterfaceItem* iface1, InterfaceItem* iface2); @@ -77,6 +78,8 @@ public: void removeConnectionItem(ConnectionItem* item); void removeGroupItem(); inline void addChildScene(GroupScene* child) { childrenScene.append(child); } + inline void removeChildScene(GroupScene* child) { childrenScene.removeAll(child); } + inline int getNbChildScene() { return childrenScene.size(); } void unselecteInterfaces(); QList getGroupAndBlocks(); @@ -94,7 +97,7 @@ public: private: Dispatcher *dispatcher; Parameters *params; - GroupScene* parentScene; // the parnet scene, =NULL for top scene + GroupScene* parentScene; // the parent scene, =NULL for top scene GroupWidget* window; // the GroupWindow that contains that scene int id; GroupItem *groupItem; // mandatory to be an instance of GroupItem.