X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..14cd6d834ab531525a51c6a6992583b3e9143e02:/BlockCategory.cpp?ds=sidebyside diff --git a/BlockCategory.cpp b/BlockCategory.cpp index 0de4d86..1e70385 100644 --- a/BlockCategory.cpp +++ b/BlockCategory.cpp @@ -34,7 +34,7 @@ QList BlockCategory::getAllChilds() return childs; } -ReferenceBlock *BlockCategory::getBlock(int index) { +ReferenceBlock *BlockCategory::getBlockById(int index) { if ((index >=0) && (index < blocks.size()) ) { return blocks.at(index); } @@ -42,6 +42,14 @@ ReferenceBlock *BlockCategory::getBlock(int index) { return NULL; } +ReferenceBlock *BlockCategory::getBlockByName(QString name) { + foreach(ReferenceBlock* block, blocks) { + if (block->getName() == name) return block; + } + cout << "block null!" << endl; + return NULL; +} + QDomElement BlockCategory::save(QDomDocument &doc) { }