return childs;\r
}\r
\r
-ReferenceBlock *BlockCategory::getBlock(int index) {\r
+ReferenceBlock *BlockCategory::getBlockById(int index) {\r
if ((index >=0) && (index < blocks.size()) ) {\r
return blocks.at(index);\r
}\r
return NULL;\r
}\r
\r
+ReferenceBlock *BlockCategory::getBlockByName(QString name) {\r
+ foreach(ReferenceBlock* block, blocks) {\r
+ if (block->getName() == name) return block;\r
+ }\r
+ cout << "block null!" << endl;\r
+ return NULL;\r
+}\r
+\r
QDomElement BlockCategory::save(QDomDocument &doc) {\r
}\r
\r