2 #include "GroupBlock.h"
3 #include "ReferenceBlock.h"
4 #include "FunctionalBlock.h"
7 topGroup = new GroupBlock(NULL);
8 topGroup->setName("top group");
15 QList<AbstractInterface *> Graph::getOutsideInterfaces() {
16 return topGroup->getInterfaces();
19 GroupBlock* Graph::createChildBlock(GroupBlock* parent) {
20 GroupBlock* b = new GroupBlock(parent);
24 FunctionalBlock* Graph::addFunctionalBlock(GroupBlock* group, ReferenceBlock* ref) {
26 FunctionalBlock* newBlock = new FunctionalBlock(group,ref);
28 group->addBlock(newBlock);
33 bool Graph::removeFunctionalBlock(FunctionalBlock* block, GroupBlock *group) {
34 group->removeBlock(block);
37 bool Graph::removeGroupBlock(GroupBlock *group) {
38 group->removeAllBlocks();
39 GroupBlock* parent = AB_TO_GRP(group->getParent());
40 parent->removeBlock(group);