}\r
\r
\r
-FunctionalBlock* Parameters::duplicateFunctionalBlock(FunctionalBlock *block) {\r
-\r
- ReferenceBlock* ref = block->getReference();\r
- GroupBlock* group = AB_TO_GRP(block->getParent());\r
-\r
- // adding to the graph\r
- FunctionalBlock* newBlock = graph->addFunctionalBlock(group,ref);\r
- return newBlock;\r
-}\r
\r
void Parameters::validateXmlFile(const QString& xmlFileName, const QString& xsdFileName, XmlFileType fileType) throw(Exception) {\r
// opening configFile\r
throw(err);\r
}\r
// add the block to the GroupScene\r
- currentScene->addBlockItem(funcItem);\r
+ currentScene->addBoxItem(funcItem);\r
}\r
}\r
cout << "functional blocks loaded and created succefully!" << endl;\r
BoxItem* upperItem = NULL;\r
if(insideGroup == NULL) cout << "group null" << endl;\r
// now search within the scene which BoxItem has a childItem that is = to insideGroup\r
- QList<BoxItem *> lst = currentScene->getBlockItems();\r
+ QList<BoxItem *> lst = currentScene->getBoxItems();\r
foreach(BoxItem* item, lst) {\r
if (item->getChildGroupItem() == insideGroup) {\r
upperItem = item;\r
InterfaceItem *iface2 = searchInterfaceItemById(to,topScene);\r
\r
if(iface1 != NULL && iface2 != NULL){\r
- dispatcher->connect(iface1,iface2);\r
+ dispatcher->createConnectionItem(iface1,iface2);\r
} else {\r
cout << "interfaces not found, connect canceled!" << endl;\r
}\r
\r
\r
void Parameters::updateToolbar() {\r
- int nb = currentScene->getBlockItems().length();\r
+ int nb = currentScene->getBoxItems().length();\r
for(int i = 0; i<nb; i++){\r
- if(currentScene->getBlockItems().at(i)->isSelected()){\r
+ if(currentScene->getBoxItems().at(i)->isSelected()){\r
currentScene->getGroupWidget()->enableGroupButton(true);\r
return;\r
}\r
\r
BoxItem* Parameters::searchBlockItemById(int id, GroupScene *scene) {\r
\r
- foreach(BoxItem *item, scene->getBlockItems()){\r
+ foreach(BoxItem *item, scene->getBoxItems()){\r
if(item->getId() == id){\r
return item;\r
}\r
return item;\r
}\r
}\r
- foreach(BoxItem *block, scene->getBlockItems()){\r
+ foreach(BoxItem *block, scene->getBoxItems()){\r
foreach(InterfaceItem *item, block->getInterfaces()){\r
if(item->getId() == id){\r
return item;\r