X-Git-Url: https://bilbo.iut-bm.univ-fcomte.fr/and/gitweb/blast.git/blobdiff_plain/abbc64cf04a35ab3549d5c516f44c7c5921baa63..dd274e84e0518f8c9ac0cacba2bc56e5be2985b1:/BlockCategory.cpp 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) { }